# HDF5 File Structure

### Directory Structure

Sensors are grouped according to their sensor name. Integrations are stored as datasets in a subgroup called Rawdata. The name of a dataset is a combination of its timestamp and integration counter.

<figure><img src="https://732569122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpjLxyzuWzCEm73ytLKrU%2Fuploads%2FM4GcO72w1zlQsyUm39r4%2Ffile1.png?alt=media&#x26;token=adbd02fb-d81f-4f7b-8dfd-49f70ee6c8ca" alt="" width="352"><figcaption><p>HDF5 directory structure.</p></figcaption></figure>

Each dataset (integration) is a 6 x 256 array. Each dataset contains six 256-channel spectra for cal\_HH, cal\_VV, data\_HH, data\_VV, data\_U, and data\_V:

* cal\_HH, cal\_VV: auto-correlation products of the calibration load
* data\_HH, data\_VV: auto-correlations products of the soil signal
* data\_U, data\_V: cross-correlations products of the soil signal

<figure><img src="https://732569122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpjLxyzuWzCEm73ytLKrU%2Fuploads%2Fcu1eMGSeSmLtuLW40soe%2Ffile2.png?alt=media&#x26;token=325cdc7f-4666-4c00-aa68-77a74be863ce" alt=""><figcaption><p>Data array.</p></figcaption></figure>

### Datasets

Each integration is stored with a set of metadata. Most of the metadata fields are self-explanatory, except for the following ones:

* accelerometer: A 3-element array containing the output of the accelerometer for the x, y, and z-axis. The look angle of the sensor is $$\tan\alpha = \dfrac{a\[2]}{a\[1]}$$.&#x20;
* bw\_mhz: Sensor bandwidth in MHz.
* course\_deg: GPS course (azimuth) in degrees.
* flight\_counter: A counter that increases when the drone returns to its "home" position. This can be used to identify battery swaps.
* freq\_mhz: Sensor centre frequency in MHz.
* gyro: A 3-element array containing the gyroscope output for the x, y, and z-axis.
* integration: Counter increases for each new integration containing cal-load and soil signal.
* lna\_temperature\_degC: The physical temperature of the calibration load in degrees Celsius.
* runtime: Sensor runtime since powerup in milliseconds.
* sats: 2-element array containing the number of GPS satellites used and visible.
* sf\_mhz: Sampling frequency in MHz. The frequency of each channel is: $$f(\mathrm{MHz}) = \mathrm{freq\_mhz} - \mathrm{sf\_mhz}/4 + \mathrm{channel} \cdot (\mathrm{sf\_mhz}/2)/256$$
* speed\_kmh: GPS speed in km/h.

<figure><img src="https://732569122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpjLxyzuWzCEm73ytLKrU%2Fuploads%2FAwrrKpPMdJiLaUmcXRMw%2Ffile3.png?alt=media&#x26;token=cd1587e7-eb71-408d-8f62-f288ac9c04d1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://732569122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpjLxyzuWzCEm73ytLKrU%2Fuploads%2F4SsrdrIHsI6QuvN1LaEq%2Ffile4.png?alt=media&#x26;token=440d56e8-6f81-4bd7-adc4-5382eb79e2e9" alt=""><figcaption><p>Metadata for each integration.</p></figcaption></figure>
