finished the bin sensor view to display connected components for a bin
This commit is contained in:
parent
67b251d865
commit
b00f10b831
16 changed files with 983 additions and 232 deletions
|
|
@ -14,12 +14,11 @@ import WheatImg from "assets/grain/wheat.jpg";
|
|||
import { Option } from "common/SearchSelect";
|
||||
import { cloneDeep } from "lodash";
|
||||
import { pond } from "protobuf-ts/pond";
|
||||
import { Equation } from "./GrainMoisture";
|
||||
|
||||
export interface GrainExtension {
|
||||
name: string;
|
||||
group: string;
|
||||
equation: Equation;
|
||||
equation: pond.MoistureEquation;
|
||||
a: number;
|
||||
b: number;
|
||||
c: number;
|
||||
|
|
@ -38,7 +37,7 @@ const defaultSetTemp = 30.0;
|
|||
const defaultGrain: GrainExtension = {
|
||||
name: "None",
|
||||
group: "",
|
||||
equation: Equation.none,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_NONE,
|
||||
a: 0,
|
||||
b: 0,
|
||||
c: 0,
|
||||
|
|
@ -58,7 +57,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Custom Type",
|
||||
group: "",
|
||||
equation: Equation.none,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_NONE,
|
||||
a: 0,
|
||||
b: 0,
|
||||
c: 0,
|
||||
|
|
@ -75,7 +74,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Barley",
|
||||
group: "Barley",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 475.12,
|
||||
b: 0.14843,
|
||||
c: 71.996,
|
||||
|
|
@ -93,7 +92,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Buckwheat",
|
||||
group: "Buckwheat",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 103540000,
|
||||
b: 0.1646,
|
||||
c: 15853000,
|
||||
|
|
@ -111,7 +110,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Canola",
|
||||
group: "Canola",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 3.489,
|
||||
b: -0.010553,
|
||||
c: 1.86,
|
||||
|
|
@ -130,7 +129,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Rapeseed",
|
||||
group: "Canola",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 3.0026,
|
||||
b: -0.0048967,
|
||||
c: 1.7607,
|
||||
|
|
@ -148,7 +147,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Corn (Henderson)",
|
||||
group: "Corn",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000066612,
|
||||
b: 1.9677,
|
||||
c: 42.143,
|
||||
|
|
@ -166,7 +165,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Corn (Chung-Pfost)",
|
||||
group: "Corn",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 374.34,
|
||||
b: 0.18662,
|
||||
c: 31.696,
|
||||
|
|
@ -184,7 +183,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Corn (Oswin)",
|
||||
group: "Corn",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 15.303,
|
||||
b: -0.10164,
|
||||
c: 3.0358,
|
||||
|
|
@ -202,7 +201,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Maize White",
|
||||
group: "Corn",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000066612,
|
||||
b: 1.9677,
|
||||
c: 70.143,
|
||||
|
|
@ -220,7 +219,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Maize Yellow",
|
||||
group: "Corn",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000066612,
|
||||
b: 1.9677,
|
||||
c: 65.143,
|
||||
|
|
@ -238,7 +237,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Oats (Henderson)",
|
||||
group: "Oats",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000085511,
|
||||
b: 2.0087,
|
||||
c: 37.811,
|
||||
|
|
@ -256,7 +255,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Oats (Chung-Pfost)",
|
||||
group: "Oats",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 442.85,
|
||||
b: 0.21228,
|
||||
c: 35.803,
|
||||
|
|
@ -274,7 +273,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Oats (Oswin)",
|
||||
group: "Oats",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 12.412,
|
||||
b: -0.060707,
|
||||
c: 2.9397,
|
||||
|
|
@ -292,7 +291,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Peanuts",
|
||||
group: "Peanuts",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 8.6588,
|
||||
b: -0.057904,
|
||||
c: 2.6204,
|
||||
|
|
@ -310,7 +309,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Long Grain Rice",
|
||||
group: "Rice",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000041276,
|
||||
b: 2.1191,
|
||||
c: 49.828,
|
||||
|
|
@ -328,7 +327,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Medium Grain Rice",
|
||||
group: "Rice",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000035502,
|
||||
b: 2.31,
|
||||
c: 27.396,
|
||||
|
|
@ -346,7 +345,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Short Grain Rice",
|
||||
group: "Rice",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.000048524,
|
||||
b: 2.0794,
|
||||
c: 45.646,
|
||||
|
|
@ -364,7 +363,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Sorghum",
|
||||
group: "Sorghum",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 797.33,
|
||||
b: 0.18159,
|
||||
c: 52.238,
|
||||
|
|
@ -382,7 +381,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Soybeans",
|
||||
group: "Soybeans",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 228.2,
|
||||
b: 0.2072,
|
||||
c: 30,
|
||||
|
|
@ -400,7 +399,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Sunflower",
|
||||
group: "Sunflower",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.00031,
|
||||
b: 1.7459,
|
||||
c: 66.603,
|
||||
|
|
@ -418,7 +417,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Durum Wheat",
|
||||
group: "Wheat",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 13.101,
|
||||
b: -0.052626,
|
||||
c: 2.9987,
|
||||
|
|
@ -436,7 +435,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Hard Red Wheat",
|
||||
group: "Wheat",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 610.34,
|
||||
b: 0.15526,
|
||||
c: 93.213,
|
||||
|
|
@ -454,7 +453,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Wheat SAWOS",
|
||||
group: "Wheat",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 610.34,
|
||||
b: 0.15526,
|
||||
c: 93.213,
|
||||
|
|
@ -472,7 +471,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Un-retted Flax",
|
||||
group: "Flax",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 5.11,
|
||||
b: Math.pow(-8.46 * 10, -3),
|
||||
c: 2.26,
|
||||
|
|
@ -490,7 +489,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Dew-retted Flax",
|
||||
group: "Flax",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 6.5,
|
||||
b: Math.pow(-1.68 * 10, -2),
|
||||
c: 3.2,
|
||||
|
|
@ -508,7 +507,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Yellow Peas",
|
||||
group: "Peas",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 14.81,
|
||||
b: -0.109,
|
||||
c: 3.019,
|
||||
|
|
@ -526,7 +525,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Blaze Lentils",
|
||||
group: "Lentils",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 5.39,
|
||||
b: -0.015,
|
||||
c: 2.273,
|
||||
|
|
@ -544,7 +543,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Redberry Lentils",
|
||||
group: "Lentils",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 4.749,
|
||||
b: -0.0116,
|
||||
c: 2.066,
|
||||
|
|
@ -562,7 +561,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Robin Lentils",
|
||||
group: "Lentils",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 5.176,
|
||||
b: -0.0065,
|
||||
c: 2.337,
|
||||
|
|
@ -580,7 +579,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Dry Beans Red",
|
||||
group: "Dry Beans",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 4.2669,
|
||||
b: -0.013382,
|
||||
c: 1.6933,
|
||||
|
|
@ -596,7 +595,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Dry Beans Black",
|
||||
group: "Dry Beans",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 5.2003,
|
||||
b: -0.022685,
|
||||
c: 1.9656,
|
||||
|
|
@ -612,7 +611,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Rye (Henderson)",
|
||||
group: "Rye",
|
||||
equation: Equation.henderson,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HENDERSON,
|
||||
a: 0.00006343,
|
||||
b: 2.2060,
|
||||
c: 13.1810,
|
||||
|
|
@ -628,7 +627,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Rye (Chung-Pfost)",
|
||||
group: "Rye",
|
||||
equation: Equation.chungPfost,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_CHUNG_PFOST,
|
||||
a: 461.0230,
|
||||
b: 0.1840,
|
||||
c: 36.7410,
|
||||
|
|
@ -644,7 +643,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Rye (Halsey)",
|
||||
group: "Rye",
|
||||
equation: Equation.halsey,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_HALSEY,
|
||||
a: 4.2970,
|
||||
b: 0.380,
|
||||
c: 2.2710,
|
||||
|
|
@ -660,7 +659,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
|||
{
|
||||
name: "Rye (Oswin)",
|
||||
group: "Rye",
|
||||
equation: Equation.oswin,
|
||||
equation: pond.MoistureEquation.MOISTURE_EQUATION_OSWIN,
|
||||
a: 11.8870,
|
||||
b: 0.0210,
|
||||
c: 3.2620,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
import { pond } from "protobuf-ts/pond";
|
||||
import GrainDescriber from "./GrainDescriber";
|
||||
|
||||
export enum Equation {
|
||||
"none",
|
||||
"oswin",
|
||||
"halsey",
|
||||
"henderson",
|
||||
"chungPfost"
|
||||
}
|
||||
|
||||
const toERH = (humidity: number): number => {
|
||||
return humidity >= 100 ? 0.99999 : humidity / 100;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue