April 16, 200521 yr 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
April 17, 200521 yr Author 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" Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment