1
0
Fork 0

Remove the unecessary distinction between waypoints of the core approach and waypoints of the missed approach procedure

This commit is contained in:
daveluff 2009-10-27 00:32:57 +00:00 committed by Tim Moore
parent 0112b24540
commit f696c541be
3 changed files with 2 additions and 18 deletions

View file

@ -650,7 +650,6 @@ void KLN89AptPage::EntPressed() {
GPSWaypoint* wp = new GPSWaypoint;
*wp = *(_approachRoutes[_curIaf]->waypoints[0]); // Need to make copies here since we're going to alter ID and type sometimes
string iafid = wp->id;
//wp->id += 'i';
_kln89->_approachFP->waypoints.push_back(wp);
for(unsigned int i=0; i<_IAP.size(); ++i) {
if(_IAP[i]->id != iafid) { // Don't duplicate waypoints that are part of the initial fix list and the approach procedure list.
@ -666,11 +665,6 @@ void KLN89AptPage::EntPressed() {
_kln89->_approachFP->waypoints.push_back(wp);
}
}
// Only add 1 missed approach procedure waypoint for now. I think this might be standard always anyway.
wp = new GPSWaypoint;
*wp = *_MAP[0];
//wp->id += 'h';
_kln89->_approachFP->waypoints.push_back(wp);
_iafDialog = false;
_addDialog = true;
_maxULinePos = _kln89->_approachFP->waypoints.size() + 1;
@ -719,11 +713,9 @@ void KLN89AptPage::EntPressed() {
} else if(_uLinePos > 4) {
_approachRoutes.clear();
_IAP.clear();
_MAP.clear();
_curIaf = 0;
_approachRoutes = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_approachRoutes;
_IAP = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_IAP;
_MAP = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_MAP;
_curIap = _uLinePos - 5; // TODO - handle the start of list ! no. 1, and the end of list not sequential!
_uLinePos = 1;
if(_approachRoutes.size() > 1) {
@ -749,12 +741,6 @@ void KLN89AptPage::EntPressed() {
_kln89->_approachFP->waypoints.push_back(wp);
}
}
// Only add 1 missed approach procedure waypoint for now. I think this might be standard always anyway.
wp = new GPSWaypoint;
*wp = *_MAP[0];
//wp->id += 'h';
_kln89->_approachFP->waypoints.push_back(wp);
_addDialog = true;
_maxULinePos = 1;
}

View file

@ -254,7 +254,6 @@ void DCLGPS::init() {
iap->_rwyStr = "12";
iap->_approachRoutes.clear();
iap->_IAP.clear();
iap->_MAP.clear();
// -------
wp = new GPSWaypoint;
wp->id = "GOBBS";
@ -324,7 +323,7 @@ void DCLGPS::init() {
if(cwp) {
*wp = *cwp;
wp->appType = GPS_MAHP;
iap->_MAP.push_back(wp);
iap->_IAP.push_back(wp);
} else {
//cout << "Unable to find waypoint " << wp->id << '\n';
}

View file

@ -143,8 +143,7 @@ public:
vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
// NOTE: It is an assumption in the code that uses this that there is a unique IAF per approach route.
vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
// _IAP includes the FAF and MAF.
vector<GPSWaypoint*> _MAP; // The missed approach procedure (doesn't include the MAF).
// _IAP includes the FAF and MAF, and the missed approach waypoints.
};
typedef vector < FGIAP* > iap_list_type;