1
0
Fork 0

Vivian MEAZZA:

"Bug Fix - amend the code so that JSBSIm can have more than one tanker in
the environment at the same time. A nasal script has to be added to each
aar-capable JSBSim model to complete this fix."
This commit is contained in:
mfranz 2006-05-22 20:18:40 +00:00
parent e2c195f3a6
commit d47e4ce0bd
2 changed files with 11 additions and 10 deletions

View file

@ -105,7 +105,7 @@ void FGAIAircraft::readFromScenario(SGPropertyNode* scFileNode) {
bool FGAIAircraft::init() {
refuel_node = fgGetNode("systems/refuel/contact", true);
//refuel_node = fgGetNode("systems/refuel/contact", true);
return FGAIBase::init();
}
@ -412,7 +412,7 @@ void FGAIAircraft::Run(double dt) {
}
// match pitch angle to vertical speed
if (vs > 0){
if (vs > 0) {
pitch = vs * 0.005;
} else {
pitch = vs * 0.002;
@ -433,7 +433,7 @@ void FGAIAircraft::Run(double dt) {
refuel_node->setBoolValue(true);
contact = true;
} else {
refuel_node->setBoolValue(false);
//refuel_node->setBoolValue(false);
contact = false;
}
} else {
@ -777,7 +777,7 @@ void FGAIAircraft::ProcessFlightPlan( double dt, time_t now ) {
<< "pos : " << pos.lat() << ", " << pos.lon()
<< "waypoint " << curr->latitude << ", " << curr->longitude << endl;
cerr << "waypoint name " << curr->name;
exit(1); // FIXME
exit(1); // FIXME
}
double speed_diff = speed - prevSpeed;

View file

@ -44,7 +44,7 @@ FGAIMultiplayer::~FGAIMultiplayer() {
}
bool FGAIMultiplayer::init() {
refuel_node = fgGetNode("systems/refuel/contact", true);
//refuel_node = fgGetNode("systems/refuel/contact", true);
isTanker = false; // do this until this property is
// passed over the net
@ -52,7 +52,7 @@ bool FGAIMultiplayer::init() {
string str2 = "MOBIL";
unsigned int loc1= str1.find( str2, 0 );
if ( (loc1 != string::npos && str2 != "") /*|| mCallSign == "mpdummy" */) {
if ( (loc1 != string::npos && str2 != "") ){
// cout << " string found " << str2 << " in " << str1 << endl;
isTanker = true;
// cout << "isTanker " << isTanker << " " << mCallSign <<endl;
@ -322,12 +322,13 @@ void FGAIMultiplayer::update(double dt)
if ( isTanker) {
if ( (range_ft2 < 250.0 * 250.0)
/*&& (y_shift > 0.0) && (elevation > 0.0)*/ ) {
refuel_node->setBoolValue(true);
if ( (range_ft2 < 250.0 * 250.0) &&
(y_shift > 0.0) &&
(elevation > 0.0) ){
// refuel_node->setBoolValue(true);
contact = true;
} else {
refuel_node->setBoolValue(false);
// refuel_node->setBoolValue(false);
contact = false;
}
} else {