This is an old revision of the document!
Weatherbox Data Specification
This page contains the data specification versions for the weatherbox.
296 Basic Schema
This is a simplified schema that is to be used by EE 296 teams for Spring 2016.
typedef struct { uint16_t schema; // Schema Identification Number uint16_t address; // Address of the particular node uint32_t uptime_ms; // Time since start of program uint16_t batt_mv; // Battery Voltage (in milli volts) uint16_t panel_mv; // Panel Voltage (in milli volts) uint32_t bmp185_press_pa; // Pressure Value (in pascals) int16_t bmp185_temp_decic; // Temperature Value (in celsius) uint16_t humidity_centi_pct; uint16_t apogee_w_m2; } schema_296;
Name | Size (Bytes) | Description |
---|---|---|
schema | 16 | Packet schema version. You should set this in software before you send the packet - this field is used by the server to identify your packet number. For the 296 weatherbox, set this to 296. |
address | 16 | The address of your particular node. This address is assigned by the lab and is unique to every weatherbox. |
uptime_ms | 32 | The uptime in ms. This shows how long the microcontroller has been on for. |
batt_mv | 16 | Battery voltage in millivolts. This is used for diagnostic purposes. |
panel_mv | 16 | Panel voltage in miliivolts. This allows us to monitor the voltage of the solar panel. |
press_pa | 32 | Pressure in pascals - uses the (bmp085). |
temp_decic | 16 | Temperature in deci-celsius - uses the (bmp185). |
humid_centi_pct | 16 | Humidity in centi percents. |
solar_irr_w_m2 | 16 | Solar Irradiance. Taken from the apogee reading.. |
In the interests of time, this packet is simplified from the original weatherbox specification. In this specification there are no varying sample rates for each data type - one packet gives you one sample point for each data type.
Converting from volts to w_m2
Make sure you convert your voltage reading from the apogee sensor to watts per meter squared (). We're measuring solar irradiance: https://en.wikipedia.org/wiki/Irradiance
You can find the conversion factor on the apogee website for your specific sensor, but here is what it should be:
Therefore:
Schema v1
This the initial data format for the weatherbox. You can see the data packet represented as a struct in the C programming language.
typedef struct { uint16_t schema; uint16_t address; // Address of Arduino uint32_t uptime_ms; // Time since start of program uint8_t n; // number of data points in packet 0..30 uint16_t batt_mv[15]; // Battery Voltage (in milli volts) uint16_t panel_mv[15]; // Panel Voltage (in milli volts) uint32_t bmp085_press_pa; // Pressure Value (in pascals) int16_t bmp085_temp_decic; // Temperature Value (in celsius) uint16_t humidity_centi_pct; uint16_t apogee_w_m2[60]; } schema_1;
Name | Size (Bytes) | Description |
---|---|---|
Schema | 16 | Schema version |
Address | 16 | Address number of the node |
Uptime | 32 | Uptime in milliseconds |
Data Points | 8 | Number of data points |
Battery Voltage | 16 | Battery voltage in millivolts |
Panel Voltage | 16 | Panel voltage in miliivolts |
Pressure | 32 | Pressure in pascals |
Temperature | 16 | Temperature in celsius |
Humidity | 16 | Humidity |
Solar Irridance | 16 |
Schema v3
This is the packet used for apple.
typedef struct { uint16_t schema; uint16_t address; // Address of Arduino uint8_t overflow_num; // Number of times millis overflowed // (happens ~every 49 days) uint32_t uptime_ms; // Time since start of program uint8_t n; // number of data points in packet 0..30 uint16_t batt_mv[6]; // Battery Voltage (in milli volts) uint16_t panel_mv[6]; // Panel Voltage (in milli volts) uint32_t bmp085_press_pa; // Pressure Value (in pascals) int16_t bmp085_temp_decic; // Temperature Value (in celsius) uint16_t humidity_centi_pct; uint16_t apogee_w_m2[20]; } schema_3;