mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +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)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
pub struct LocationPayload {
|
pub struct LocationPayload {
|
||||||
pub latitude: f32,
|
pub latitude: f64,
|
||||||
pub longitude: f32,
|
pub longitude: f64,
|
||||||
pub altitude: f32,
|
pub altitude: f64,
|
||||||
pub bearing: f32,
|
pub bearing: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ impl IntoMessage for LocationPayload {
|
|||||||
|
|
||||||
impl FromArma for LocationPayload {
|
impl FromArma for LocationPayload {
|
||||||
fn from_arma(data: String) -> Result<LocationPayload, FromArmaError> {
|
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 {
|
Ok(Self {
|
||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
|
|||||||
Reference in New Issue
Block a user