FlightGear next
FGControls Class Reference

#include <controls.hxx>

Inherits SGSubsystem.

Public Types

enum  { ALL_ENGINES = -1 , MAX_ENGINES = 12 }
 
enum  { ALL_WHEELS = -1 , MAX_WHEELS = 3 }
 
enum  { ALL_TANKS = -1 , MAX_TANKS = 8 }
 
enum  { ALL_BOOSTPUMPS = -1 , MAX_BOOSTPUMPS = 2 }
 
enum  { ALL_HYD_SYSTEMS = -1 , MAX_HYD_SYSTEMS = 4 }
 
enum  { ALL_PACKS = -1 , MAX_PACKS = 4 }
 
enum  { ALL_LIGHTS = -1 , MAX_LIGHTS = 4 }
 
enum  { ALL_STATIONS = -1 , MAX_STATIONS = 12 }
 
enum  { ALL_AUTOPILOTS = -1 , MAX_AUTOPILOTS = 3 }
 
enum  { ALL_EJECTION_SEATS = -1 , MAX_EJECTION_SEATS = 10 }
 
enum  { SEAT_SAFED = -1 , SEAT_ARMED = 0 , SEAT_FAIL = 1 }
 
enum  { CMD_SEL_NORM = -1 , CMD_SEL_AFT = 0 , CMD_SEL_SOLO = 1 }
 

Public Member Functions

 FGControls ()
 
 ~FGControls ()
 
void bind () override
 
void init () override
 
void reinit () override
 
void unbind () override
 
void update (double dt) override
 
void reset_all (void)
 
double get_aileron () const
 
double get_aileron_trim () const
 
double get_elevator () const
 
double get_elevator_trim () const
 
double get_rudder () const
 
double get_rudder_trim () const
 
double get_flaps () const
 
double get_slats () const
 
bool get_BLC () const
 
double get_spoilers () const
 
double get_speedbrake () const
 
double get_wing_sweep () const
 
bool get_wing_fold () const
 
bool get_drag_chute () const
 
bool get_throttle_idle () const
 
double get_throttle (int engine) const
 
bool get_starter (int engine) const
 
bool get_fuel_pump (int engine) const
 
bool get_fire_switch (int engine) const
 
bool get_fire_bottle_discharge (int engine) const
 
bool get_cutoff (int engine) const
 
double get_mixture (int engine) const
 
double get_prop_advance (int engine) const
 
int get_magnetos (int engine) const
 
int get_feed_tank (int engine) const
 
bool get_nitrous_injection (int engine) const
 
double get_cowl_flaps_norm (int engine) const
 
bool get_feather (int engine) const
 
int get_ignition (int engine) const
 
bool get_augmentation (int engine) const
 
bool get_reverser (int engine) const
 
bool get_water_injection (int engine) const
 
double get_condition (int engine) const
 
bool get_dump_valve () const
 
bool get_fuel_selector (int tank) const
 
int get_to_engine (int tank) const
 
int get_to_tank (int tank) const
 
bool get_boost_pump (int index) const
 
double get_brake_left () const
 
double get_brake_right () const
 
double get_copilot_brake_left () const
 
double get_copilot_brake_right () const
 
double get_brake_parking () const
 
double get_steering () const
 
bool get_nose_wheel_steering () const
 
bool get_gear_down () const
 
bool get_antiskid () const
 
bool get_tailhook () const
 
bool get_launchbar () const
 
bool get_catapult_launch_cmd () const
 
bool get_tailwheel_lock () const
 
bool get_alternate_extension (int wheel) const
 
bool get_wing_heat () const
 
bool get_pitot_heat () const
 
int get_wiper () const
 
bool get_window_heat () const
 
bool get_carb_heat (int engine) const
 
bool get_inlet_heat (int engine) const
 
bool get_engine_pump (int system) const
 
bool get_electric_pump (int system) const
 
bool get_battery_switch () const
 
bool get_external_power () const
 
bool get_APU_generator () const
 
bool get_generator_breaker (int engine) const
 
bool get_bus_tie (int engine) const
 
