Fix altitude in examples
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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)?;
|
||||
|
||||
|
Reference in New Issue
Block a user