Vivian MEAZZA:
"Preparations for an upgrade to Air-to-Air Refuelling to allow more than one tanker in the environment at a time. This will only work with YASim models. JSBSim models are unaffected by this change."
This commit is contained in:
parent
6c1be4fffb
commit
db22f457b5
2 changed files with 8 additions and 0 deletions
|
@ -111,14 +111,17 @@ void FGAIAircraft::bind() {
|
|||
props->tie("controls/gear/gear-down",
|
||||
SGRawValueMethods<FGAIAircraft,bool>(*this,
|
||||
&FGAIAircraft::_getGearDown));
|
||||
props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
|
||||
props->setStringValue("callsign", callsign.c_str());
|
||||
props->setStringValue("navaids/tacan/channel-ID", TACAN_channel_id.c_str());
|
||||
props->setBoolValue("tanker",isTanker);
|
||||
}
|
||||
|
||||
void FGAIAircraft::unbind() {
|
||||
FGAIBase::unbind();
|
||||
|
||||
props->untie("controls/gear/gear-down");
|
||||
props->untie("refuel/contact");
|
||||
}
|
||||
|
||||
|
||||
|
@ -426,9 +429,13 @@ void FGAIAircraft::Run(double dt) {
|
|||
(y_shift > 0.0) &&
|
||||
(elevation > 0.0) ) {
|
||||
refuel_node->setBoolValue(true);
|
||||
contact = true;
|
||||
} else {
|
||||
refuel_node->setBoolValue(false);
|
||||
contact = false;
|
||||
}
|
||||
} else {
|
||||
contact = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ private:
|
|||
bool reachedWaypoint;
|
||||
string callsign; // The callsign of this tanker.
|
||||
string TACAN_channel_id; // The TACAN channel of this tanker
|
||||
bool contact; // set if this tanker is within fuelling range
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue