// NOTE - we don't need to do the contact tower bit unless we have separate tower and ground
string trns = g->plane.callsign;
trns += " contact Tower ";
- double f = globals->get_ATC_mgr()->GetFrequency(ident, TOWER);
+ double f = globals->get_ATC_mgr()->GetFrequency(ident, TOWER) / 100.0;
char buf[10];
- sprintf(buf, "%f", f);
+ sprintf(buf, "%.2f", f);
trns += buf;
if(display) {
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
}
++ground_traffic_itr;
}
+
+ // Call the base class update for the response time handling.
+ FGATC::Update(dt);
}
// Figure out which runways are active.
//cout << "GetRwyDetails called" << endl;
// Based on the airport-id and wind get the active runway
- SGPath path( globals->get_fg_root() );
- path.append( "Airports" );
- path.append( "runways.mk4" );
- FGRunways r_ways( path.c_str() );
//wind
double hdg = wind_from_hdg->getDoubleValue();
//cout << "Heading = " << hdg << '\n';
FGRunway runway;
- bool rwyGood = r_ways.search(ident, int(hdg), &runway);
+ bool rwyGood = globals->get_runways()->search(ident, int(hdg), &runway);
if(rwyGood) {
activeRwy = runway.rwy_no;
rwy.rwyID = runway.rwy_no;