+ //try any mp tankers third, if we haven't found the tanker in the ai aircraft
+
+ if ( !_mobile_valid ) {
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker transmitter valid start " << _mobile_valid );
+
+ SGPropertyNode * branch = fgGetNode("ai/models", true);
+ vector<SGPropertyNode_ptr> mp_tanker = branch->getChildren("multiplayer");
+
+ number = mp_tanker.size();
+
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker number " << number );
+
+ if ( number > 0 ) { // don't do this if there are no MP aircraft
+ for ( i = 0; i < number; ++i ) {
+ string str6 ( mp_tanker[i]->getStringValue("callsign", ""));
+ SG_LOG( SG_INSTR, SG_DEBUG, "mp tanker callsign " << str6 );
+
+ SG_LOG( SG_INSTR, SG_DEBUG, "strings 1 " << str1 << " 5 " << str6 );
+ string::size_type loc1= str1.find( str6, 0 );
+ if ( loc1 != string::npos && str6 != "" ) {
+ SG_LOG( SG_INSTR, SG_DEBUG, " string found" );
+ _mobilePos = SGGeod::fromDegFt(
+ mp_tanker[i]->getDoubleValue("position/longitude-deg"),
+ mp_tanker[i]->getDoubleValue("position/latitude-deg"),
+ mp_tanker[i]->getDoubleValue("position/altitude-ft"));
+
+
+ _mobile_range_nm = mobile_tacan->get_range();
+ _mobile_bias = mobile_tacan->get_multiuse();
+ _mobile_name = mobile_tacan->name();
+ _mobile_ident = mobile_tacan->get_trans_ident();
+ _mobile_valid = true;
+
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker transmitter valid " << _mobile_valid );
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker name " << _mobile_name);
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp range " << _mobile_range_nm);
+ break;
+ } else {
+ _mobile_valid = false;
+ SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker transmitter invalid " << _mobile_valid );
+ }
+ }
+ }
+ }
+ } else {
+ _mobile_valid = false;
+ SG_LOG( SG_INSTR, SG_DEBUG, " mobile transmitter invalid " << _mobile_valid );
+ }