Smart Nestbox Data Processing

This page explains the different data types being logged on the smart nestbox and guides the field scientists in their work to interpret the data.

It is very important to understand the underlying state machine that is determining the data being logged on the smart nestbox. A typical measurement event has the following sequence:

  1. Standby: no weight measurements are logged, only battery voltage (P) and, once per hour, the no-load weight (or “offset”) is being re-measured (O).
  2. Detectiom: a weight of 100g about the initial offset is measured (D). Potentially this is an owl sitting on the perch, but it did not yet get identified. The values measured periodically during this phase cannot directly be transformed into grams, as they are unprecise measurements (short sampling period). It allows though to get an idea about how still the bird was sitting on the perch before it got identified.
  3. Identification: the RFID tag of the owl could be read out and is logged (R) up to three times. If it is three times the same value, one can be confident that the ID was read out correctly.
  4. Exact Measurement: because the owl was identified, the smart nestbox now switches to a continuous weight measurement mode with hight precision (X) and over multiple seconds averaged values (A, only if values are within a certain tolerance).
  5. Identification Re-try: After 10 - 20 measurement points, the RFID tag of the owl is being read out again. If it can still get detected, R is logged. If not, U is logged (as in undefined).
  6. Owl leaves: If the weight falls below ca. 100 g again, X measurements continue for 10 - 20 data points, then immediately the weight is labelled as offset (O) for 100 more data points.
  7. Turn back to standby mode.

All logging events are first stored in a temprary buffer and periodically written to the SD card into files named LOGXXXXX.txt, where XXXXX is an ascending number. The logging events are represented as a single line in those files. Each of those lines has the following common strucutre:

Logging Character, Timestamp, Data [,complement]

The Logging Character is a predefined ASCII character and encodes the type of data being logged on this line (explained below).

The timestamp is represented as UNIX epoch timestamp, i.e. the number of seconds since 1.1.1970. It is furthermore stored as UTC value, i.e. you need to add one or two hours to convert it into European winter time (CET) resp. summer time (CEST).

Measurement Data

Description Field 1 (Character) Field 2 Field 3 (Data) Field 4 Conversion
Battery voltage P Timestamp Battery voltage in mV 5250 mV = Full, 3600 mV = Empty
RFID identificator R Timestamp Tag ID (hexadecimal) compare with database
Exact Weight Value X Timestamp Weight sensor raw value Deviation from average value during averaging period Weight in grams = ([Raw value] - [Calibration Offset])/[Calibration slope]
Inexact Weight Value (before RFID detection) D Timestamp Approximate Weight sensor raw value No direct relationship to weight in grams, but an indicator if the owl was standing still before its ID was read out.
Weight Offset Value (Current Zero of the scale) O
  • octanisx/nestbox/data.txt
  • Last modified: 5 years ago
  • by raffael.tschui