bool get_APU_bleed () const
 
bool get_engine_bleed (int engine) const
 
int get_mode () const
 
double get_outflow_valve () const
 
bool get_dump () const
 
bool get_pack_on (int pack) const
 
bool get_landing_lights () const
 
bool get_turn_off_lights () const
 
bool get_taxi_light () const
 
bool get_logo_lights () const
 
bool get_nav_lights () const
 
bool get_beacon () const
 
bool get_strobe () const
 
double get_panel_norm () const
 
double get_instruments_norm () const
 
double get_dome_norm () const
 
bool get_master_arm () const
 
int get_station_select () const
 
bool get_release_ALL () const
 
int get_stick_size (int station) const
 
bool get_release_stick (int station) const
 
bool get_release_all (int station) const
 
bool get_jettison_all (int station) const
 
double get_vertical_adjust () const
 
double get_fore_aft_adjust () const
 
bool get_ejection_seat (int which_seat) const
 
int get_eseat_status (int which_seat) const
 
int get_cmd_selector_valve () const
 
int get_off_start_run () const
 
bool get_APU_fire_switch () const
 
bool get_autothrottle_arm () const
 
bool get_autothrottle_engage () const
 
double get_heading_select () const
 
double get_altitude_select () const
 
double get_bank_angle_select () const
 
double get_vertical_speed_select () const
 
double get_speed_select () const
 
double get_mach_select () const
 
int get_vertical_mode () const
 
int get_lateral_mode () const
 
bool get_autopilot_engage (int ap) const
 
void set_elevator (double pos)
 
void set_aileron_trim (double pos)
 
void set_elevator_trim (double pos)
 
void set_aileron (double pos)
 
void set_rudder (double pos)
 
void set_throttle (int engine, double pos)
 
void set_cutoff (int engine, bool val)
 
void set_augmentation (int engine, bool val)
 
void set_reverser (int engine, bool val)
 
void set_water_injection (int engine, bool val)
 
void set_magnetos (int engine, int pos)
 
void set_starter (int engine, bool flag)
 
void set_mixture (int engine, double pos)
 

Static Public Member Functions

static const char * staticSubsystemClassId ()
 

Detailed Description

Definition at line 32 of file controls.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ALL_STATIONS 
MAX_STATIONS 

Definition at line 70 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_LIGHTS 
MAX_LIGHTS 

Definition at line 65 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_EJECTION_SEATS 
MAX_EJECTION_SEATS 

Definition at line 80 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_HYD_SYSTEMS 
MAX_HYD_SYSTEMS 

Definition at line 55 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_BOOSTPUMPS 
MAX_BOOSTPUMPS 

Definition at line 50 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
CMD_SEL_NORM 
CMD_SEL_AFT 
CMD_SEL_SOLO 

Definition at line 91 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_PACKS 
MAX_PACKS 

Definition at line 60 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
SEAT_SAFED 
SEAT_ARMED 
SEAT_FAIL 

Definition at line 85 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_TANKS 
MAX_TANKS 

Definition at line 45 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_AUTOPILOTS 
MAX_AUTOPILOTS 

Definition at line 75 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_ENGINES 
MAX_ENGINES 

Definition at line 35 of file controls.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ALL_WHEELS 
MAX_WHEELS 

Definition at line 40 of file controls.hxx.

Constructor & Destructor Documentation

◆ FGControls()

FGControls::FGControls ( )

Definition at line 36 of file controls.cxx.

◆ ~FGControls()

FGControls::~FGControls ( )

Definition at line 164 of file controls.cxx.

Member Function Documentation

◆ bind()

void FGControls::bind ( )
override

Definition at line 187 of file controls.cxx.

◆ get_aileron()

double FGControls::get_aileron ( ) const
inline

Definition at line 292 of file controls.hxx.

◆ get_aileron_trim()

double FGControls::get_aileron_trim ( ) const
inline

Definition at line 293 of file controls.hxx.

◆ get_alternate_extension()

bool FGControls::get_alternate_extension ( int wheel) const
inline

Definition at line 371 of file controls.hxx.

