UNPKG

@nqminds/crop-doc-constants

Version:

Cropdoc constants

36 lines (33 loc) 1.23 kB
import moment from "moment"; const thresholds = { harvestAlertThreshold: moment.duration(2, "weeks").valueOf(), blightAlertThreshold: moment.duration(4, "weeks").valueOf(), blightSeverityThreshold: {medium: 2, high: 5}, tempThreshold: {low: 5, high: 25}, heatwaveThreshold: {temp: 28, days: 5}, // Lower bound hourly precipitation thresholds (mm) rainThresholdHourlyMm: {moderate: 2.5, heavy: 10, violent: 50}, get rainThresholdDailyMm() { return { moderate: this.hoursInDay * this.rainThresholdHourlyMm.moderate, heavy: this.hoursInDay * this.rainThresholdHourlyMm.heavy, violent: this.hoursInDay * this.rainThresholdHourlyMm.violent, }; }, get rainThresholdWeeklyMm() { return { moderate: this.hoursInWeek * this.rainThresholdHourlyMm.moderate, heavy: this.hoursInWeek * this.rainThresholdHourlyMm.heavy, violent: this.hoursInWeek * this.rainThresholdHourlyMm.violent, }; }, humidityThreshold: {low: 30, high: 70}, sensorThresholdKm: 50, geoSearchDelta: 50 / 111, // km to degrees lat lon pixelSearchDelta: 0.01, controlThresholdKm: 5, blightValidMonths: 6, blightForecastStart: -8, blightForecastEnd: 7, }; export default thresholds;