abassign wrote in Fri Nov 22, 2019 1:04 am:I would like to start the flight with a different landing gear configuration, for example if the plane is in flight I would like to start with the landing gear retracted, it is possible with JSBSim to give this configuration.
V12 wrote in Sat Nov 23, 2019 6:51 am:What about property WOW (Weight On the Weel) for gear ?
It is useless to do this at NASAL level as this is done a long time after the FDM and therefore you risk seeing the plane impact on the runway or have an absurd attitude if in flight.
<?xml version="1.0"?>
<PropertyList>
<name type="string">approach</name>
<overlay>
<sim>
<freeze>
<master type="bool">0</master>
<clock type="bool">0</clock>
</freeze>
<presets>
<speed-set type="string">knots</speed-set>
<airspeed-kt type="int">100</airspeed-kt>
<pitch-deg type="double">-6.0</pitch-deg>
<roll-deg type="double">0</roll-deg>
<uBody-fps type="double">163</uBody-fps>
<vBody-fps type="double">0</vBody-fps>
<wBody-fps type="double">0</wBody-fps>
<glideslope-deg type="double">-6</glideslope-deg>
<trim type="bool">true</trim>
<onground type="bool">false</onground>
</presets>
<model>
<j3cub>
<brake-parking type="bool">0</brake-parking>
</j3cub>
</model>
</sim>
<fdm>
<jsbsim>
<running type="bool">0</running>
</jsbsim>
</fdm>
<!--consumables>
<fuel>
<tank n="0">
<selected type="bool">true</selected>
</tank>
<tank n="1">
<selected type="bool">true</selected>
</tank>
<tank n="2">
<selected type="bool">true</selected>
</tank>
</fuel>
</consumables-->
<engines>
<active-engine>
<running type="bool">0</running>
<auto-start type="bool">1</auto-start>
<cranking type="bool">0</cranking>
</active-engine>
</engines>
<controls>
<circuit-breakers>
<master type="bool">1</master>
<pitot-heat type="bool">1</pitot-heat>
<instr type="bool">1</instr>
<intlt type="bool">1</intlt>
<avionics type="bool">1</avionics>
<navlt type="bool">1</navlt>
<landing type="bool">1</landing>
<bcnlt type="bool">1</bcnlt>
<strobe type="bool">1</strobe>
<turn-coordinator type="bool">1</turn-coordinator>
<gear-select type="bool">1</gear-select>
<gear-advisory type="bool">1</gear-advisory>
<hydraulic-pump type="bool">1</hydraulic-pump>
</circuit-breakers>
<flight>
<flaps type="double">1</flaps>
<elevator-trim type="double">-0.03</elevator-trim>
</flight>
<gear>
<gear-down-command type="bool">true</gear-down-command>
</gear>
<!--lighting>
<nav-lights type="bool">1</nav-lights>
<strobe-lights type="bool">1</strobe-lights>
<beacon-light type="bool">1</beacon-light>
<landing-light type="bool">1</landing-light>
<instruments-norm type="bool">1</instruments-norm>
<taxi-light type="bool">1</taxi-light>
</lighting-->
<switches>
<!--magnetos type="int">4</magnetos>
<master-bat type="bool">1</master-bat>
<master-alt type="bool">1</master-alt>
<master-avionics type="bool">1</master-avionics-->
<starter type="bool">1</starter>
</switches>
<engines>
<engine n="0">
<primer type="double">3</primer>
<primer-lever type="bool">0</primer-lever>
</engine>
<current-engine>
<throttle type="double">0.2</throttle>
<mixture type="double">0.88</mixture>
</current-engine>
</engines>
</controls>
</overlay>
</PropertyList>
abassign wrote in Sat Nov 23, 2019 7:58 am:It is useless to do this at NASAL level as this is done a long time after the FDM and therefore you risk seeing the plane impact on the runway or have an absurd attitude if the plane start in flight.
var common_init = func
{
print("Setting replay medium res to 50hz");
setprop("sim/hud/visibility[0]",0);
setprop("sim/hud/visibility[1]",0);
aoa_max.setDoubleValue(0);
setprop("sim/replay/buffer/medium-res-sample-dt", 0.02);
setprop("controls/flight/SAS-roll",0);
setprop("sim/model/f15/controls/AFCS/engage",0);
setprop("autopilot/locks/altitude","");
setprop("autopilot/locks/heading","");
setprop("autopilot/locks/speed","");
if (getprop("sim/model/f15/controls/windshield-heat") != nil)
setprop("fdm/jsbsim/systems/ecs/windshield-heat",getprop("sim/model/f15/controls/windshield-heat"));
#
# this is just to ensure that we start with pressure in the util hyds
setprop("fdm/jsbsim/systems/hydraulics/util-system-preload-input",-500);
settimer(func {
setprop("fdm/jsbsim/systems/hydraulics/util-system-preload-input",0);
}, 4);
if (getprop("fdm/jsbsim/position/h-agl-ft") != nil) {
if (getprop("fdm/jsbsim/position/h-agl-ft") < 500) {
print("Starting with gear down as below 500 ft");
setprop("controls/gear/gear-down", 1);
setprop("fdm/jsbsim/fcs/gear/gear-dmd-norm",1);
if (getprop("fdm/jsbsim/position/h-agl-ft") < 50) {
setprop("controls/gear/brake-parking",1);
print("--> Set parking brake as below 50 ft");
}
} else {
print("Starting with gear up as above 500 ft");
setprop("controls/gear/gear-down", 0);
setprop("fdm/jsbsim/fcs/gear/gear-dmd-norm",0);
setprop("controls/gear/brake-parking",0);
}
}
}
# Init ####################
var init = func {
print("Initializing f15 Systems");
var modelNotification = emesary.Notification.new("F15Model", nil);
modelNotification.root_node = props.globals;
emesary.GlobalTransmitter.NotifyAll(modelNotification);
emesary.GlobalTransmitter.NotifyAll(emesary.Notification.new("F15Init", 1));
ext_loads_init();
init_fuel_system();
aircraft.data.load();
f15_net.mp_network_init(1);
weapons_init();
tacan_switch_init();
radardist.init();
awg_9.init();
# an_arc_182v.init();
# an_arc_159v1.init();
aircraft.setup_als_lights(getprop("fdm/jsbsim/systems/electrics/dc-essential-bus1-powered"));
setprop("controls/switches/radar_init", 0);
common_init();
main_loop_launched = 1;
var prop = "/instrumentation/radar";
var actuator_radar = compat_failure_modes.set_unserviceable(prop);
FailureMgr.add_failure_mode(prop, "Radar", actuator_radar);
}
setlistener("sim/signals/fdm-initialized", init);
Richard wrote in Sat Nov 23, 2019 1:04 pm:abassign wrote in Sat Nov 23, 2019 7:58 am:It is useless to do this at NASAL level as this is done a long time after the FDM and therefore you risk seeing the plane impact on the runway or have an absurd attitude if the plane start in flight.
You are completely wrong about that; please verify your facts before posting incorrect statements.
/sim/preset
...
/sim/preset/onground
/sim/preset/airspeed-kt
/sim/preset/altitude-ft
/sim/preset/offset-distance-nm
...
etc
setprop("controls/gear/gear-down", 1);
<switch>
<default value="/controls/gear/gear-down"/>
<test logic="AND" value="1">
context/simulation/is-starting == 1
</test>
<output>/controls/gear/gear-down</output>
</switch>
If your answer is affirmative, do you know if there is a way to bypass the problem?
Thorsten wrote in Sat Nov 23, 2019 10:53 pm:...
honestly I did not think of offending anyone by pointing out that JSBS reaction times are shorter than NASAL ones
it is clear that my experience on RT systems has a different sensitivity in priority management.
Apparently the hammer couldn't make you shut up, it's clear that you really have a very hard head.
Return to Flight dynamics model
Users browsing this forum: No registered users and 3 guests