From a9fed7b72cc00ae55028763719c6cd68d91007bd Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Tue, 29 Oct 2024 15:40:54 -0300 Subject: [PATCH] changed float type of lat/long payload --- src/structs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structs.rs b/src/structs.rs index 725434c..30a4435 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -3,9 +3,9 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize, Clone)] pub struct LocationPayload { - pub latitude: f32, - pub longitude: f32, - pub altitude: f32, + pub latitude: f64, + pub longitude: f64, + pub altitude: f64, pub bearing: f32, } @@ -27,7 +27,7 @@ impl IntoMessage for LocationPayload { impl FromArma for LocationPayload { fn from_arma(data: String) -> Result { - let (latitude, longitude, altitude, bearing) = <(f32, f32, f32, f32)>::from_arma(data)?; + let (latitude, longitude, altitude, bearing) = <(f64, f64, f64, f32)>::from_arma(data)?; Ok(Self { latitude, longitude,