For Adi color, I put 0.8 for parameters.
For throttle, two things.
The 104% for nominal one indeed ( used quite early in STS program)
And the order for Max and abort
Abort was at 109 and max at 106
It is the other way around
- Code: Select all
<switch name="systems/throttle/throttle-factor">
<default value="1.0"/>
<test value="1.09">
systems/throttle/throttle-mode == 1
</test>
<test value="1.06">
systems/throttle/throttle-mode == 2
</test>
<test value="1.04">
systems/throttle/throttle-mode == 3
</test>
</switch>
For the first stage one modifications, I tested it a lot ( from polar to equatorial orbit, and even with the roll at launch), and it works well. I spent time to find the sweet spot for pitch accelerations to avoid abrupt changes in AOA
It permits also a lot flater trajectory for RTLS, and a "huge margin" of a couple of AOA degrees at Max Q
I removed the lofting for the SRB part as it follows a precise open loop guidance.
I let it for the second stage ( loft and climb out bias)
Here the lines for first stage
- Code: Select all
# auto launch guidance for the Space Shuttle
# Thorsten Renk 2016
var auto_launch_stage = 0;
var auto_launch_timer = 0.0;
var aux_flag = 0;
var auto_launch_throttle_down = 18.0;
var auto_launch_throttle_up = 42.0;
var auto_launch_throttle_to = 0.0;
var auto_launch_traj_loft = 0.0;
var auto_launch_mps_climbout_bias = 0.0;
var auto_launch_srb_climbout_bias = 0.0;
var xtrack_refloc = geo.Coord.new();
xtrack_refloc.last_xtrack = 0.0;
xtrack_refloc.correction = 0.0;
xtrack_refloc.approach_speed = 0.0;
xtrack_refloc.last_app_speed = 0.0;
xtrack_refloc.buffer = 0.0;
var auto_launch_loop = func {
var shuttle_pos = geo.aircraft_position();
#var actual_course = SpaceShuttle.peg4_refloc.course_to(shuttle_pos);
#var dist = SpaceShuttle.peg4_refloc.distance_to(shuttle_pos);
var actual_course = SpaceShuttle.xtrack_refloc.course_to(shuttle_pos);
var dist = SpaceShuttle.xtrack_refloc.distance_to(shuttle_pos);
var launch_azimuth = getprop("/fdm/jsbsim/systems/ap/launch/launch-azimuth");
var xtrack = SpaceShuttle.sgeo_crosstrack(actual_course, launch_azimuth, dist) * 0.0005399568;
# compute speed by a running average
xtrack_refloc.approach_speed = (xtrack_refloc.last_xtrack - xtrack)/ 0.1; # using loop time constant
xtrack_refloc.buffer = (xtrack_refloc.approach_speed + xtrack_refloc.last_app_speed)/2.0;
xtrack_refloc.last_app_speed = xtrack_refloc.approach_speed;
xtrack_refloc.approach_speed = xtrack_refloc.buffer;
xtrack_refloc.last_xtrack = xtrack;
setprop("/fdm/jsbsim/systems/ap/launch/cross-track", xtrack);
setprop("/fdm/jsbsim/systems/ap/launch/cross-track-approach-speed", xtrack_refloc.approach_speed);
if (auto_launch_stage == 0)
{
# check for clear gantry, then initiate rotation to launch course
if (getprop("/fdm/jsbsim/velocities/vtrue-fps") > 120.0)
{
auto_launch_stage = 1;
setprop("/fdm/jsbsim/systems/ap/launch/stage", 1);
aux_flag = 0;
}
}
else if (auto_launch_stage == 1)
{
# enable throttling already during rotation to azimuth
#print ("Auto launch timer: ", auto_launch_timer);
if ((auto_launch_timer > auto_launch_throttle_down) and (auto_launch_timer < auto_launch_throttle_up))
{
if (aux_flag == 0)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", auto_launch_throttle_to);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", auto_launch_throttle_to);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", auto_launch_throttle_to);}
}
aux_flag = 1;
}
# throttle up if we lose an engine
if (getprop("/fdm/jsbsim/systems/mps/number-engines-operational") < 3.0)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", 1.0);}
}
}
}
else if (auto_launch_timer > auto_launch_throttle_up)
{
if (aux_flag == 1)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", 1.0);}
}
aux_flag = 2;
}
}
# check for launch course reached, then initiate pitch down assuming we're high enough
if (math.abs(getprop("/fdm/jsbsim/systems/ap/launch/stage1-course-error")) < 0.1)
{
auto_launch_stage = 2;
setprop("/fdm/jsbsim/systems/ap/launch/stage", 2);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 70.0);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.25);
aux_flag = 0;
}
}
else if (auto_launch_stage == 2)
{
if ((auto_launch_timer > auto_launch_throttle_down) and (auto_launch_timer < auto_launch_throttle_up))
{
if (aux_flag == 0)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", auto_launch_throttle_to);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", auto_launch_throttle_to);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", auto_launch_throttle_to);}
}
aux_flag = 1;
}
# throttle up if we lose an engine
if (getprop("/fdm/jsbsim/systems/mps/number-engines-operational") < 3.0)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", 1.0);}
}
}
}
else if (auto_launch_timer > auto_launch_throttle_up)
{
if (aux_flag == 1)
{
if (getprop("/fdm/jsbsim/systems/ap/automatic-sb-control") == 1)
{
if (SpaceShuttle.failure_cmd.ssme1 == 1)
{setprop("/controls/engines/engine[0]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme2 == 1)
{setprop("/controls/engines/engine[1]/throttle", 1.0);}
if (SpaceShuttle.failure_cmd.ssme3 == 1)
{setprop("/controls/engines/engine[2]/throttle", 1.0);}
}
aux_flag = 2;
}
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 571.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 69.4);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 678.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 68.6);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 747.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 67.8);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 846.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 66.2);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 932.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 64.4);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1068.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 62.1);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1149.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 61.1);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.04);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1304.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 59.0);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1382.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 58.2);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1463.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 57.8);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1550.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 57.1);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1693.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 54.7);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 1797.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 52.9);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2027.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 48.7);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2154.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 46.4);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2286))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 43.0);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2353.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 42.0);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2421.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 41.6);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 2746.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 38.6);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 3019.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 36.3);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 3157.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 35.3);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 3350.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 33.9);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 3573.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 32.4);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.06);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 3950.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 29.8);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.1);
}
if ((getprop("/fdm/jsbsim/velocities/vtrue-fps") > 5000.0))
{
setprop("/fdm/jsbsim/systems/ap/launch/pitch-target", 22.6);
setprop("/fdm/jsbsim/systems/ap/launch/pitch-max-rate-norm", 0.1);
}
For the Dap, we might just change one deadband whichis really tight.
After Meco, with the MPS dump, RCS are firing a lot.
This one <dap-A-PRI-rate-db type="double">0.001</dap-A-PRI-rate-db>
0.05 is working well and spare a lot of RCS propellant during Transition DAP before OPS 2 and Spec 23 tweaking.
After Meco, with the MPS dump, RCS are firing a lot.
Two minor things ( that are really not necessary for the milestone though)
The PFD not feed with datas before ignition
Like that:
And some stuff on DAP layout
MM 304/ 305//// 602/ 603 Dap mode on PFDA small thing I noticed recently.
In the Major Mode above ( basically entry stuff), DAP on PFD is a bit different, showing Pitch and Roll/Yaw in a separated manner ( DAP in other MM)
I think it is coming from the fact that except for entry, when we swith one mode in manual ( R/Y or Pitch, the both go into manual, and for entry, we can select one in manual and the other one in auto)
I tested the cross feeding fix, it is perfect.
Hac in spec 51 same
Size of IDP really nice
Custom Shape for MM 102/103 works good