◆ get_altitude_select()

double FGControls::get_altitude_select ( ) const
inline

Definition at line 457 of file controls.hxx.

◆ get_antiskid()

bool FGControls::get_antiskid ( ) const
inline

Definition at line 364 of file controls.hxx.

◆ get_APU_bleed()

bool FGControls::get_APU_bleed ( ) const
inline

Definition at line 401 of file controls.hxx.

◆ get_APU_fire_switch()

bool FGControls::get_APU_fire_switch ( ) const
inline

Definition at line 451 of file controls.hxx.

◆ get_APU_generator()

bool FGControls::get_APU_generator ( ) const
inline

Definition at line 392 of file controls.hxx.

◆ get_augmentation()

bool FGControls::get_augmentation ( int engine) const
inline

Definition at line 333 of file controls.hxx.

◆ get_autopilot_engage()

bool FGControls::get_autopilot_engage ( int ap) const
inline

Definition at line 468 of file controls.hxx.

◆ get_autothrottle_arm()

bool FGControls::get_autothrottle_arm ( ) const
inline

Definition at line 454 of file controls.hxx.

◆ get_autothrottle_engage()

bool FGControls::get_autothrottle_engage ( ) const
inline

Definition at line 455 of file controls.hxx.

◆ get_bank_angle_select()

double FGControls::get_bank_angle_select ( ) const
inline

Definition at line 458 of file controls.hxx.

◆ get_battery_switch()

bool FGControls::get_battery_switch ( ) const
inline

Definition at line 390 of file controls.hxx.

◆ get_beacon()

bool FGControls::get_beacon ( ) const
inline

Definition at line 420 of file controls.hxx.

◆ get_BLC()

bool FGControls::get_BLC ( ) const
inline

Definition at line 300 of file controls.hxx.

◆ get_boost_pump()

bool FGControls::get_boost_pump ( int index) const
inline

Definition at line 351 of file controls.hxx.

◆ get_brake_left()

double FGControls::get_brake_left ( ) const
inline

Definition at line 356 of file controls.hxx.

◆ get_brake_parking()

double FGControls::get_brake_parking ( ) const
inline

Definition at line 360 of file controls.hxx.

◆ get_brake_right()

double FGControls::get_brake_right ( ) const
inline

Definition at line 357 of file controls.hxx.

◆ get_bus_tie()

bool FGControls::get_bus_tie ( int engine) const
inline

Definition at line 398 of file controls.hxx.

◆ get_carb_heat()

bool FGControls::get_carb_heat ( int engine) const
inline

Definition at line 382 of file controls.hxx.

◆ get_catapult_launch_cmd()

bool FGControls::get_catapult_launch_cmd ( ) const
inline

Definition at line 367 of file controls.hxx.

◆ get_cmd_selector_valve()

int FGControls::get_cmd_selector_valve ( ) const
inline

Definition at line 446 of file controls.hxx.

◆ get_condition()

double FGControls::get_condition ( int engine) const
inline

Definition at line 338 of file controls.hxx.

◆ get_copilot_brake_left()

double FGControls::get_copilot_brake_left ( ) const
inline

Definition at line 358 of file controls.hxx.

◆ get_copilot_brake_right()

double FGControls::get_copilot_brake_right ( ) const
inline

Definition at line 359 of file controls.hxx.

◆ get_cowl_flaps_norm()

double FGControls::get_cowl_flaps_norm ( int engine) const
inline

Definition at line 328 of file controls.hxx.

◆ get_cutoff()

bool FGControls::get_cutoff ( int engine) const
inline

Definition at line 318 of file controls.hxx.

◆ get_dome_norm()

double FGControls::get_dome_norm ( ) const
inline

Definition at line 424 of file controls.hxx.

◆ get_drag_chute()

bool FGControls::get_drag_chute ( ) const
inline

Definition at line 305 of file controls.hxx.

◆ get_dump()

bool FGControls::get_dump ( ) const
inline

Definition at line 409 of file controls.hxx.

◆ get_dump_valve()

bool FGControls::get_dump_valve ( ) const
inline

