mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 18:23:28 +00:00
changed float type of lat/long payload
This commit is contained in:
@@ -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<LocationPayload, FromArmaError> {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user