_state->posLocalToGlobal(lWinchPos,_winchPos);
_towLength=_winchInitialTowLength;
- fgGetNode("/sim/messages/pilot", true)->setStringValue("coonected to winch!");
+ fgSetString("/sim/messages/pilot", "Connected to winch!");
_open=false;
_node->setBoolValue("broken",false);
{
std::stringstream message;
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
- <<", I am on your hook, distance "<<Math::sqrt(bestdist)<<"m";
- fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
+ <<", I am on your hook, distance "<<Math::sqrt(bestdist)<<" meter.";
+ fgSetString("/sim/messages/pilot", message.str().c_str());
}
else
{
std::stringstream message;
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
- <<": I am on your hook, distance "<<Math::sqrt(bestdist)<<"m";
- fgGetNode("/sim/messages/ai-plane", true)->setStringValue(message.str().c_str());
+ <<": I am on your hook, distance "<<Math::sqrt(bestdist)<<" meter.";
+ fgSetString("/sim/messages/ai-plane", message.str().c_str());
}
if (running_as_autoconnect)
_isSlave=true;
else
if (!running_as_autoconnect)
{
- fgGetNode("/sim/messages/atc", true)->setStringValue("Sorry, no aircraft for aerotow!");
+ fgSetString("/sim/messages/atc", "Sorry, no aircraft for aerotow!");
}
}
if (_dist>_towLength*1.00001)
{
std::stringstream message;
- message<<"Could not lock Hitch (tow length is insufficient) on hitch '"
+ message<<"Could not lock hitch (tow length is insufficient) on hitch '"
<<_node->getPath()<<"' !";
- fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
+ fgSetString("/sim/messages/pilot", message.str().c_str());
_open=true;
return;
}
if (_node->getBoolValue("broken",false)&&_open)
message<<"Oh no, the tow is broken";
else
- message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"' !";
- fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
+ message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"'!";
+ fgSetString("/sim/messages/pilot", message.str().c_str());
_oldOpen=_open;
}
std::stringstream message;
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
<<": I have released the tow!";
- fgGetNode("/sim/messages/ai-plane", true)->setStringValue(message.str().c_str());
+ fgSetString("/sim/messages/ai-plane", message.str().c_str());
}
}
}