diff --git a/Models/c172p.xml b/Models/c172p.xml index 5509ba16b..3844b6ba2 100644 --- a/Models/c172p.xml +++ b/Models/c172p.xml @@ -5195,13 +5195,8 @@ property-adjust -<<<<<<< HEAD - controls/engines/current-engine/mixture - 0.02 -======= controls/engines/engine[0]/mixture 0.02 ->>>>>>> Fix quadrants by removing active engines 0 1 0 diff --git a/Nasal/avionics.nas b/Nasal/avionics.nas index be7e59124..6fec66a48 100644 --- a/Nasal/avionics.nas +++ b/Nasal/avionics.nas @@ -132,14 +132,6 @@ aircraft.data.add( aircraft.data.add( "/controls/anti-ice/engine/carb-heat", "/controls/anti-ice/pitot-heat", - "/consumables/fuel/tank/selected", - "/consumables/fuel/tank[1]/selected", - "/sim/model/c172p/brake-parking", - "/controls/flight/flaps", - "/controls/flight/elevator-trim", - "/controls/engines/engine[0]/throttle", - "/controls/engines/engine[0]/mixture", - "/controls/engines/engine[0]/primer-lever", ); # Circuit breakers diff --git a/Nasal/c172p.nas b/Nasal/c172p.nas index 520f009ec..12dd40fda 100644 --- a/Nasal/c172p.nas +++ b/Nasal/c172p.nas @@ -3,6 +3,7 @@ ########################################## var autostart = func (msg=1) { + screen.log.write("Autostart", 1.0, 1.0, 0.8); if (getprop("/engines/engine[0]/running")) { if (msg) gui.popupTip("Engine already running", 5); @@ -12,11 +13,10 @@ var autostart = func (msg=1) { # Reset battery charge and circuit breakers electrical.reset_battery_and_circuit_breakers(); - # Filling fuel tanks + # Set fuel tanks setprop("/consumables/fuel/tank[0]/selected", 1); setprop("/consumables/fuel/tank[1]/selected", 1); - # Setting levers and switches for startup setprop("/controls/switches/magnetos", 3); setprop("/controls/engines/engine[0]/throttle", 0.2); @@ -54,9 +54,6 @@ var autostart = func (msg=1) { } } - # Setting flaps to 0 - setprop("/controls/flight/flaps", 0.0); - # Set the altimeter var pressure_sea_level = getprop("/environment/pressure-sea-level-inhg"); setprop("/instrumentation/altimeter/setting-inhg", pressure_sea_level); @@ -67,7 +64,6 @@ var autostart = func (msg=1) { # Pre-flight inspection setprop("/sim/model/c172p/cockpit/control-lock-placed", 0); - setprop("/sim/model/c172p/brake-parking", 0); setprop("/sim/model/c172p/securing/chock", 0); setprop("/sim/model/c172p/securing/cowl-plugs-visible", 0); setprop("/sim/model/c172p/securing/pitot-cover-visible", 0); @@ -616,7 +612,7 @@ setlistener("/sim/signals/fdm-initialized", func { # Use Nasal to make some properties persistent. does # not work reliably. aircraft.data.add("/sim/model/c172p/immat-on-panel"); - aircraft.data.load(); + #aircraft.data.load(); # Initialize mass limits set_limits(props.globals.getNode("/controls/engines/engine[0]")); @@ -664,11 +660,6 @@ setlistener("/sim/signals/fdm-initialized", func { reset_system(); - var onground = getprop("/sim/presets/onground") or ""; - if (!onground) { - state_manager(); - } - # set user defined pilot view or initialize it settimer(func { if (getprop("sim/current-view/user/x-offset-m") != nil){ diff --git a/Nasal/state-manager.nas b/Nasal/state-manager.nas index b764f6155..df1ccdb40 100644 --- a/Nasal/state-manager.nas +++ b/Nasal/state-manager.nas @@ -3,6 +3,7 @@ var state_manager = func { + screen.log.write("state_manager statrting engine", 0.8, 0.8, 0.8); if (!getprop("/sim/presets/airspeed-kt")) { setprop("/velocities/airspeed-kt", 100); setprop("/velocities/uBody-fps", 163); diff --git a/Systems/engine.xml b/Systems/engine.xml index cd3413f0e..22ce1d569 100644 --- a/Systems/engine.xml +++ b/Systems/engine.xml @@ -80,65 +80,6 @@ - - - - - - Engine Starter - - /controls/engines/engine[0]/starter - - - /controls/engines/engine[0]/starter - - - - - - - - - Engine Throttle - gain - - /controls/engines/engine[0]/throttle - - - /controls/engines/engine[0]/throttle - - - - - - - - - Engine Mixture - gain - - /controls/engines/engine[0]/mixture - - - /controls/engines/engine[0]/mixture - - - - - - - - - Engine Carb Heat - gain - - /controls/engines/engine[0]/carb-heat - - - /controls/anti-ice/engine[0]/carb-heat - - - diff --git a/c172p-set.xml b/c172p-set.xml index 7f190d92f..e3116a928 100644 --- a/c172p-set.xml +++ b/c172p-set.xml @@ -280,14 +280,6 @@ http://forum.flightgear.org/viewtopic.php?f=4&t=25157 /sim/rendering/shadow-volume /sim/model/occupants - /sim/model/c172p/cockpit/control-lock-placed - /sim/model/c172p/securing/pitot-cover-visible - /sim/model/c172p/securing/cowl-plugs-visible - /sim/model/c172p/securing/chock - /sim/model/c172p/securing/tiedownL-visible - /sim/model/c172p/securing/tiedownR-visible - /sim/model/c172p/securing/tiedownT-visible - /sim/model/c172p/brake-parking /sim/model/c172p/enable-fog-frost /sim/model/c172p/garmin196-visible /sim/model/c172p/digitalclock-visible @@ -295,21 +287,14 @@ http://forum.flightgear.org/viewtopic.php?f=4&t=25157 /engines/engine[0]/oil_consumption_allowed /engines/engine[0]/oil-service-hours /engines/engine[0]/oil-level - /fdm/jsbsim/engine/damage-level - /fdm/jsbsim/settings/damage - /fdm/jsbsim/settings/damage-flag /environment/aircraft-effects/cabin-heat-set /environment/aircraft-effects/cabin-air-set /controls/climate-control/overhead-vent-front-left /controls/climate-control/overhead-vent-front-right - /fdm/jsbsim/running /consumables/fuel/save-fuel-state /consumables/fuel/contamination_allowed /instrumentation/save-switches-state - /consumables/fuel/tank[0]/level-gal_us - /consumables/fuel/tank[1]/level-gal_us /systems/electrical/save-battery-charge - /systems/electrical/battery-charge-percent /sim/model/c172p/save-state /engines/engine[0]/complex-engine-procedures /sim/model/immat @@ -578,7 +563,10 @@ http://forum.flightgear.org/viewtopic.php?f=4&t=25157 - + + + + @@ -600,7 +588,7 @@ http://forum.flightgear.org/viewtopic.php?f=4&t=25157 0 false - 0.0 + 0.0 false @@ -708,12 +696,6 @@ http://forum.flightgear.org/viewtopic.php?f=4&t=25157 true true - - Float chamber 2 - 0.1 - true - true - false false diff --git a/gui/dialogs/aircraft-dialog.xml b/gui/dialogs/aircraft-dialog.xml index 34ac4d987..9531f3a3c 100644 --- a/gui/dialogs/aircraft-dialog.xml +++ b/gui/dialogs/aircraft-dialog.xml @@ -63,16 +63,6 @@ vbox - - left - - /fdm/jsbsim/running - true - - dialog-apply - - - left diff --git a/states/approach-overlay.xml b/states/approach-overlay.xml new file mode 100644 index 000000000..33208f8d7 --- /dev/null +++ b/states/approach-overlay.xml @@ -0,0 +1,102 @@ + + + + + approach + + + The plane will be in "approach" state with engines running. + Initial Airspeed is set to 80 knots. + You should also set an --altitude=... setting to start in-air + and an offset position to a runway to practice approaches or use the launcher to set this up. + + Start this state with --state=approach. + + + + + + + 0.6 + + + + 0.3333 + + + + + + + false + false + + + false + false + false + false + false + false + + 0 + + 0 + 0 + + + false + false + false + false + + + + + knots + 80 + 0 + 0 + 163 + 0 + 0 + -3 + true + false + + + + + 100 + 7.0 + + + + + + 0 + + + 0 + 0 + + 1 + + + + + + 20 + + + 20 + + + + + + 100 + + + + diff --git a/states/c172p-automatic-overlay.xml b/states/c172p-automatic-overlay.xml deleted file mode 100644 index 5a1b3a309..000000000 --- a/states/c172p-automatic-overlay.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - auto - - - - The aircraft will conform to the Location tab selections. - Use Runway, Runway - On approach or Parking in Location tab below. - - Additional parameters required - Use Runway, Runway - On approach or Parking - Or supply - --lon=degrees Starting longitude (west = -) - --lat=degrees Starting latitude (south = -) - --altitude=value Starting altitude (in feet unless --units-meters specified) - --heading=degrees Specify heading (yaw) angle (Psi) - --vc=knots Specify initial airspeed - - - - - - - knots - 100 - 0 - 0 - 163 - 0 - 0 - 0 - true - false - - - - - diff --git a/states/cruise-overlay.xml b/states/cruise-overlay.xml new file mode 100644 index 000000000..64419dfbf --- /dev/null +++ b/states/cruise-overlay.xml @@ -0,0 +1,98 @@ + + + + + cruise + + + The plane will be in "crusing" state with engines running. + Initial Airspeed is set to 100 knots unless specified otherwise (eg. --vc=120) + You should also set an --altitude=... setting to start in-air. + + Start this state with --state=cruise. + + + + + + + 0.8 + + + + 0.195 + + + + + + + false + false + + + false + false + false + false + false + false + + 0 + + 0 + 0 + + + false + false + false + false + + + + + knots + 120 + 0 + 0 + 0 + true + false + + + + + 100 + 7.0 + + + + + + 0 + + + 0 + 0 + + 1 + + + + + + 20 + + + 20 + + + + + + 100 + + + + diff --git a/states/parked-overlay.xml b/states/parked-overlay.xml new file mode 100644 index 000000000..b00c70ce3 --- /dev/null +++ b/states/parked-overlay.xml @@ -0,0 +1,84 @@ + + + + + parked + + + The plane will be in "cold-and-dark" state, that is parked and secured, with all + equipment switched off. Preflight inspection has not be done yet. + + Start this state with --state=parked + + + + + true + + + + + + + true + true + + + true + true + true + true + true + true + + 1 + + 0 + 0 + + + false + false + false + false + + + + + true + + + + + 100 + 7.0 + + + + + + 0 + + + 0 + 0 + + + + + + + 20 + + + 20 + + + + + + 100 + + + + diff --git a/states/take-off-overlay.xml b/states/take-off-overlay.xml new file mode 100644 index 000000000..3f12821ff --- /dev/null +++ b/states/take-off-overlay.xml @@ -0,0 +1,85 @@ + + + + + take-off + + + The plane will be in "ready-for-takeoff" state. + preflight checklist is complete and the engine is ready for takeoff. + + Start this state with --state=take-off + + + + + true + + + + + + + false + false + + + false + false + false + false + false + false + + 1 + + 0 + 0 + + + false + false + false + false + + + + + true + + + + + 100 + 7.0 + + + + + + 0 + + + 0 + 0 + + 1 + + + + + + 20 + + + 20 + + + + + + 100 + + + +