setMaxLong(scFileNode->getDoubleValue("max-long", 0));
setMinLong(scFileNode->getDoubleValue("min-long", 0));
setMPControl(scFileNode->getBoolValue("mp-control", false));
setMaxLong(scFileNode->getDoubleValue("max-long", 0));
setMinLong(scFileNode->getDoubleValue("min-long", 0));
setMPControl(scFileNode->getBoolValue("mp-control", false));
void FGAICarrier::update(double dt) {
// Now update the position and heading. This will compute new hdg and
// roll values required for the rotation speed computation.
void FGAICarrier::update(double dt) {
// Now update the position and heading. This will compute new hdg and
// roll values required for the rotation speed computation.
- } else if(OutsideBox() || returning ) {// check that the carrier is inside
- ReturnToBox(); // the operating box,
+ } else if(OutsideBox() || returning ) {// check that the carrier is inside
+ ReturnToBox(); // the operating box,
eyeWrtCarrier = ec2body.transform(eyeWrtCarrier);
// the eyepoints vector wrt the flols position
SGVec3d eyeWrtFlols = eyeWrtCarrier - flols_off;
eyeWrtCarrier = ec2body.transform(eyeWrtCarrier);
// the eyepoints vector wrt the flols position
SGVec3d eyeWrtFlols = eyeWrtCarrier - flols_off;
// now the angle, positive angles are upwards
if (fabs(dist) < SGLimits<float>::min()) {
angle = 0;
// now the angle, positive angles are upwards
if (fabs(dist) < SGLimits<float>::min()) {
angle = 0;
sAngle = SGMiscd::min(1, SGMiscd::max(-1, sAngle));
angle = SGMiscd::rad2deg(asin(sAngle));
}
sAngle = SGMiscd::min(1, SGMiscd::max(-1, sAngle));
angle = SGMiscd::rad2deg(asin(sAngle));
}
} else if (rel_wind > -7 && rel_wind < 45){
tgt_heading = wind_from_deg + 60;
} else if (rel_wind >=45 && rel_wind < 180){
tgt_heading = wind_from_deg + 45;
} else if (rel_wind > -7 && rel_wind < 45){
tgt_heading = wind_from_deg + 60;
} else if (rel_wind >=45 && rel_wind < 180){
tgt_heading = wind_from_deg + 45;