Martin Schweiger's Orbiter simulator: Archives -- December 2002
RE: Pulse mode thrusters
> I'm trying to implement an alternate control method for
> the shuttle. In short I want to allow the user to use
> normal controls for translation and rotation or to use
> a pulse mode, where each press of the joystick will
> engage the thrusters only once and will not engage
> the thrusters again until the user has let go of the
> key or returned the joystick to its neutral position.
First use only user defined thruster groups when in pulse mode.
In TimeStep
Threshold = .9;
pulse_time = 1.0;
if (vessel->GetManualControlLevel(THGROUP_ATT_PITCHUP, MANCTRL_ROTMODE,
MANCTRL_ANYDEVICE) > Threshold) {
if (!do_pulse) {
start_pulse = simt;
do_pulse = true;
}
}
if (do_pulse) {
if (simt - start_pulse > 1.0) {
vessel->SetThrusterGroupLevel(rcs_pitch_up, 0.0);
do_pulse = false;
} else
vessel->SetThrusterGroupLevel(rcs_pitch_up, 1.0);
--
Orbiter discussion list:
- mail orbiter-request@firedrake.org with subject "unsubscribe" to leave
or ask the listmaster (@firedrake.org)
- archives at http://lists.firedrake.org/orbiter/
Main Index | Thread Index | Author Index | Archive Index
roger@nospam.firedrake.org
Generated: Tue Dec 24 02:08:27 GMT 2002