Jump to content
Sign in to follow this  
phjvh

Deviation between aircraft position and the flight plan...

Recommended Posts

Guest coal

Hello everybody,I compiled the SDK gauge with VS.net, and then I tried to use part of the code to draw a flight plan route.Everything seems to work fine when the flight plan has short legs, but the longer the legs, the larger deviation between aircraft position and the flight plan line in the MFD. The aircraft get closer to the FLP line route when reaching the waypoint, that's to say, the plane always pass over the waypoints, but it doesn't follow the line in long legs of the flight plans.This is the part of the MSFS SDK C code I use:for (i = 0; i < gpsinfo->lWpCounts; i++) { if (gpsinfo->pWpData && gpsinfo->pWpData.dwSize == sizeof (GPS_WP_INFO)) { POINT p = ScalePoint (&gpsinfo->vPosition, &gpsinfo->pWpData.vPosition, gpsinfo->dGroundHeading, dx, dy); p.x += cx; p.y += cy; graphics.DrawEllipse(&pen_magenta_1, p.x - 4, p.y - 4, 8*dx, 8*dy); graphics.DrawLine(&pen_magenta_1, prevp.x, prevp.y, p.x, p.y); prevp = p; } }Scalepoint, variables and pointers are defined as they are in MSFS SDK.Any help will be very appreciate.Daniel

Share this post


Link to post
Share on other sites

Hi,Don't know this code type, but may be this can help:It looks like the lines between the waypoints are straight, while the plane follows a curved one, the great circle route.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...