Difference between revisions of "Turtle Sense/Database design"
Jump to navigation
Jump to search
(→Table:NEST: more fields) |
(more) |
||
Line 1: | Line 1: | ||
− | *''field_name (data example)'' | + | *''field_name (data example) notes'' |
==Table: REPORTS== | ==Table: REPORTS== | ||
This table contains the header information of each report. | This table contains the header information of each report. | ||
− | *Report_ID (sequentially numbered | + | *Report_ID (003957) sequentially numbered key index |
− | *File_name (2014-06-20_AA0014_r-005-03) | + | *File_name (2014-06-20_AA0014_r-005-03) can be used to determine nest record. Starts with date, and then the sensor |
− | *Days_active (005) | + | *Days_active (005) calendar days since the sensor was recorded. 1 is the day of recording, 2 is the next day, etc... |
− | *Report_number (03) | + | *Report_number (03) the number of the report issued for this nest, on this day |
− | *Comm_ ID (C-AA0002) | + | *Comm_ ID (C-AA0002) the comm unit that created the report |
− | *Nest_ID | + | *Nest_ID ((000142) key index of NESTS |
− | *Start_date_time (2014/06/24 19:45:27) | + | *Start_date_time (2014/06/24 19:45:27) time of last report, roughly the start time of data collection |
− | *Report_date_time (2014/06/24 20:45:29) | + | *Report_date_time (2014/06/24 20:45:29) time of sending this report |
− | *Secs_per_record ( | + | *Secs_per_record (00015) Converted from Hex, number of seconds |
− | *Number_of_records ( | + | *Number_of_records (0120) Converted from Hex, number of records in this report |
− | *Battery_level ( | + | *Battery_level (0549) |
+ | *Parameter_ID (0036) | ||
− | ==Table: | + | ==Table:NESTS== |
− | *Nest_ID | + | *Nest_ID (000142) sequentially numbered key index |
− | *Installed (2014-06-20) | + | *Installed (2014-06-20) from the file name of the report |
− | *Sensor_ID (AA0014) | + | *Sensor_ID (AA0014) the second term in the file name |
− | *Nest_longitude (12226.3671W) | + | *Nest_longitude (12226.3671W) dddmm.mmmm |
− | *Nest_latitude (3746.3183N) | + | *Nest_latitude (3746.3183N) ddmm.mmmm |
− | *Active | + | *Active (Y) Yes or No |
− | *Parameters_ID | + | *Parameters_ID (0027) The id of the parameters currently in use |
− | *Activity_level | + | *Activity_level (19) the current level of activity in the nest (this will be calculated) |
− | *Boil_date_predicted | + | *Boil_date_predicted (2014/06/28 20:45:29) predicted date and time of hatching |
− | *Boil_date_actual | + | *Boil_date_actual (2014/06/29 02:45:29) observed date and time of hatching |
− | *Prediction_method | + | *Prediction_method (A01) Method used to predict hatching |
== Table: RECORDS== | == Table: RECORDS== | ||
− | *Record_ID | + | *Record_ID (0000142) sequentially numbered key index -- all records in the table |
− | *Report_ID | + | *Report_ID (003957) the index to the report that had this record |
− | *Nest_ID | + | *Nest_ID (000142) the index to the nest that generated this data |
− | *Record_number | + | *Record_number (0173) the number of the record in this report |
− | *Date_time | + | *Date_time (2014/06/24 20:17:29) |
− | *Temperature_hex | + | *Temperature_hex (02E3) Celsius, hex reading 0100 per 10 degrees C |
− | *X_hex | + | *X_hex (FE97) These x,y and z hex readings are the static readings of the motion sensor. |
− | *Y_hex | + | *Y_hex (047F0 They are the vector of force acting on the meter, so should average 1G |
− | *Z_hex | + | *Z_hex (05D0) |
− | *Readings | + | *Readings (3E7) The total number of readings taken in this record |
− | *Maximum | + | *Maximum (0A) The highest bid reading in the record |
− | *Bin_A | + | *Bin_A These are the top 10 hex bin readings for the record. Bin J is the number |
− | *Bin_B | + | *Bin_B of Maximum bin readings taken, and then everything below it counts down to zero. |
− | *Bin_C | + | *Bin_C If the maximum is 0A or less, then bin_A to bin_J corresponds to bin_01 to bin_10) |
*Bin_D | *Bin_D | ||
*Bin_E | *Bin_E | ||
Line 50: | Line 51: | ||
*Bin_I | *Bin_I | ||
*Bin_J | *Bin_J | ||
− | + | *Bin_01 The hex bin readings above can be converted to decimal, and put in the appropriate bins here. | |
− | *Bin_01 | ||
*Bin_02 | *Bin_02 | ||
*Bin_03 | *Bin_03 | ||
Line 76: | Line 76: | ||
*Bin_24 | *Bin_24 | ||
*Bin_25 | *Bin_25 | ||
− | *Missing | + | *Missing This would be the number of bins that are below the lowest bin reported, when Maximum is greater than 0A |
− | *Energy | + | *Energy This can be computed by integrating all the readings |
==Table: PARAMETERS== | ==Table: PARAMETERS== | ||
Line 128: | Line 128: | ||
*SPARE_8 | *SPARE_8 | ||
*SPARE_9 | *SPARE_9 | ||
+ | |||
+ | ==Table: BATTERY_LEVELS== | ||
+ | *Level (549) the ADC reading of the battery voltage converted from Hex | ||
+ | *Capacity (99) the level converted to per cent of battery capacity remaining |
Revision as of 02:27, 29 June 2014
- field_name (data example) notes
Table: REPORTS
This table contains the header information of each report.
- Report_ID (003957) sequentially numbered key index
- File_name (2014-06-20_AA0014_r-005-03) can be used to determine nest record. Starts with date, and then the sensor
- Days_active (005) calendar days since the sensor was recorded. 1 is the day of recording, 2 is the next day, etc...
- Report_number (03) the number of the report issued for this nest, on this day
- Comm_ ID (C-AA0002) the comm unit that created the report
- Nest_ID ((000142) key index of NESTS
- Start_date_time (2014/06/24 19:45:27) time of last report, roughly the start time of data collection
- Report_date_time (2014/06/24 20:45:29) time of sending this report
- Secs_per_record (00015) Converted from Hex, number of seconds
- Number_of_records (0120) Converted from Hex, number of records in this report
- Battery_level (0549)
- Parameter_ID (0036)
Table:NESTS
- Nest_ID (000142) sequentially numbered key index
- Installed (2014-06-20) from the file name of the report
- Sensor_ID (AA0014) the second term in the file name
- Nest_longitude (12226.3671W) dddmm.mmmm
- Nest_latitude (3746.3183N) ddmm.mmmm
- Active (Y) Yes or No
- Parameters_ID (0027) The id of the parameters currently in use
- Activity_level (19) the current level of activity in the nest (this will be calculated)
- Boil_date_predicted (2014/06/28 20:45:29) predicted date and time of hatching
- Boil_date_actual (2014/06/29 02:45:29) observed date and time of hatching
- Prediction_method (A01) Method used to predict hatching
Table: RECORDS
- Record_ID (0000142) sequentially numbered key index -- all records in the table
- Report_ID (003957) the index to the report that had this record
- Nest_ID (000142) the index to the nest that generated this data
- Record_number (0173) the number of the record in this report
- Date_time (2014/06/24 20:17:29)
- Temperature_hex (02E3) Celsius, hex reading 0100 per 10 degrees C
- X_hex (FE97) These x,y and z hex readings are the static readings of the motion sensor.
- Y_hex (047F0 They are the vector of force acting on the meter, so should average 1G
- Z_hex (05D0)
- Readings (3E7) The total number of readings taken in this record
- Maximum (0A) The highest bid reading in the record
- Bin_A These are the top 10 hex bin readings for the record. Bin J is the number
- Bin_B of Maximum bin readings taken, and then everything below it counts down to zero.
- Bin_C If the maximum is 0A or less, then bin_A to bin_J corresponds to bin_01 to bin_10)
- Bin_D
- Bin_E
- Bin_F
- Bin_G
- Bin_H
- Bin_I
- Bin_J
- Bin_01 The hex bin readings above can be converted to decimal, and put in the appropriate bins here.
- Bin_02
- Bin_03
- Bin_04
- Bin_05
- Bin_06
- Bin_07
- Bin_08
- Bin_09
- Bin_10
- Bin_11
- Bin_12
- Bin_13
- Bin_14
- Bin_15
- Bin_16
- Bin_17
- Bin_18
- Bin_19
- Bin_20
- Bin_21
- Bin_22
- Bin_23
- Bin_24
- Bin_25
- Missing This would be the number of bins that are below the lowest bin reported, when Maximum is greater than 0A
- Energy This can be computed by integrating all the readings
Table: PARAMETERS
- THRESH_ACT
- THRESH_INACT
- TIME_INACT
- MAXRUN
- SLOWBIN
- BINSEC
the following are all one byte fields
- THRESH_ACT_L
- THRESH_ACT_H
- TIME_ACT
- THRESH_INACT_L
- THRESH_INACT_H
- TIME_INACT_L
- TIME_INACT_H
- ACT_INACT_CTL
- FIFO_CONTRO
- FIFO_SAMPLES
- INTMAP1
- INTMAP2
- FILTER_CTL
- POWER_CTL
- SLEEP_INTERVALS
- READ_SPEED
- SLOWBIN_LO
- SLOWBIN_HI
- MAXRUN1
- MAXRUN2
- MAXRUN3
- MAXRUN4H
- MAX_RECORDS_LO
- MAX_RECORDS_HI
- CALIBRATE_TEMP
- REPORT_HEADINGS
- BINSEC_LO
- BINSEC_HI
- SLOW_DAYS
- SLOWBIN_LO
- SLOWBIN_HI
- SPARE_1
- SPARE_2
- SPARE_3
- SPARE_4
- SPARE_5
- SPARE_6
- SPARE_7
- SPARE_8
- SPARE_9
Table: BATTERY_LEVELS
- Level (549) the ADC reading of the battery voltage converted from Hex
- Capacity (99) the level converted to per cent of battery capacity remaining