can not get the latitude of aircraft
Opened this issue · 4 comments
lanceji commented
When I use the following code, the airplane position keeps changing every second.
why?
private FlightLoopTime OnFlightLoopHook(TimeSpan elapsedTimeSinceLastCall, TimeSpan elapsedTimeSinceLastFlightLoop, int counter)
{
double dAirplaneLatitude = m_api.Data.GetDouble("sim/flightmodel/position/latitude").Value;
m_api.Log.Log("latitude:" + dAirplaneLatitude.ToString());
return FlightLoopTime.FromSeconds(1.0f);
}
lanceji commented
The plane stay at the parking spot
lanceji commented
The upper left corner of the picture is the location of the aircraft. The location of the log output does not seem to be correct. The .zip file is the project.
Please help me.....thank you very much.
bm98 commented
Hi,
tried the same but failed - use GetFloat() the XPlane API servs both. I.e. GetFloat works on doubles too.
But GetDouble() in this (otherwise great working..) library seems to be bugged.
Regs