FlightGear next
LevelDXML.hxx
Go to the documentation of this file.
1#ifndef FG_NAV_LEVELDXML_HXX
2#define FG_NAV_LEVELDXML_HXX
3
4class FGAirport;
5class SGPath;
6
7#include <simgear/xml/easyxml.hxx>
8#include <simgear/misc/sg_path.hxx>
10
11namespace flightgear
12{
13
14class NavdataVisitor : public XMLVisitor {
15public:
16 NavdataVisitor(FGAirport* aApt, const SGPath& aPath);
17
18protected:
19 virtual void startXML ();
20 virtual void endXML ();
21 virtual void startElement (const char * name, const XMLAttributes &atts);
22 virtual void endElement (const char * name);
23 virtual void data (const char * s, int len);
24 virtual void pi (const char * target, const char * data);
25 virtual void warning (const char * message, int line, int column);
26 virtual void error (const char * message, int line, int column);
27
28private:
29 Waypt* buildWaypoint(RouteBase* owner);
30 void processRunways(ArrivalDeparture* aProc, const XMLAttributes &atts);
31
32 void finishApproach();
33 void finishSid();
34 void finishStar();
35
36 FGAirport* _airport;
37 SGPath _path;
38 std::string _text;
39
40 SID* _sid;
41 STAR* _star;
42 Approach* _approach;
43 Transition* _transition;
44 Procedure* _procedure;
45
46 WayptVec _waypoints;
47 WayptVec _transWaypts;
48
49 std::string _wayptName;
50 std::string _wayptType;
51 std::string _ident; // id of segment under construction
52 std::string _transIdent;
53 double _longitude, _latitude, _altitude, _speed;
54 RouteRestriction _altRestrict;
55 bool _overflightWaypt;
56
57 double _holdRadial; // inbound hold radial, or -1 if radial is 'inbound'
58 double _holdTD;
59 bool _holdRighthanded;
60 bool _holdDistance; // true, TD is distance in nm; false, TD is time in seconds
61
62 double _courseOrHeading, _radial, _dmeDistance;
63 bool _courseFlag;
64};
65
66}
67
68#endif
Describe an approach procedure, including the missed approach segment.
NavdataVisitor(FGAirport *aApt, const SGPath &aPath)
Definition LevelDXML.cxx:23
virtual void warning(const char *message, int line, int column)
virtual void startElement(const char *name, const XMLAttributes &atts)
Definition LevelDXML.cxx:42
virtual void data(const char *s, int len)
virtual void error(const char *message, int line, int column)
virtual void endElement(const char *name)
Encapsulate a transition segment.
Definition procedure.hxx:70
Abstract base class for waypoints (and things that are treated similarly by navigation systems).
Definition route.hxx:105
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
Definition Addon.cxx:53
const char * name
std::vector< WayptRef > WayptVec
RouteRestriction
Definition route.hxx:70
static const double pi
Definition sview.cxx:59