CO2-HzA


Measured SOIL parameters: - Environment TEMPERATURE/HUMIDITY - SOIL CO2 EVOLUTION (ppm) - SOIL TEMPERATURE/MOISTURE SENSOR (Celsius /%) - SOIL O2 EVOLUTION OR ABSORPTION (in progress)
// Fix for CO2 array
for (var i = 0; i < json.co2.length; i++) {
  json.co2[i] = parseFloat(json.co2[i]);
}

//Check if the value exists in json 
  //calculate kg C evolved per hectare per day
  var output = {};  
  var pressure = 101325; 
  var mole_wt = 12.01; 
  var mole_conversion = 0.000001;  
  var R_constant = 8.31441; 
  var unit = 1000; 
  var unit2 = 100;
  var day_unit = 86400;
  var volume = 0.000432;
  var area = 0.007854;
  var temperature = 297.15; 
  var Headspace = 470.4;
  var Temp = 298;
  var Rconstant = 82.05;
  //var mgCm2 = ((((mole_wt * pressure * co2produced * mole_conversion) / (R_constant * temperature)) * unit) * volume) / area;
  //var kgCha_day = (mgCm2 / unit2) * day_unit;
 
//conversion factor is assuming 25g soil (soil g x 1000)
var conversionfactor = 25000;
//converts to weight of C only and not of CO2
var conversionfactor2 = 12000;

  //calculate volumetric soil moisture content and CO2
  var soil_moisture = json.analog_read;
  var soil_temperature = json.soil_temperature;
  var soil_temperature = json.soil_humidity;
  var co2produced = json.co2;
  var co2max = MathMAX(json.co2);
  var co2min = MathMIN(json.co2);
  var co2increase = co2max - co2min;
  var ugCgsoil = MathROUND((((co2increase * Headspace) / conversionfactor) / (Temp * Rconstant)) * conversionfactor2);

 

  
  
  //Show value and name in output CO2
  output["co2.array"] = json.co2;  
  output ["Co2-produced"] = json.co2;
  output["CO2 increase"] = co2increase;
  output["Max CO2"] = co2max;
  output["Min CO2"] = co2min;
  //output ["mg C m2"] = mgCm2;
  //output ["kg C ha-1 day-1"] = kgCha_day;
  output["ugC.gsoil"] = ugCgsoil;
  
//Show value and name in output Soil
  output ["Soil moisture content"] = json.analog_read;
  output["Soil-temperature"] = json.soil_temperature;
  output["Soil-humidity"] = json.soil_humidity;


//Check if the key time exists in json
if (json.time !== undefined){

	//Add key time and value to output
	output["time"] = json.time;
}

  return output;