Definition at line 341 of file controls.hxx.

◆ get_ejection_seat()

bool FGControls::get_ejection_seat ( int which_seat) const
inline

Definition at line 440 of file controls.hxx.

◆ get_electric_pump()

bool FGControls::get_electric_pump ( int system) const
inline

Definition at line 387 of file controls.hxx.

◆ get_elevator()

double FGControls::get_elevator ( ) const
inline

Definition at line 294 of file controls.hxx.

◆ get_elevator_trim()

double FGControls::get_elevator_trim ( ) const
inline

Definition at line 295 of file controls.hxx.

◆ get_engine_bleed()

bool FGControls::get_engine_bleed ( int engine) const
inline

Definition at line 404 of file controls.hxx.

◆ get_engine_pump()

bool FGControls::get_engine_pump ( int system) const
inline

Definition at line 386 of file controls.hxx.

◆ get_eseat_status()

int FGControls::get_eseat_status ( int which_seat) const
inline

Definition at line 443 of file controls.hxx.

◆ get_external_power()

bool FGControls::get_external_power ( ) const
inline

Definition at line 391 of file controls.hxx.

◆ get_feather()

bool FGControls::get_feather ( int engine) const
inline

Definition at line 331 of file controls.hxx.

◆ get_feed_tank()

int FGControls::get_feed_tank ( int engine) const
inline

Definition at line 324 of file controls.hxx.

◆ get_fire_bottle_discharge()

bool FGControls::get_fire_bottle_discharge ( int engine) const
inline

Definition at line 315 of file controls.hxx.

◆ get_fire_switch()

bool FGControls::get_fire_switch ( int engine) const
inline

Definition at line 314 of file controls.hxx.

◆ get_flaps()

double FGControls::get_flaps ( ) const
inline

Definition at line 298 of file controls.hxx.

◆ get_fore_aft_adjust()

double FGControls::get_fore_aft_adjust ( ) const
inline

Definition at line 439 of file controls.hxx.

◆ get_fuel_pump()

bool FGControls::get_fuel_pump ( int engine) const
inline

Definition at line 313 of file controls.hxx.

◆ get_fuel_selector()

bool FGControls::get_fuel_selector ( int tank) const
inline

Definition at line 344 of file controls.hxx.

◆ get_gear_down()

bool FGControls::get_gear_down ( ) const
inline

Definition at line 363 of file controls.hxx.

◆ get_generator_breaker()

bool FGControls::get_generator_breaker ( int engine) const
inline

Definition at line 395 of file controls.hxx.

◆ get_heading_select()

double FGControls::get_heading_select ( ) const
inline

Definition at line 456 of file controls.hxx.

◆ get_ignition()

int FGControls::get_ignition ( int engine) const
inline

Definition at line 332 of file controls.hxx.

◆ get_inlet_heat()

bool FGControls::get_inlet_heat ( int engine) const
inline

Definition at line 383 of file controls.hxx.

◆ get_instruments_norm()

double FGControls::get_instruments_norm ( ) const
inline

Definition at line 423 of file controls.hxx.

◆ get_jettison_all()

bool FGControls::get_jettison_all ( int station) const
inline

Definition at line 435 of file controls.hxx.

◆ get_landing_lights()

bool FGControls::get_landing_lights ( ) const
inline

Definition at line 415 of file controls.hxx.

◆ get_lateral_mode()

int FGControls::get_lateral_mode ( ) const
inline

Definition at line 465 of file controls.hxx.

◆ get_launchbar()

bool FGControls::get_launchbar ( ) const
inline

Definition at line 366 of file controls.hxx.

◆ get_logo_lights()

bool FGControls::get_logo_lights ( ) const
inline

Definition at line 418 of file controls.hxx.

◆ get_mach_select()

double FGControls::get_mach_select ( ) const
inline

Definition at line 463 of file controls.hxx.

◆ get_magnetos()

int FGControls::get_magnetos ( int engine) const
inline

Definition at line 323 of file controls.hxx.

◆ get_master_arm()

