Skip to content

Commit 465168e

Browse files
authored
Merge pull request #201 from BluEye-Robotics/av/magnetic-declination
Add MagneticDeclination msg definition
2 parents d6aca3a + 79e3f32 commit 465168e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

protobuf_definitions/message_formats.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,20 @@ message Attitude {
376376
float yaw = 3; // Yaw angle (-180°..180°).
377377
}
378378

379+
// Location source used in magnetic declination look-up.
380+
enum LocationSource {
381+
LOCATION_SOURCE_UNSPECIFIED = 0; // The position is not set.
382+
LOCATION_SOURCE_USER = 1; // Typically pilot device GPS.
383+
LOCATION_SOURCE_DRONE = 2; // Blueye GPS, DVL, or a USBL system.
384+
}
385+
386+
// The Magnetic Declination status used to get true North compass readings based on location.
387+
message MagneticDeclination {
388+
LocationSource location_source = 1; // Location source used for the magnetic declination look-up in geographiclib.
389+
float declination = 2; // The declination which is applied to the yaw field in the Attitude msg.
390+
LatLongPosition location = 3; // The location used for the magnetic declination look-up.
391+
}
392+
379393
// Drone altitude over seabed, typically obtained from a DVL.
380394
message Altitude {
381395
float value = 1; // Drone altitude over seabed (m).

protobuf_definitions/telemetry.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ message AttitudeTel {
1414
Attitude attitude = 1; // The attitude of the drone.
1515
}
1616

17+
// Current Magnetic Declination status. Used to get true North compass readings based on location.
18+
message MagneticDeclinationTel {
19+
MagneticDeclination magnetic_declination = 1; // The current magnetic declination status of the drone.
20+
}
21+
1722
// Receive the current altitude of the drone.
1823
message AltitudeTel {
1924
Altitude altitude = 1; // The altitude of the drone.

0 commit comments

Comments
 (0)