} else if ( cname == "number" ) {
num = child->getIntValue();
} else {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in gps config logic" );
+ SG_LOG( SG_INSTR, SG_WARN, "Error in gps config logic" );
if ( name.length() ) {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+ SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
}
}
}
FGAirport a;
//cout << "Airport found" << endl;
a = globals->get_airports()->search(longitude_deg, latitude_deg, false);
- _wp1_ID_node->setStringValue(a.id.c_str());
- wp1_longitude_deg = a.longitude;
- wp1_latitude_deg = a.latitude;
- _wp1_name_node->setStringValue(a.name.c_str());
+ _wp1_ID_node->setStringValue(a._id.c_str());
+ wp1_longitude_deg = a._longitude;
+ wp1_latitude_deg = a._latitude;
+ _wp1_name_node->setStringValue(a._name.c_str());
_get_nearest_airport_node->setBoolValue(false);
- _last_wp1_ID = wp1_ID = a.id.c_str();
+ _last_wp1_ID = wp1_ID = a._id.c_str();
}
// If the waypoint 0 ID has changed, try to find the new ID
if (waypont_type == "airport") {
FGAirport a;
a = globals->get_airports()->search( wp0_ID );
- if ( a.id == wp0_ID ) {
+ if ( a._id == wp0_ID ) {
//cout << "Airport found" << endl;
- wp0_longitude_deg = a.longitude;
- wp0_latitude_deg = a.latitude;
- _wp0_name_node->setStringValue(a.name.c_str());
+ wp0_longitude_deg = a._longitude;
+ wp0_latitude_deg = a._latitude;
+ _wp0_name_node->setStringValue(a._name.c_str());
}
}
else if (waypont_type == "nav") {
if (waypont_type == "airport") {
FGAirport a;
a = globals->get_airports()->search( wp1_ID );
- if ( a.id == wp1_ID ) {
+ if ( a._id == wp1_ID ) {
//cout << "Airport found" << endl;
- wp1_longitude_deg = a.longitude;
- wp1_latitude_deg = a.latitude;
- _wp1_name_node->setStringValue(a.name.c_str());
+ wp1_longitude_deg = a._longitude;
+ wp1_latitude_deg = a._latitude;
+ _wp1_name_node->setStringValue(a._name.c_str());
}
}
else if (waypont_type == "nav") {
popWp->setBoolValue(false);
route->delete_first();
+ _route->removeChild("Waypoint", 0, false);
}
} else {