Smart Mooring Sensor Data

The /sensor-data url communicates data collected from a deployed Spotter's Smart Mooring sensors within a given date-time window.

Smart Mooring Sensor Data

GET https://api.sofarocean.com/api/sensor-data?spotterId=:spotterId&startDate=:startDate&endDate=:endDate

Returns Smart Mooring sensor data for the corresponding spotterId between startDate and endDate.

Query Parameters

NameTypeDescription

spotterId

string

SpotterId of the device to retrieve data for.

startDate

string

ISO8601-formatted timestamp string indicating start date for data inclusion. Example: 2021-01-01T07:00:00Z

endDate

string

ISO8601-formatted timestamp string indicating end date for data inclusion. Example: 2021-01-02T07:00:00Z

Note: If neither startDate nor endDate are specified, startDate will default to 24 hours ago.

Example Request

curl "https://api.sofarocean.com/api/sensor-data?spotterId=SPOT-0222&startDate=2021-12-01T07:00:00Z&endDate=2021-12-02T07:00:00Z" -H 'token: YOUR_API_TOKEN'

Response Description

To learn more about the sensors and the measured data please review our Sensor Payload support document.

The /sensor-data response format consists of a “flat” (uncategorized) data stream ordered by timestamp.

The sensorPosition property represents the physical position of a sensor in the Smart Mooring relative to Spotter. Sensor position 1 is closest to Spotter.

The data_type_name property represents the type of information being sent by a sensor, as ingested by the API.

The timestamp field in a /sensor-data response is an ISO8061-formatted string, which indicates the end of a sample collection period. Timestamps within this data format, while ordered, are not necessarily unique. Two or more sensors may send different values with identical timestamps (e.g. a temperature sensor and a pressure sensor which both emit data on the same time interval).

units indicates the physical units or dimension of the data, while unit_type adds a more contextual description of what is physically being measured.

The location data in each sample dict is the location of the Spotter when the report was encoded and transmitted. If the Spotter is configured to send multiple sample periods in a single transmission (eg to save on data telemetry costs) all samples in the report will have the same location data.

Example Response

{
    "status": "success",
    "data": [
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:02:13.000Z",
            "sensorPosition": 2,
            "units": "μbar",
            "value": 50,
            "unit_type": "pressure",
            "data_type_name": "rbrcoda3_stdevpressure_15bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:02:13.000Z",
            "sensorPosition": 2,
            "units": "°C",
            "value": 25.266200000000005,
            "unit_type": "temperature",
            "data_type_name": "rbrcoda3_meantemperature_20bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:02:13.000Z",
            "sensorPosition": 1,
            "units": "°C",
            "value": 25.480000000000004,
            "unit_type": "temperature",
            "data_type_name": "sofar_temperature_12bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:02:13.000Z",
            "sensorPosition": 2,
            "units": "μbar",
            "value": 1122270,
            "unit_type": "pressure",
            "data_type_name": "rbrcoda3_meanpressure_21bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 2,
            "units": "°C",
            "value": 25.268500000000003,
            "unit_type": "temperature",
            "data_type_name": "rbrcoda3_meantemperature_20bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 1,
            "units": "°C",
            "value": 25.520000000000003,
            "unit_type": "temperature",
            "data_type_name": "sofar_temperature_12bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 2,
            "units": "μbar",
            "value": 1122190,
            "unit_type": "pressure",
            "data_type_name": "rbrcoda3_meanpressure_21bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 2,
            "units": "μbar",
            "value": 70,
            "unit_type": "pressure",
            "data_type_name": "rbrcoda3_stdevpressure_15bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "units": "cm/s",
            "value": 188.69,
            "unit_type": "speed",
            "data_type_name": "aanderaa_abs_speed_mean_15bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "units": "cm/s",
            "value": 76.92,
            "unit_type": "speed",
            "data_type_name": "aanderaa_abs_speed_std_15bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "units": "rad",
            "value": 4.058,
            "unit_type": "direction",
            "data_type_name": "aanderaa_direction_circ_mean_13bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "units": "rad",
            "value": 1.074,
            "unit_type": "direction",
            "data_type_name": "aanderaa_direction_circ_std_13bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "value": 7,
            "unit_type": "reading_count",
            "data_type_name": "aanderaa_reading_count_10bits"
        },
        {
            "latitude": 13.1203,
            "longitude": 100.91925,
            "timestamp": "2021-12-01T03:17:13.000Z",
            "sensorPosition": 3,
            "units": "°C",
            "value": -0.17999999999999972,
            "unit_type": "temperature",
            "data_type_name": "aanderaa_temperature_mean_13bits"
        },
    ]
}

Last updated