syntax = "proto2";

import "dccl/option_extensions.proto";

package jaiabot.protobuf;

enum PressureSensorType {
    BAR02 = 1;
    BAR30 = 2;
}

message PressureTemperatureData
{
    option (dccl.msg) = {
        unit_system: "si"
    };

    required double pressure_raw = 1
        [(dccl.field) = { units { prefix: "deci" unit: "metric::bar" } }];
    optional double temperature = 2 [(dccl.field) = {
        units { derived_dimensions: "temperature" system: "celsius" }
    }];
    required PressureSensorType sensor_type = 3;
}

message PressureAdjustedData
{
    option (dccl.msg) = {
        unit_system: "si"
    };

    required double pressure_raw = 1
        [(dccl.field) = { units { prefix: "deci" unit: "metric::bar" } }];
    optional double pressure_adjusted = 2
        [(dccl.field) = { units { prefix: "deci" unit: "metric::bar" } }];
    optional double pressure_raw_before_dive = 3
        [(dccl.field) = { units { prefix: "deci" unit: "metric::bar" } }];
    optional double sensor_depth = 4 [(dccl.field) = {
        min: -1
        max: 100
        precision: 1
        units: { derived_dimensions: "length" }
    }];
    optional double depth = 5 [(dccl.field) = {
        min: -1
        max: 100
        precision: 1
        units: { derived_dimensions: "length" }
    }];
}
