Fix altitude in examples

This commit is contained in:
Mihai Dinculescu
2022-10-19 20:07:26 +01:00
parent 3a7237addf
commit 60b73c1557
5 changed files with 5 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ struct GpsData {
lat: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
lon: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
#[simconnect(name = "PLANE ALTITUDE", unit = "feet")]
alt: f64,
}

View File

@@ -10,7 +10,7 @@ struct GpsData {
lat: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
lon: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
#[simconnect(name = "PLANE ALTITUDE", unit = "feet")]
alt: f64,
}

View File

@@ -10,7 +10,7 @@ struct GpsData {
lat: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
lon: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
#[simconnect(name = "PLANE ALTITUDE", unit = "feet")]
alt: f64,
}

View File

@@ -12,7 +12,7 @@ struct GpsData {
lat: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
lon: f64,
#[simconnect(name = "PLANE LONGITUDE", unit = "degrees")]
#[simconnect(name = "PLANE ALTITUDE", unit = "feet")]
alt: f64,
}

View File

@@ -16,7 +16,7 @@ impl SimConnectObjectExt for GpsData {
fn register(client: &mut SimConnect, id: u32) -> Result<(), SimConnectError> {
client.add_to_data_definition(id, "PLANE LATITUDE", "degrees", DataType::Float64)?;
client.add_to_data_definition(id, "PLANE LONGITUDE", "degrees", DataType::Float64)?;
client.add_to_data_definition(id, "PLANE ALTITUDE", "meters", DataType::Float64)?;
client.add_to_data_definition(id, "PLANE ALTITUDE", "feet", DataType::Float64)?;
client.request_data_on_sim_object(id, Period::Second, Condition::None, 0)?;