From 3e9e09431048ad2c57c38b7133d5d8899edc6f19 Mon Sep 17 00:00:00 2001 From: Juan Ruiz Date: Wed, 24 Apr 2024 11:22:49 +0200 Subject: [PATCH 1/3] action: add set_gps_origin --- protos/action/action.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/protos/action/action.proto b/protos/action/action.proto index 3ac5b9ab..37fe9a5f 100644 --- a/protos/action/action.proto +++ b/protos/action/action.proto @@ -160,6 +160,12 @@ service ActionService { * It is ephemeral, so not stored on the drone and does not survive a reboot. */ rpc SetCurrentSpeed(SetCurrentSpeedRequest) returns(SetCurrentSpeedResponse) {} + /* + * Set GPS Global Origin. + * + * Sets the GPS coordinates of the vehicle local origin (0,0,0) position. + */ + rpc SetGpsGlobalOrigin(SetGpsGlobalOriginRequest) returns(SetGpsGlobalOriginResponse) {} } message ArmRequest {} @@ -312,6 +318,15 @@ message SetCurrentSpeedResponse { ActionResult action_result = 1; } +message SetGpsGlobalOriginRequest { + double latitude_deg = 1; // Latitude (in degrees) + double longitude_deg = 2; // Longitude (in degrees) + float absolute_altitude_m = 3; // Altitude AMSL (in meters) +} +message SetGpsGlobalOriginResponse { + ActionResult action_result = 1; +} + // Result type. message ActionResult { // Possible results returned for action requests. From 95f03ae3768c7e763152eac38e16f9d1fff6eb3b Mon Sep 17 00:00:00 2001 From: Juan Ruiz Date: Wed, 24 Apr 2024 11:22:49 +0200 Subject: [PATCH 2/3] action: add set_gps_origin --- protos/action/action.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protos/action/action.proto b/protos/action/action.proto index 37fe9a5f..f0afd2ea 100644 --- a/protos/action/action.proto +++ b/protos/action/action.proto @@ -165,7 +165,11 @@ service ActionService { * * Sets the GPS coordinates of the vehicle local origin (0,0,0) position. */ +<<<<<<< HEAD rpc SetGpsGlobalOrigin(SetGpsGlobalOriginRequest) returns(SetGpsGlobalOriginResponse) {} +======= + rpc SetGpsGlobalOrigin(SetGpsGlobalOriginRequest) returns(SetGpsGlobalOriginResponse) { option (mavsdk.options.async_type) = SYNC; } +>>>>>>> action: add set_gps_origin } message ArmRequest {} From 928d68a475f67bf9a8e88b9ef5ed77a2908e7e27 Mon Sep 17 00:00:00 2001 From: Juan Ruiz Date: Wed, 24 Apr 2024 17:02:37 +0200 Subject: [PATCH 3/3] action.proto: fix unresolved conflict render SetGpsGlobalOrigin sync to match message definition --- protos/action/action.proto | 4 ---- 1 file changed, 4 deletions(-) diff --git a/protos/action/action.proto b/protos/action/action.proto index f0afd2ea..7d3c00af 100644 --- a/protos/action/action.proto +++ b/protos/action/action.proto @@ -165,11 +165,7 @@ service ActionService { * * Sets the GPS coordinates of the vehicle local origin (0,0,0) position. */ -<<<<<<< HEAD - rpc SetGpsGlobalOrigin(SetGpsGlobalOriginRequest) returns(SetGpsGlobalOriginResponse) {} -======= rpc SetGpsGlobalOrigin(SetGpsGlobalOriginRequest) returns(SetGpsGlobalOriginResponse) { option (mavsdk.options.async_type) = SYNC; } ->>>>>>> action: add set_gps_origin } message ArmRequest {}