170 Soil Reflectance


REQUIREMENTS: firmware v0.38, switch detectors between main and add-on boards (34, and 35). Smoothing out pulses and normalizing to calibration black sheet. To be used only with device 177
var data = json.data_raw;
var output = {};

/* Pull out average value, skipping the first and last 40 points */
var response_605 = MathROUND(MathMEAN(json.data_raw.slice(840,960)),2); 
var response_530 = MathROUND(MathMEAN(json.data_raw.slice(640,760)),2); 
var response_650 = MathROUND(MathMEAN(json.data_raw.slice(1040,1160)),2); 
var response_720 = MathROUND(MathMEAN(json.data_raw.slice(40,160)),2); 
var response_850 = MathROUND(MathMEAN(json.data_raw.slice(240,360)),2); 
var response_940 = MathROUND(MathMEAN(json.data_raw.slice(440,560)),2); 

/* Adjust wavelength responses based on calibration*/
var adj_response_605 = response_605/8892; 
var adj_response_530 = response_530/18459; 
var adj_response_650 = response_650/26654; 
var adj_response_720 = response_720/19; 
var adj_response_850 = response_850/16597; 
var adj_response_940 = response_940/11762; 

/*outputs*/
output["530nm"]=adj_response_530; 
output["605nm"]=adj_response_605; 
output["650nm"]=adj_response_650; 
output["720nm"]=adj_response_720; 
output["850nm"]=adj_response_850; 
output["940nm"]=adj_response_940; 

output["Raw 530nm"]=response_530; 
output["Raw 605nm"]=response_605; 
output["Raw 650nm"]=response_650; 
output["Raw 720nm"]=response_720; 
output["Raw 850nm"]=response_850; 
output["Raw 940nm"]=response_940; 