bool FGControls::get_master_arm ( ) const
inline

Definition at line 427 of file controls.hxx.

◆ get_mixture()

double FGControls::get_mixture ( int engine) const
inline

Definition at line 319 of file controls.hxx.

◆ get_mode()

int FGControls::get_mode ( ) const
inline

Definition at line 407 of file controls.hxx.

◆ get_nav_lights()

bool FGControls::get_nav_lights ( ) const
inline

Definition at line 419 of file controls.hxx.

◆ get_nitrous_injection()

bool FGControls::get_nitrous_injection ( int engine) const
inline

Definition at line 325 of file controls.hxx.

◆ get_nose_wheel_steering()

bool FGControls::get_nose_wheel_steering ( ) const
inline

Definition at line 362 of file controls.hxx.

◆ get_off_start_run()

int FGControls::get_off_start_run ( ) const
inline

Definition at line 450 of file controls.hxx.

◆ get_outflow_valve()

double FGControls::get_outflow_valve ( ) const
inline

Definition at line 408 of file controls.hxx.

◆ get_pack_on()

bool FGControls::get_pack_on ( int pack) const
inline

Definition at line 412 of file controls.hxx.

◆ get_panel_norm()

double FGControls::get_panel_norm ( ) const
inline

Definition at line 422 of file controls.hxx.

◆ get_pitot_heat()

bool FGControls::get_pitot_heat ( ) const
inline

Definition at line 377 of file controls.hxx.

◆ get_prop_advance()

double FGControls::get_prop_advance ( int engine) const
inline

Definition at line 320 of file controls.hxx.

◆ get_release_ALL()

bool FGControls::get_release_ALL ( ) const
inline

Definition at line 429 of file controls.hxx.

◆ get_release_all()

bool FGControls::get_release_all ( int station) const
inline

Definition at line 434 of file controls.hxx.

◆ get_release_stick()

bool FGControls::get_release_stick ( int station) const
inline

Definition at line 433 of file controls.hxx.

◆ get_reverser()

bool FGControls::get_reverser ( int engine) const
inline

Definition at line 334 of file controls.hxx.

◆ get_rudder()

double FGControls::get_rudder ( ) const
inline

Definition at line 296 of file controls.hxx.

◆ get_rudder_trim()

double FGControls::get_rudder_trim ( ) const
inline

Definition at line 297 of file controls.hxx.

◆ get_slats()

double FGControls::get_slats ( ) const
inline

Definition at line 299 of file controls.hxx.

◆ get_speed_select()

double FGControls::get_speed_select ( ) const
inline

Definition at line 462 of file controls.hxx.

◆ get_speedbrake()

double FGControls::get_speedbrake ( ) const
inline

Definition at line 302 of file controls.hxx.

◆ get_spoilers()

double FGControls::get_spoilers ( ) const
inline

Definition at line 301 of file controls.hxx.

◆ get_starter()

bool FGControls::get_starter ( int engine) const
inline

Definition at line 312 of file controls.hxx.

◆ get_station_select()

int FGControls::get_station_select ( ) const
inline

Definition at line 428 of file controls.hxx.

◆ get_steering()

double FGControls::get_steering ( ) const
inline

Definition at line 361 of file controls.hxx.

◆ get_stick_size()

int FGControls::get_stick_size ( int station) const
inline

Definition at line 432 of file controls.hxx.

◆ get_strobe()

bool FGControls::get_strobe ( ) const
inline

Definition at line 421 of file controls.hxx.

◆ get_tailhook()

bool FGControls::get_tailhook ( ) const
inline

Definition at line 365 of file controls.hxx.

◆ get_tailwheel_lock()

bool FGControls::get_tailwheel_lock ( ) const
inline

Definition at line 368 of file controls.hxx.

◆ get_taxi_light()

bool FGControls::get_taxi_light ( ) const
inline

Definition at line 417 of file controls.hxx.

◆ get_throttle()

double FGControls::get_throttle ( int engine) const
inline

Definition at line 311 of file controls.hxx.

◆ get_throttle_idle()

bool FGControls::get_throttle_idle ( ) const
inline

