October 28, 200817 yr My goal is to update the GPS flight plan (add, remove waypoints) using C++ code. I used the code sample of the SDK as a base, and I coded a very simple piece of code that is supposed to update the existing flight plan with THE SAME flight plan.The code looks like this:gpsrequest->dwUpdateRequest = 2;gpsrequest->vPosition = gpsinfo->vPosition;gpsrequest->bIsFlightPlanAvailable = TRUE;gpsrequest->bIsDirectTo = FALSE;gpsrequest->lNextWp = gpsinfo->lNextWp;gpsrequest->lWpCounts = gpsinfo->lWpCounts;for (UINT32 i=0; i < gpsrequest->lWpCounts; i++) gpsrequest->pWpData = gpsinfo->pWpData;As you can see, the 'gpsrequest' structure is the mirror of the 'gpsinfo' structure that describes the current flight plan. When this code is executed, the flight plan is still there, but all the waypoint names have disappeared !!Do you know why?Do you know how I can edit the existing flight plan without loosing the waypoint names?Any info is welcome !!Eric My Web Site
October 28, 200817 yr Author Commercial Member You can't. Ed Wilson Mindstar AviationMy Playland - I69
October 28, 200817 yr Interesting...In this case, I wonder why Microsoft has provided this code sample in the SDK. But it is not the first time Microsot takes us on an a way that leads nowhere...Eric My Web Site
October 28, 200817 yr Author Commercial Member That example has been around since FS2002. Ed Wilson Mindstar AviationMy Playland - I69
October 28, 200817 yr Do you mean the example was working in FS2002 and it doesn't work in FS2004? This would be surprising... The GPS system has not changed much between FS2002 and 2004.But who cares? The fact is that the code doesn't work, that's it.Eric (disappointed) My Web Site
October 29, 200817 yr I can also say the code that lets you READ the GPS flight plan is from FS2002 and it still works perfect, even with FSX... My Web Site
Create an account or sign in to comment