Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get the latitude of aircraft #30

Open
lanceji opened this issue Mar 2, 2020 · 4 comments
Open

can not get the latitude of aircraft #30

lanceji opened this issue Mar 2, 2020 · 4 comments
Assignees

Comments

@lanceji
Copy link

lanceji commented Mar 2, 2020

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
Copy link
Author

lanceji commented Mar 2, 2020

The plane stay at the parking spot

@jaurenq
Copy link
Collaborator

jaurenq commented Mar 2, 2020

@lanceji can you post here some of the log output? A minute's worth or so?

@jaurenq jaurenq self-assigned this Mar 2, 2020
@lanceji
Copy link
Author

lanceji commented Mar 3, 2020

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.

20200303124251
mytextplugin.zip
xpnet.log

@bm98
Copy link

bm98 commented May 2, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants