Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 1.14 KB

calibration.md

File metadata and controls

37 lines (32 loc) · 1.14 KB

The Calibration module exposes the calibrate_sample service, with the following message specification.

    message IoTSample {
      float pm1 = 1;
      float pm25 = 2;
      float pm10 = 3;
      string name = 4;
    }

    message DataSample {
      repeated IoTSample iot_data = 1;
      float air_temperature = 2;
      float relative_humidity = 3;
      float precipitation = 4;
      float air_pressure = 5;
      float wind_speed = 6;
      float wind_direction = 7;
    }

    message CalibratedSample {
      float raw_pm1 = 1;
      float raw_pm25 = 2;
      float raw_pm10 = 3;
      float calibrated_pm25 = 4;
      float calibrated_pm10 = 5;
      string sensor_name = 6;
    }

    // The calibration service receives the current data sample input and outputs the calibrated values for PM2.5 and PM10 for the given sensor.
    message CalibratedData {
      repeated CalibratedSample data = 1;
    }

    //Define the service
    service Calibration {
      rpc calibrate_sample(DataSample) returns (CalibratedData);
    }