-
Notifications
You must be signed in to change notification settings - Fork 67
JSIPilotAssistant
JSIPilotAssistant interacts with the Pilot Assistant mod, which provides aircraft autopilot features. The RasterPropMonitor interface consists of several categories of methods used to toggle control, get information, or set values.
There are three controllers in Pilot Assistant - a vertical control, a heading/horizontal control, and a throttle/speed control. Each one has its own enable toggle, state methods, and setting/mode queries:
- GetVertActive, GetHorzActive, GetThrottleActive -- Returns whether the individual controller is enabled or not.
- SetVertActive, SetHorzActive, SetThrottleActive -- Takes a Boolean parameter that turns the individual controller on or off. This method does not change modes - it can be used to turn off a pilot, or to switch it back on after it was temporarily disabled.
-
GetVertMode -- Returns a number representing which mode the vertical pilot is in:
0
for 'hold pitch',1
for 'hold vertical speed',2
for 'hold altitude',3
for 'hold radar altitude'. -
GetHorzMode -- Returns the horizontal pilot mode:
0
for 'hold bank',1
for 'hold direction' (hold a great circle route),2
for 'hold heading' (keep the same compass heading). -
GetThrottleMode -- Returns the throttle control mode:
0
for 'direct' (set the throttle percentage),1
for 'hold acceleration', and2
for 'hold ground speed'. - GetVertSetting, GetHorzSetting, GetThrottleSetting -- Returns the set point for the current mode. Note that you can only fetch the setting for the active mode, so you need to cross reference this value with the results of the Get*Mode method.
-
GetSpeedRef, ChangeSpeedRef -- Used to get/set the speed reference used in the autopilot.
0
for 'true speed',1
for 'indicated speed',2
for 'effective speed', and3
for 'Mach number'. -
GetSpeedUnits, ChangeSpeedUnits -- Used to get/set the units used for speeds in Pilot Assistant.
0
for m/sec,1
for km/h,2
for mph,3
for knots, and4
for mach. - GetPauseState, SetPauseState -- Used to control whether Pilot Assistant is paused.
###Mode selectors
Mode Selectors are used to enable the autopilot, set it to a new mode, and to update the set point. These methods take a numeric (double) value, and they're best used with JSINumericInput and JSIActionGroupSwitch's transfer
action. Note that RasterPropMonitor does not filter the values, so you could conceivably try to tell Pilot Assistant to set pitch to 1000, for instance (not that it's recommended to try).
- SetVertMode -- Set the vertical pilot to the specified mode (using the values from GetVertMode). Does not change whether the pilot is active or inactive, and it does not specify the set point for the specified mode.
- SetVertPitch -- Enable the vertical pilot to set and hold a pitch angle.
- SetVertRate -- Enable the vertical pilot to set and hold a climb rate.
- SetVertAltitude -- Enable the vertical pilot to set and hold an altitude ASL.
- SetVertRadarAltitude -- Enable the vertical pilot to set and hold a fixed altitude AGL.
- SetHorzMode -- Set the horizontal pilot to the specified mode (from GetHorzMode); otherwise behaves like SetVertMode.
- SetHorzBank -- Enable the horizontal pilot to set and hold a fixed bank angle.
- SetHorzDirection -- Enable the horizontal pilot to set and hold a fixed direction (for great circle routes).
- SetHorzHeading -- Enable the horizontal pilot to set and hold a compass heading.
- SetThrottleMode -- As SetVertMode and SetHorzMode, but controls the throttle controller.
- SetThrottleDirect -- Enable the throttle controller to set the throttle to a specified percentage.
- SetThrottleAccel -- Enable the throttle controller to set the throttle to hold a specific acceleration in m/s.
- SetThrottleSpeed -- Enable the throttle controller to set the throttle to a specified ground speed in m/s.