FGAIShip::update(dt);
//automatic turn into wind with a target wind of 25 kts otd
- //SG_LOG(SG_GENERAL, SG_ALERT, "AICarrier: MPControl " << MPControl );
- if (!MPControl){
+ //SG_LOG(SG_GENERAL, SG_ALERT, "AICarrier: MPControl " << MPControl << " AIControl " << AIControl);
+ if (!MPControl && AIControl){
if(turn_to_launch_hdg){
TurnToLaunch();
props->tie("controls/start-pos-long-deg",
SGRawValueMethods<SGGeod,double>(pos, &SGGeod::getLongitudeDeg));
props->tie("controls/mp-control",
- SGRawValuePointer<bool>(&MPControl));
- props->tie("velocities/speed-kts",
- SGRawValuePointer<double>(&speed));
+ SGRawValuePointer<bool>(&MPControl));
+ props->tie("controls/ai-control",
+ SGRawValuePointer<bool>(&AIControl));
props->tie("environment/surface-wind-speed-true-kts",
SGRawValuePointer<double>(&wind_speed_kts));
props->tie("environment/surface-wind-from-true-degs",
SGRawValuePointer<double>(&rel_wind_speed_kts));
props->tie("environment/in-to-wind",
SGRawValuePointer<bool>(&in_to_wind));
- props->tie("controls/flols/wave-off-lights",
- SGRawValuePointer<bool>(&wave_off_lights));
+ //props->tie("controls/flols/wave-off-lights",
+ // SGRawValuePointer<bool>(&wave_off_lights));
props->tie("controls/elevators",
SGRawValuePointer<bool>(&elevators));
props->tie("surface-positions/elevators-pos-norm",
props->untie("controls/flols/distance-m");
props->untie("controls/flols/angle-degs");
props->untie("controls/turn-to-launch-hdg");
- props->untie("velocities/speed-kts");
props->untie("environment/wind-speed-true-kts");
props->untie("environment/wind-from-true-degs");
props->untie("environment/rel-wind-from-degs");
props->untie("environment/rel-wind-speed-kts");
props->untie("environment/in-to-wind");
- props->untie("controls/flols/wave-off-lights");
+ //props->untie("controls/flols/wave-off-lights");
props->untie("controls/elevators");
props->untie("surface-positions/elevators-pos-norm");
props->untie("controls/constants/elevators/trans-time-secs");
props->untie("controls/constants/jbd/trans-time-s");
props->untie("controls/jbd-time-constant");
props->untie("controls/mp-control");
+ props->untie("controls/ai-control");
props->untie("controls/turn-to-recovery-hdg");
props->untie("controls/turn-to-base-course");
}
rel_wind = rel_wind_from_deg - hdg;
SG_NORMALIZE_RANGE(rel_wind, -180.0, 180.0);
+ //set in to wind property
+ InToWind();
+
//switch the wave-off lights
- if (InToWind())
- wave_off_lights = false;
- else
- wave_off_lights = true;
+ //if (InToWind())
+ // wave_off_lights = false;
+ //else
+ // wave_off_lights = true;
// cout << "rel wind: " << rel_wind << endl;