syntax = "proto3";
import "swe_options.proto";

message BasicYPR {

  // internal datastream ID
  optional int64 datastream_id = 1 [
    default = 0
  ];

  // internal FOI ID
  optional int64 foi_id = 2 [
    default = 0,
    (swe.definition) = "http://sensorml.com/ont/swe/property/FoiID"
  ];

  int64 phenomenonTime = 3 [
    (swe.definition) = "http://www.opengis.net/def/property/OGC/0/PhenomenonTime",
    (swe.uomCode) = "ms"
  ];

  message TangentPointPosition {
    // Platform geographic position
    option (swe.definition) = "http://sensorml.com/ont/swe/property/Location";
    option (swe.referenceFrame) = "http://www.opengis.net/def/crs/EPSG/0/4979";

    double lat = 1 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/GeodeticLatitude",
      (swe.uomCode) = "deg",
      (swe.axisID) = "Lat"
    ];
    double lon = 2 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/Longitude",
      (swe.uomCode) = "deg",
      (swe.axisID) = "Lon"
    ];
    double h = 3 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/HeightAboveEllipsoid",
      (swe.uomCode) = "m",
      (swe.axisID) = "h"
    ];
  }
  TangentPointPosition position = 4;

  message YawPitchRollAngles {
    // Euler angles with order of rotation yaw/pitch/roll in rotating frame
    option (swe.definition) = "http://sensorml.com/ont/swe/property/EulerAngles";
    option (swe.referenceFrame) = "http://www.opengis.net/def/cs/OGC/0/ENU";

    float yaw = 1 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/YawAngle",
      (swe.uomCode) = "deg",
      (swe.axisID) = "Z"
    ];
    float pitch = 2 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/PitchAngle",
      (swe.uomCode) = "deg",
      (swe.axisID) = "Y"
    ];
    float roll = 3 [
      (swe.definition) = "http://sensorml.com/ont/swe/property/RollAngle",
      (swe.uomCode) = "deg",
      (swe.axisID) = "X"
    ];
  }
  YawPitchRollAngles angles = 5;
}