Joao Pereira 1256632 Posted April 9, 2014 at 11:42 PM Posted April 9, 2014 at 11:42 PM So, i print to a file all the points in the Extracted Route like this EuroScopePlugIn::CAircraftExtractedRoute ext_route=Aircraft.GetExtractedRoute(); for(int j=0;j textfile< and for a given airplane it's the following: BEDRA 4520N 4027N 3530N 3033N 2536N 2038N 1340N Airplane is on fix BEDRA, as it was drew there. So why is it that when i do this: ext_route.GetPointName(ext_route.GetPointsCalculatedIndex()) the given fix is 4520N? The function GetPointsCaldulatedIndex says on EursocopePlugIn: " Return : // The index of point in the extracted route that edge is the // closest to the actual plane position. The return value is // between 0 and point number - 2. // The value may be -1 indicating invalid state. //-----------------------------------------------------------------" And also, what's the meaning of this: " const char * GetPointName ( int Index ) const ; //----------------------------------------------------------------- // Parameters : // => Index - the index of the requested point. It must be // between 0 and point number - 1. // // Return : // The name of the point in the extracted route array. //-----------------------------------------------------------------" It must be between 0 and point number - 1?? Thank you in advance Link to comment Share on other sites More sharing options...
Gergely Csernak Posted April 13, 2014 at 01:31 PM Posted April 13, 2014 at 01:31 PM Joao, ES calculates the points along the route from the flight plan. It puts them to an array. When we have n points, the indexes are 0, 1, ... n-1. If you have n points then it defines n-1 edges between them. The edge indexes are therefore 0, 1, ... n-2. Edge 0 is between point 0 and 2, ... edge n-2 is between points n-2 and n-1. When ES have these points it select the closest one to the plane and uses its index at GetPointsCaldulatedIndex. Gergely. EuroScope developer Link to comment Share on other sites More sharing options...
Joao Pereira 1256632 Posted April 14, 2014 at 09:20 PM Author Posted April 14, 2014 at 09:20 PM I'm sorry Gergely, i'm not following. Firstly: when you say this Edge 0 is between point 0 and 2, ... edge n-2 is between points n-2 and n-1. You said first edge is between point 0 and 2 so by order of logic, do you mean "edge n-2 is between points n-1 and n-3" ? Secondly:so you are telling me that ES defines edges between points is the array of points. So GetPointsCaldulatedIndex gives the index of the closest edge? Why is it a point then.. Thank you for the help Link to comment Share on other sites More sharing options...
Gergely Csernak Posted May 3, 2014 at 08:15 AM Posted May 3, 2014 at 08:15 AM Surely it is a typing error. The first edge is between point 0 and 1. The name GetPointsCaldulatedIndex is just based on GetPointsNumber. Gergely. EuroScope developer Link to comment Share on other sites More sharing options...
Recommended Posts