{
  "time_offset": -120,
  "time": 1488363160463,
  "device_version": "1",
  "device_id": "d4:f5:ff:ff:ff:ff",
  "device_battery": -135,
  "device_firmware": "1.14",
  "firmware_version": "1.14",
  "device_time": 1487727546,
  "sample": [
    {
      "time": 1488363160473,
      "protocol_id": 1,
      "co2": [
        "1145.000000",
        "1142.000000",
        "1140.000000",
        "1137.000000",
        "1136.000000",
        "1134.000000",
        "1130.000000",
        "1128.000000",
        "1123.000000",
        "1119.000000",
        "1118.000000",
        "1117.000000",
        "1113.000000",
        "1110.000000",
        "1104.000000",
        "1097.000000",
        "1094.000000",
        "1091.000000",
        "1087.000000",
        "1078.000000",
        "1077.000000",
        "1078.000000",
        "1071.000000",
        "1068.000000",
        "1065.000000",
        "1063.000000",
        "1058.000000",
        "1054.000000",
        "1050.000000",
        "1044.000000",
        "1042.000000",
        "1039.000000",
        "1035.000000",
        "1034.000000",
        "1027.000000",
        "1025.000000",
        "1020.000000",
        "1016.000000",
        "1010.000000",
        "1007.000000",
        "1004.000000",
        "1002.000000",
        "998.000000",
        "994.000000",
        "989.000000",
        "987.000000",
        "986.000000",
        "986.000000",
        "983.000000",
        "981.000000",
        "976.000000",
        "976.000000",
        "972.000000",
        "968.000000",
        "964.000000",
        "958.000000",
        "953.000000",
        "949.000000",
        "944.000000",
        "941.000000"
      ],
      "temperature2": [
        "28.420000",
        "28.430000",
        "28.440001",
        "28.450001",
        "28.459999",
        "28.459999",
        "28.469999",
        "28.490000",
        "28.500000",
        "28.510000",
        "28.520000",
        "28.530001",
        "28.530001",
        "28.530001",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.559999",
        "28.559999",
        "28.559999",
        "28.559999",
        "28.559999",
        "28.570000",
        "28.570000",
        "28.570000",
        "28.570000",
        "28.559999",
        "28.559999",
        "28.570000",
        "28.559999",
        "28.570000",
        "28.559999",
        "28.559999",
        "28.559999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.549999",
        "28.540001",
        "28.540001",
        "28.540001",
        "28.530001",
        "28.530001",
        "28.530001",
        "28.530001",
        "28.520000",
        "28.520000",
        "28.520000",
        "28.510000",
        "28.500000",
        "28.500000",
        "28.500000",
        "28.490000",
        "28.490000",
        "28.490000"
      ],
      "humidity2": [
        "48.602539",
        "48.456055",
        "48.320312",
        "48.162109",
        "48.025391",
        "47.890625",
        "47.765625",
        "47.675781",
        "47.552734",
        "47.427734",
        "47.291992",
        "47.133789",
        "47.020508",
        "46.907227",
        "46.783203",
        "46.657227",
        "46.544922",
        "46.430664",
        "46.329102",
        "46.213867",
        "46.123047",
        "46.033203",
        "45.941406",
        "45.828125",
        "45.713867",
        "45.623047",
        "45.542969",
        "45.428711",
        "45.326172",
        "45.223633",
        "45.132812",
        "45.052734",
        "44.950195",
        "44.846680",
        "44.755859",
        "44.653320",
        "44.527344",
        "44.424805",
        "44.344727",
        "44.265625",
        "44.184570",
        "44.093750",
        "44.013672",
        "43.945312",
        "43.875977",
        "43.819336",
        "43.727539",
        "43.658203",
        "43.567383",
        "43.509766",
        "43.440430",
        "43.337891",
        "43.235352",
        "43.166016",
        "43.041016",
        "42.983398",
        "42.914062",
        "42.810547",
        "42.752930",
        "42.707031"
      ],
      "pressure2": [
        "962.764221",
        "962.836731",
        "962.804199",
        "962.801575",
        "962.774292",
        "962.750000",
        "962.774292",
        "962.765625",
        "962.785156",
        "962.791565",
        "962.799866",
        "962.807983",
        "962.817993",
        "962.796814",
        "962.812988",
        "962.831421",
        "962.837036",
        "962.830933",
        "962.830078",
        "962.868103",
        "962.863037",
        "962.842407",
        "962.832336",
        "962.826538",
        "962.801086",
        "962.858459",
        "962.859863",
        "962.851868",
        "962.874390",
        "962.861572",
        "962.859192",
        "962.863220",
        "962.853577",
        "962.874817",
        "962.902710",
        "962.858459",
        "962.878601",
        "962.824829",
        "962.842712",
        "962.868530",
        "962.890137",
        "962.862244",
        "962.844849",
        "962.831848",
        "962.851074",
        "962.838623",
        "962.838745",
        "962.812317",
        "962.815186",
        "962.850342",
        "962.851868",
        "962.839539",
        "962.822754",
        "962.804382",
        "962.831726",
        "962.801514",
        "962.774475",
        "962.770630",
        "962.789062",
        "962.807556"
      ],
      "soil_temperature": 20.639999,
      "soil_humidity": 71.753517,
      "analog_read": [
        "13.000000",
        "14.000000",
        "13.000000",
        "14.000000",
        "13.000000",
        "13.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "14.000000",
        "14.000000",
        "14.000000",
        "14.000000",
        "15.000000",
        "13.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "14.000000",
        "14.000000",
        "14.000000",
        "16.000000",
        "14.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "16.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "16.000000",
        "14.000000",
        "15.000000",
        "15.000000",
        "16.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "14.000000",
        "15.000000",
        "15.000000"
      ],
      "temp_c": [
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan"
      ],
      "humidity_m": [
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan",
        "nan"
      ],
      "data_raw": [
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535,
        65535
      ]
    }
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.6",
  "app_device": "x86-32",
  "location": [
    "49.5436305",
    "25.5683948"
  ],
  "ConsoleMacro": "277"
}

Protocol connections:
2
Latest Update:
Jan 2018