Definition at line 308 of file controls.hxx.

◆ get_to_engine()

int FGControls::get_to_engine ( int tank) const
inline

Definition at line 347 of file controls.hxx.

◆ get_to_tank()

int FGControls::get_to_tank ( int tank) const
inline

Definition at line 348 of file controls.hxx.

◆ get_turn_off_lights()

bool FGControls::get_turn_off_lights ( ) const
inline

Definition at line 416 of file controls.hxx.

◆ get_vertical_adjust()

double FGControls::get_vertical_adjust ( ) const
inline

Definition at line 438 of file controls.hxx.

◆ get_vertical_mode()

int FGControls::get_vertical_mode ( ) const
inline

Definition at line 464 of file controls.hxx.

◆ get_vertical_speed_select()

double FGControls::get_vertical_speed_select ( ) const
inline

Definition at line 459 of file controls.hxx.

◆ get_water_injection()

bool FGControls::get_water_injection ( int engine) const
inline

Definition at line 335 of file controls.hxx.

◆ get_window_heat()

bool FGControls::get_window_heat ( ) const
inline

Definition at line 379 of file controls.hxx.

◆ get_wing_fold()

bool FGControls::get_wing_fold ( ) const
inline

Definition at line 304 of file controls.hxx.

◆ get_wing_heat()

bool FGControls::get_wing_heat ( ) const
inline

Definition at line 376 of file controls.hxx.

◆ get_wing_sweep()

double FGControls::get_wing_sweep ( ) const
inline

Definition at line 303 of file controls.hxx.

◆ get_wiper()

int FGControls::get_wiper ( ) const
inline

Definition at line 378 of file controls.hxx.

◆ init()

void FGControls::init ( )
override

Definition at line 170 of file controls.cxx.

◆ reinit()

void FGControls::reinit ( )
override

Definition at line 175 of file controls.cxx.

◆ reset_all()

void FGControls::reset_all ( void )

Definition at line 84 of file controls.cxx.

◆ set_aileron()

void FGControls::set_aileron ( double pos)

Definition at line 463 of file controls.cxx.

◆ set_aileron_trim()

void FGControls::set_aileron_trim ( double pos)

Definition at line 485 of file controls.cxx.

◆ set_augmentation()

void FGControls::set_augmentation ( int engine,
bool val )

Definition at line 1003 of file controls.cxx.

◆ set_cutoff()

void FGControls::set_cutoff ( int engine,
bool val )

Definition at line 777 of file controls.cxx.

◆ set_elevator()

void FGControls::set_elevator ( double pos)

Definition at line 505 of file controls.cxx.

◆ set_elevator_trim()

void FGControls::set_elevator_trim ( double pos)

Definition at line 525 of file controls.cxx.

◆ set_magnetos()

void FGControls::set_magnetos ( int engine,
int pos )

Definition at line 886 of file controls.cxx.

◆ set_mixture()

void FGControls::set_mixture ( int engine,
double pos )

Definition at line 815 of file controls.cxx.

◆ set_reverser()

void FGControls::set_reverser ( int engine,
bool val )

Definition at line 1024 of file controls.cxx.

◆ set_rudder()

void FGControls::set_rudder ( double pos)

Definition at line 545 of file controls.cxx.

◆ set_starter()

void FGControls::set_starter ( int engine,
bool flag )

Definition at line 714 of file controls.cxx.

◆ set_throttle()

void FGControls::set_throttle ( int engine,
double pos )

Definition at line 676 of file controls.cxx.

◆ set_water_injection()

void FGControls::set_water_injection ( int engine,
bool val )

Definition at line 1045 of file controls.cxx.

◆ staticSubsystemClassId()

static const char * FGControls::staticSubsystemClassId ( )
inlinestatic

Definition at line 285 of file controls.hxx.

◆ unbind()

void FGControls::unbind ( )
override

Definition at line 430 of file controls.cxx.

◆ update()

void FGControls::update ( double dt)
override

Definition at line 450 of file controls.cxx.


The documentation for this class was generated from the following files: