FGATC::~FGATC() {
}
-void FGATC::Update() {
+void FGATC::Update(double dt) {
}
void FGATC::AddPlane(string pid) {
SG_USING_STD(string);
SG_USING_STD(ios);
+enum plane_type {
+ UNKNOWN,
+ GA_SINGLE,
+ GA_HP_SINGLE,
+ GA_TWIN,
+ GA_JET,
+ MEDIUM,
+ HEAVY,
+ MIL_JET
+};
+
+// PlaneRec - a structure holding ATC-centric details of planes under control
+// This might move or change eventually
+struct PlaneRec {
+ plane_type type;
+ string callsign;
+ int squawkcode;
+};
+
// Possible types of ATC type that the radios may be tuned to.
// INVALID implies not tuned in to anything.
enum atc_type {
// DCL - new experimental ATC data store
struct ATCData {
atc_type type;
+ // I've deliberately used float instead of double here to keep the size down - we'll be storing thousands of these in memory.
+ // In fact, we could probably ditch x, y and z and generate on the fly as needed.
+ // On the other hand, we'll probably end up reading this data directly from the DAFIF eventually anyway!!
float lon, lat, elev;
float x, y, z;
//int freq;
virtual ~FGATC();
// Run the internal calculations
- virtual void Update();
+ virtual void Update(double dt);
// Add plane to a stack
virtual void AddPlane(string pid);
// ============================================================================
// the main update function
// ============================================================================
-void FGApproach::Update() {
+void FGApproach::Update(double dt) {
const int max_trans = 20;
FGTransmission tmissions[max_trans];
void Init();
- void Update();
+ void Update(double dt);
// Add new plane to stack if not already registered
// Input: pid - id of plane (name)
}
// Main update function - checks whether we are displaying or not the correct message.
-void FGATIS::Update() {
+void FGATIS::Update(double dt) {
if(display) {
if(displaying) {
// Check if we need to update the message
~FGATIS(void);
//run the ATIS instance
- void Update(void);
+ void Update(double dt);
//Indicate that this instance should be outputting to the ATC display
inline void SetDisplay(void) {display = true;}