]> git.mxchange.org Git - flightgear.git/commitdiff
Remove the unecessary distinction between waypoints of the core approach and waypoint...
authordaveluff <daveluff>
Tue, 27 Oct 2009 00:32:57 +0000 (00:32 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 27 Oct 2009 21:21:52 +0000 (22:21 +0100)
src/Instrumentation/KLN89/kln89_page_apt.cxx
src/Instrumentation/dclgps.cxx
src/Instrumentation/dclgps.hxx

index db4a8c115fcb611c15f1312692e521656b0f52d6..83f0bc3b0a2d0df1dfcf82f0fe6258316c42300d 100644 (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;
                        }
index 4a2ccabf389538aa9978682901af36cda7a51717..6feb0a286b92394a6c7739560a30150ca22bc2d2 100644 (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';
        }
index 9594304e6e2ef60bef2dac4de7e1822d3d4e88bd..76dd764ddea020bdc6d3cd82c614202d78fa0828 100644 (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;