return output;
{
  "time_offset": 240,
  "time": 1465480702378,
  "device_id": 219,
  "firmware_version": "0.430",
  "sample": [
    [
      {
        "time": 1465480702378,
        "protocol_id": 1,
        "data_raw": [
          3,
          2,
          5,
          3,
          6,
          5,
          3,
          4,
          1,
          2,
          2,
          2,
          6,
          5,
          3,
          5,
          4,
          2,
          2,
          5,
          4,
          2,
          5,
          4,
          1,
          4,
          5,
          3,
          2,
          6,
          5,
          2,
          6,
          7,
          1,
          2,
          3,
          0,
          3,
          5,
          4,
          0,
          4,
          5,
          4,
          2,
          3,
          4,
          2,
          4,
          5,
          1,
          4,
          3,
          5,
          2,
          4,
          1,
          6,
          3,
          5,
          2,
          6,
          5,
          5,
          3,
          1,
          4,
          4,
          3,
          4,
          6,
          4,
          6,
          6,
          3,
          2,
          4,
          2,
          4,
          5,
          6,
          5,
          2,
          3,
          1,
          0,
          3,
          4,
          5,
          3,
          7,
          6,
          2,
          6,
          5,
          4,
          4,
          4,
          3,
          4,
          7,
          5,
          4,
          5,
          4,
          4,
          4,
          6,
          4,
          2,
          5,
          2,
          2,
          3,
          4,
          1,
          2,
          6,
          3,
          4,
          3,
          5,
          2,
          4,
          7,
          6,
          4,
          5,
          5,
          4,
          4,
          6,
          1,
          3,
          5,
          5,
          0,
          3,
          7,
          4,
          4,
          6,
          7,
          2,
          5,
          4,
          3,
          5,
          2,
          3,
          0,
          4,
          2,
          6,
          5,
          1,
          3,
          3,
          4,
          3,
          0,
          4,
          4,
          3,
          7,
          2,
          5,
          0,
          7,
          3,
          5,
          6,
          5,
          3,
          3,
          4,
          6,
          5,
          4,
          2,
          4,
          2,
          5,
          5,
          4,
          3,
          6,
          4,
          5,
          7,
          4,
          8,
          4,
          4,
          5,
          6,
          4,
          2,
          4,
          4099,
          4188,
          4207,
          4184,
          4183,
          4176,
          4193,
          4207,
          4180,
          4206,
          4204,
          4187,
          4176,
          4175,
          4198,
          4189,
          4207,
          4203,
          4172,
          4192,
          4199,
          4195,
          4207,
          4212,
          4196,
          4187,
          4187,
          4205,
          4192,
          4193,
          4196,
          4218,
          4212,
          4179,
          4214,
          4205,
          4205,
          4210,
          4211,
          4197,
          4221,
          4206,
          4203,
          4200,
          4211,
          4210,
          4192,
          4189,
          4216,
          4194,
          4204,
          4199,
          4199,
          4204,
          4204,
          4211,
          4191,
          4182,
          4220,
          4198,
          4210,
          4195,
          4209,
          4201,
          4182,
          4189,
          4178,
          4182,
          4208,
          4175,
          4194,
          4194,
          4181,
          4175,
          4173,
          4169,
          4198,
          4213,
          4194,
          4211,
          4213,
          4199,
          4194,
          4191,
          4193,
          4194,
          4200,
          4185,
          4197,
          4204,
          4184,
          4200,
          4205,
          4204,
          4192,
          4220,
          4187,
          4202,
          4212,
          4197,
          4187,
          4187,
          4193,
          4203,
          4211,
          4193,
          4214,
          4216,
          4194,
          4216,
          4194,
          4209,
          4207,
          4201,
          4205,
          4205,
          4218,
          4205,
          4194,
          4215,
          4202,
          4195,
          4214,
          4192,
          4195,
          4218,
          4211,
          4209,
          4218,
          4223,
          4225,
          4186,
          4205,
          4204,
          4224,
          4203,
          4216,
          4201,
          4191,
          4203,
          4192,
          4208,
          4204,
          4223,
          4216,
          4188,
          4222,
          4219,
          4204,
          4191,
          4195,
          4209,
          4216,
          4214,
          4203,
          4205,
          4207,
          4216,
          4209,
          4191,
          4183,
          4191,
          4205,
          4201,
          4207,
          4222,
          4208,
          4196,
          4209,
          4218,
          4200,
          4189,
          4204,
          4213,
          4206,
          4220,
          4205,
          4209,
          4216,
          4214,
          4220,
          4210,
          4190,
          4218,
          4195,
          4225,
          4202,
          4205,
          4194,
          4213,
          4199,
          4206,
          4207,
          4197,
          4209,
          4202,
          4197,
          4204,
          4205,
          4202,
          2832,
          2361,
          1990,
          1635,
          1299,
          1010,
          745,
          508,
          301,
          129,
          24,
          6,
          5,
          2,
          3,
          5,
          3,
          5,
          5,
          3,
          3,
          4,
          5,
          4,
          3,
          4,
          5,
          5,
          5,
          7,
          0,
          1,
          4,
          4,
          5,
          6,
          3,
          5,
          5,
          5,
          5,
          5,
          5,
          3,
          4,
          4,
          6,
          2,
          4,
          4,
          5,
          3,
          3,
          6,
          5,
          5,
          5,
          1,
          6,
          3,
          5,
          6,
          5,
          5,
          6,
          5,
          4,
          3,
          3,
          4,
          7,
          6,
          3,
          4,
          4,
          5,
          4,
          4,
          1,
          4,
          4,
          3,
          4,
          4,
          6,
          4,
          4,
          4,
          4,
          5,
          4,
          4,
          4,
          4,
          5,
          4,
          5,
          2,
          4,
          2,
          4,
          8,
          3,
          6,
          6,
          0,
          4,
          5,
          4,
          1,
          4,
          4,
          2,
          4,
          4,
          6,
          5,
          5,
          5,
          6,
          6,
          8,
          3,
          2,
          5,
          5,
          3,
          3,
          6,
          4,
          1,
          5,
          5,
          5,
          5,
          6,
          5,
          6,
          5,
          4,
          6,
          3,
          6,
          4,
          6,
          7,
          2,
          5,
          3,
          3,
          5,
          5,
          6,
          6,
          2,
          3,
          6,
          6,
          5,
          5,
          2,
          5,
          6,
          3,
          4,
          5,
          6,
          2,
          5,
          4,
          5,
          7,
          7,
          4,
          6,
          8,
          4,
          4,
          6,
          4,
          5,
          4,
          5,
          1,
          4,
          8,
          3,
          2,
          3,
          4,
          5,
          5,
          4,
          5,
          7,
          5,
          2,
          3,
          6,
          3,
          6061,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          6,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          8,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          7,
          9,
          0,
          13,
          0,
          0,
          0,
          3,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          4,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          3,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          4262,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          26,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          3,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          12,
          0,
          0,
          0,
          0,
          2,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          3,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          3,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      }
    ]
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.3",
  "app_device": "x86-32",
  "location": [
    "42.4482282",
    "-76.4766080"
  ]
}
Sam 0645   copy   copy  2
Created by

Dan TerAvest


Protocol connections:
12
Latest Update:
Aug 2016