1 // kln89_page_*.[ch]xx - this file is one of the "pages" that
2 // are used in the KLN89 GPS unit simulation.
4 // Written by David Luff, started 2005.
6 // Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef _KLN89_PAGE_APT
25 #define _KLN89_PAGE_APT
33 unsigned short int freq;
36 class KLN89AptPage : public KLN89Page {
39 KLN89AptPage(KLN89* parent);
42 void Update(double dt);
52 void SetId(const string& s);
55 // Update the cached airport details
56 void UpdateAirport(const string& id);
63 vector<FGRunway*> _aptRwys;
64 vector<AptFreq> _aptFreqs;
67 unsigned int _curIap; // The index into _iaps of the IAP we are currently selecting
68 vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
69 vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
70 // _IAP includes the FAF and MAF.
71 vector<GPSWaypoint*> _MAP; // The missed approach procedure (doesn't include the MAF).
72 unsigned int _curIaf; // The index into _approachRoutes of the IAF we are currently selecting, and then remembered as the one we selected
74 // Position in rwy pages
75 unsigned int _curRwyPage;
76 unsigned int _nRwyPages;
78 // Position in freq pages
79 unsigned int _curFreqPage;
80 unsigned int _nFreqPages;
82 // Position in IAP list (0-based number of first IAP displayed)
83 unsigned int _iapStart;
84 // ditto for IAF list (can't test this since can't find an approach with > 3 IAF at the moment!)
85 unsigned int _iafStart;
86 // ditto for list of approach fixes when asking load confirmation
89 // Various IAP related dialog states that we might need to remember
95 #endif // _KLN89_PAGE_APT