1 // controls.hxx -- defines a standard interface to all flight sim controls
2 //
3 // Written by Curtis Olson, started May 1997.
4 //
5 // Copyright (C) 1997  Curtis L. Olson  - http://www.flightgear.org/~curt
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 //
21 // $Id$
22 
23 
24 #ifndef _CONTROLS_HXX
25 #define _CONTROLS_HXX
26 
27 #include <simgear/structure/subsystem_mgr.hxx>
28 #include <simgear/props/tiedpropertylist.hxx>
29 
30 // Define a structure containing the control parameters
31 
32 class FGControls : public SGSubsystem
33 {
34 public:
35     enum {
36         ALL_ENGINES = -1,
37         MAX_ENGINES = 12
38     };
39 
40     enum {
41         ALL_WHEELS = -1,
42         MAX_WHEELS = 3
43     };
44 
45     enum {
46         ALL_TANKS = -1,
47         MAX_TANKS = 8
48     };
49 
50     enum {
51         ALL_BOOSTPUMPS = -1,
52         MAX_BOOSTPUMPS = 2
53     };
54 
55     enum {
56         ALL_HYD_SYSTEMS = -1,
57         MAX_HYD_SYSTEMS = 4
58     };
59 
60     enum {
61         ALL_PACKS = -1,
62         MAX_PACKS = 4
63     };
64 
65     enum {
66         ALL_LIGHTS = -1,
67         MAX_LIGHTS = 4
68     };
69 
70     enum {
71         ALL_STATIONS = -1,
72         MAX_STATIONS = 12
73     };
74 
75     enum {
76         ALL_AUTOPILOTS = -1,
77         MAX_AUTOPILOTS = 3
78     };
79 
80     enum {
81         ALL_EJECTION_SEATS = -1,
82         MAX_EJECTION_SEATS = 10
83     };
84 
85     enum {
86         SEAT_SAFED = -1,
87         SEAT_ARMED = 0,
88         SEAT_FAIL = 1
89     };
90 
91     enum {
92         CMD_SEL_NORM = -1,
93         CMD_SEL_AFT = 0,
94         CMD_SEL_SOLO = 1
95     };
96 
97 private:
98     // controls/flight/
99     double aileron;
100     double aileron_trim;
101     double elevator;
102     double elevator_trim;
103     double rudder;
104     double rudder_trim;
105     double flaps;
106     double slats;
107     bool BLC;          // Boundary Layer Control
108     double spoilers;
109     double speedbrake;
110     double wing_sweep;
111     bool wing_fold;
112     bool drag_chute;
113 
114     // controls/engines/
115     bool throttle_idle;
116 
117     // controls/engines/engine[n]/
118     double throttle[MAX_ENGINES];
119     bool starter[MAX_ENGINES];
120     bool fuel_pump[MAX_ENGINES];
121     bool fire_switch[MAX_ENGINES];
122     bool fire_bottle_discharge[MAX_ENGINES];
123     bool cutoff[MAX_ENGINES];
124     double mixture[MAX_ENGINES];
125     double prop_advance[MAX_ENGINES];
126     int magnetos[MAX_ENGINES];
127     int feed_tank[MAX_ENGINES];
128     bool nitrous_injection[MAX_ENGINES];  // War Emergency Power
129     double cowl_flaps_norm[MAX_ENGINES];
130     bool feather[MAX_ENGINES];
131     int ignition[MAX_ENGINES];
132     bool augmentation[MAX_ENGINES];
133     bool reverser[MAX_ENGINES];
134     bool water_injection[MAX_ENGINES];
135     double condition[MAX_ENGINES];           // turboprop speed select
136 
137     // controls/fuel/
138     bool dump_valve;
139 
140     // controls/fuel/tank[n]/
141     bool fuel_selector[MAX_TANKS];
142     int to_engine[MAX_TANKS];
143     int to_tank[MAX_TANKS];
144 
145     // controls/fuel/tank[n]/pump[p]/
146     bool boost_pump[MAX_TANKS * MAX_BOOSTPUMPS];
147 
148     // controls/gear/
149     double brake_left;
150     double brake_right;
151     double copilot_brake_left;
152     double copilot_brake_right;
153     double brake_parking;
154     double steering;
155     bool nose_wheel_steering;
156     bool gear_down;
157     bool antiskid;
158     bool tailhook;
159     bool launchbar;
160     bool catapult_launch_cmd;
161     bool tailwheel_lock;
162 
163     // controls/gear/wheel[n]/
164     bool alternate_extension[MAX_WHEELS];
165 
166     // controls/anti-ice/
167     bool wing_heat;
168     bool pitot_heat;
169     int wiper;
170     bool window_heat;
171 
172     // controls/anti-ice/engine[n]/
173     bool carb_heat[MAX_ENGINES];
174     bool inlet_heat[MAX_ENGINES];
175 
176     // controls/hydraulic/system[n]/
177     bool engine_pump[MAX_HYD_SYSTEMS];
178     bool electric_pump[MAX_HYD_SYSTEMS];
179 
180     // controls/electric/
181     bool battery_switch;
182     bool external_power;
183     bool APU_generator;
184 
185     // controls/electric/engine[n]/
186     bool generator_breaker[MAX_ENGINES];
187     bool bus_tie[MAX_ENGINES];
188 
189     // controls/pneumatic/
190     bool APU_bleed;
191 
192     // controls/pneumatic/engine[n]/
193     bool engine_bleed[MAX_ENGINES];
194 
195     // controls/pressurization/
196     int mode;
197     bool dump;
198     double outflow_valve;
199 
200     // controls/pressurization/pack[n]/
201     bool pack_on[MAX_PACKS];
202 
203     // controls/lighting/
204     bool landing_lights;
205     bool turn_off_lights;
206     bool taxi_light;
207     bool logo_lights;
208     bool nav_lights;
209     bool beacon;
210     bool strobe;
211     double panel_norm;
212     double instruments_norm;
213     double dome_norm;
214 
215     // controls/armament/
216     bool master_arm;
217     int station_select;
218     bool release_ALL;
219 
220     // controls/armament/station[n]/
221     int stick_size[MAX_STATIONS];
222     bool release_stick[MAX_STATIONS];
223     bool release_all[MAX_STATIONS];
224     bool jettison_all[MAX_STATIONS];
225 
226     // controls/seat/
227     double vertical_adjust;
228     double fore_aft_adjust;
229     bool eject[MAX_EJECTION_SEATS];
230     int eseat_status[MAX_EJECTION_SEATS];
231     int cmd_selector_valve;
232 
233     // controls/APU/
234     int off_start_run;
235     bool APU_fire_switch;
236 
237     // controls/autoflight/autopilot[n]/
238     bool autopilot_engage[MAX_AUTOPILOTS];
239 
240     // controls/autoflight/
241     bool autothrottle_arm;
242     bool autothrottle_engage;
243     double heading_select;
244     double altitude_select;
245     double bank_angle_select;
246     double vertical_speed_select;
247     double speed_select;
248     double mach_select;
249     int vertical_mode;
250     int lateral_mode;
251 
252     SGPropertyNode_ptr auto_coordination;
253     SGPropertyNode_ptr auto_coordination_factor;
254     simgear::TiedPropertyList _tiedProperties;
255 
256 public:
257     FGControls();
258     ~FGControls();
259 
260     // Subsystem API.
261     void bind() override;
262     void init() override;
263     void reinit() override;
264     void unbind() override;
265     void update(double dt) override;
266 
267     // Subsystem identification.
staticSubsystemClassId()268     static const char* staticSubsystemClassId() { return "controls"; }
269 
270     // Reset function
271     void reset_all(void);
272 
273     // Query functions
274     // controls/flight/
get_aileron() const275     inline double get_aileron() const { return aileron; }
get_aileron_trim() const276     inline double get_aileron_trim() const { return aileron_trim; }
get_elevator() const277     inline double get_elevator() const { return elevator; }
get_elevator_trim() const278     inline double get_elevator_trim() const { return elevator_trim; }
get_rudder() const279     inline double get_rudder() const { return rudder; }
get_rudder_trim() const280     inline double get_rudder_trim() const { return rudder_trim; }
get_flaps() const281     inline double get_flaps() const { return flaps; }
get_slats() const282     inline double get_slats() const { return slats; }
get_BLC() const283     inline bool get_BLC() const { return BLC; }
get_spoilers() const284     inline double get_spoilers() const { return spoilers; }
get_speedbrake() const285     inline double get_speedbrake() const { return speedbrake; }
get_wing_sweep() const286     inline double get_wing_sweep() const { return wing_sweep; }
get_wing_fold() const287     inline bool get_wing_fold() const { return wing_fold; }
get_drag_chute() const288     inline bool get_drag_chute() const { return drag_chute; }
289 
290     // controls/engines/
get_throttle_idle() const291     inline bool get_throttle_idle() const { return throttle_idle; }
292 
293     // controls/engines/engine[n]/
get_throttle(int engine) const294     inline double get_throttle(int engine) const { return throttle[engine]; }
get_starter(int engine) const295     inline bool get_starter(int engine) const { return starter[engine]; }
get_fuel_pump(int engine) const296     inline bool get_fuel_pump(int engine) const { return fuel_pump[engine]; }
get_fire_switch(int engine) const297     inline bool get_fire_switch(int engine) const { return fire_switch[engine]; }
get_fire_bottle_discharge(int engine) const298     inline bool get_fire_bottle_discharge(int engine) const {
299         return fire_bottle_discharge[engine];
300     }
get_cutoff(int engine) const301     inline bool get_cutoff(int engine) const { return cutoff[engine]; }
get_mixture(int engine) const302     inline double get_mixture(int engine) const { return mixture[engine]; }
get_prop_advance(int engine) const303     inline double get_prop_advance(int engine) const {
304         return prop_advance[engine];
305     }
get_magnetos(int engine) const306     inline int get_magnetos(int engine) const { return magnetos[engine]; }
get_feed_tank(int engine) const307     inline int get_feed_tank(int engine) const { return feed_tank[engine]; }
get_nitrous_injection(int engine) const308     inline bool get_nitrous_injection(int engine) const {
309         return nitrous_injection[engine];
310     }
get_cowl_flaps_norm(int engine) const311     inline double get_cowl_flaps_norm(int engine) const {
312         return cowl_flaps_norm[engine];
313     }
get_feather(int engine) const314     inline bool get_feather(int engine) const { return feather[engine]; }
get_ignition(int engine) const315     inline int get_ignition(int engine) const { return ignition[engine]; }
get_augmentation(int engine) const316     inline bool get_augmentation(int engine) const { return augmentation[engine]; }
get_reverser(int engine) const317     inline bool get_reverser(int engine) const { return reverser[engine]; }
get_water_injection(int engine) const318     inline bool get_water_injection(int engine) const {
319         return water_injection[engine];
320     }
get_condition(int engine) const321     inline double get_condition(int engine) const { return condition[engine]; }
322 
323     // controls/fuel/
get_dump_valve() const324     inline bool get_dump_valve() const { return dump_valve; }
325 
326     // controls/fuel/tank[n]/
get_fuel_selector(int tank) const327     inline bool get_fuel_selector(int tank) const {
328         return fuel_selector[tank];
329     }
get_to_engine(int tank) const330     inline int get_to_engine(int tank) const { return to_engine[tank]; }
get_to_tank(int tank) const331     inline int get_to_tank(int tank) const { return to_tank[tank]; }
332 
333     // controls/fuel/tank[n]/pump[p]/
get_boost_pump(int index) const334     inline bool get_boost_pump(int index) const {
335         return boost_pump[index];
336     }
337 
338     // controls/gear/
get_brake_left() const339     inline double get_brake_left() const { return brake_left; }
get_brake_right() const340     inline double get_brake_right() const { return brake_right; }
get_copilot_brake_left() const341     inline double get_copilot_brake_left() const { return copilot_brake_left; }
get_copilot_brake_right() const342     inline double get_copilot_brake_right() const { return copilot_brake_right; }
get_brake_parking() const343     inline double get_brake_parking() const { return brake_parking; }
get_steering() const344     inline double get_steering() const { return steering; }
get_nose_wheel_steering() const345     inline bool get_nose_wheel_steering() const { return nose_wheel_steering; }
get_gear_down() const346     inline bool get_gear_down() const { return gear_down; }
get_antiskid() const347     inline bool get_antiskid() const { return antiskid; }
get_tailhook() const348     inline bool get_tailhook() const { return tailhook; }
get_launchbar() const349     inline bool get_launchbar() const { return launchbar; }
get_catapult_launch_cmd() const350     inline bool get_catapult_launch_cmd() const { return catapult_launch_cmd; }
get_tailwheel_lock() const351     inline bool get_tailwheel_lock() const { return tailwheel_lock; }
352 
353     // controls/gear/wheel[n]/
get_alternate_extension(int wheel) const354     inline bool get_alternate_extension(int wheel) const {
355         return alternate_extension[wheel];
356     }
357 
358     // controls/anti-ice/
get_wing_heat() const359     inline bool get_wing_heat() const { return wing_heat; }
get_pitot_heat() const360     inline bool get_pitot_heat() const { return pitot_heat; }
get_wiper() const361     inline int get_wiper() const { return wiper; }
get_window_heat() const362     inline bool get_window_heat() const { return window_heat; }
363 
364     // controls/anti-ice/engine[n]/
get_carb_heat(int engine) const365     inline bool get_carb_heat(int engine) const { return carb_heat[engine]; }
get_inlet_heat(int engine) const366     inline bool get_inlet_heat(int engine) const { return inlet_heat[engine]; }
367 
368     // controls/hydraulic/system[n]/
get_engine_pump(int system) const369     inline bool get_engine_pump(int system) const { return engine_pump[system]; }
get_electric_pump(int system) const370     inline bool get_electric_pump(int system) const { return electric_pump[system]; }
371 
372     // controls/electric/
get_battery_switch() const373     inline bool get_battery_switch() const { return battery_switch; }
get_external_power() const374     inline bool get_external_power() const { return external_power; }
get_APU_generator() const375     inline bool get_APU_generator() const { return APU_generator; }
376 
377     // controls/electric/engine[n]/
get_generator_breaker(int engine) const378     inline bool get_generator_breaker(int engine) const {
379         return generator_breaker[engine];
380     }
get_bus_tie(int engine) const381     inline bool get_bus_tie(int engine) const { return bus_tie[engine]; }
382 
383     // controls/pneumatic/
get_APU_bleed() const384     inline bool get_APU_bleed() const { return APU_bleed; }
385 
386     // controls/pneumatic/engine[n]/
get_engine_bleed(int engine) const387     inline bool get_engine_bleed(int engine) const { return engine_bleed[engine]; }
388 
389     // controls/pressurization/
get_mode() const390     inline int get_mode() const { return mode; }
get_outflow_valve() const391     inline double get_outflow_valve() const { return outflow_valve; }
get_dump() const392     inline bool get_dump() const { return dump; }
393 
394     // controls/pressurization/pack[n]/
get_pack_on(int pack) const395     inline bool get_pack_on(int pack) const { return pack_on[pack]; }
396 
397     // controls/lighting/
get_landing_lights() const398     inline bool get_landing_lights() const { return landing_lights; }
get_turn_off_lights() const399     inline bool get_turn_off_lights() const { return  turn_off_lights; }
get_taxi_light() const400     inline bool get_taxi_light() const { return taxi_light; }
get_logo_lights() const401     inline bool get_logo_lights() const { return logo_lights; }
get_nav_lights() const402     inline bool get_nav_lights() const { return nav_lights; }
get_beacon() const403     inline bool get_beacon() const { return beacon; }
get_strobe() const404     inline bool get_strobe() const { return strobe; }
get_panel_norm() const405     inline double get_panel_norm() const { return panel_norm; }
get_instruments_norm() const406     inline double get_instruments_norm() const { return instruments_norm; }
get_dome_norm() const407     inline double get_dome_norm() const { return dome_norm; }
408 
409     // controls/armament/
get_master_arm() const410     inline bool get_master_arm() const { return master_arm; }
get_station_select() const411     inline int get_station_select() const { return station_select; }
get_release_ALL() const412     inline bool get_release_ALL() const { return release_ALL; }
413 
414       // controls/armament/station[n]/
get_stick_size(int station) const415     inline int get_stick_size(int station) const { return stick_size[station]; }
get_release_stick(int station) const416     inline bool get_release_stick(int station) const { return release_stick[station]; }
get_release_all(int station) const417     inline bool get_release_all(int station) const { return release_all[station]; }
get_jettison_all(int station) const418     inline bool get_jettison_all(int station) const { return jettison_all[station]; }
419 
420     // controls/seat/
get_vertical_adjust() const421     inline double get_vertical_adjust() const { return vertical_adjust; }
get_fore_aft_adjust() const422     inline double get_fore_aft_adjust() const { return fore_aft_adjust; }
get_ejection_seat(int which_seat) const423     inline bool get_ejection_seat( int which_seat ) const {
424         return eject[which_seat];
425     }
get_eseat_status(int which_seat) const426     inline int get_eseat_status( int which_seat ) const {
427         return eseat_status[which_seat];
428     }
get_cmd_selector_valve() const429     inline int get_cmd_selector_valve() const { return cmd_selector_valve; }
430 
431 
432     // controls/APU/
get_off_start_run() const433     inline int get_off_start_run() const { return off_start_run; }
get_APU_fire_switch() const434     inline bool get_APU_fire_switch() const { return APU_fire_switch; }
435 
436     // controls/autoflight/
get_autothrottle_arm() const437     inline bool get_autothrottle_arm() const { return autothrottle_arm; }
get_autothrottle_engage() const438     inline bool get_autothrottle_engage() const { return autothrottle_engage; }
get_heading_select() const439     inline double get_heading_select() const { return heading_select; }
get_altitude_select() const440     inline double get_altitude_select() const { return altitude_select; }
get_bank_angle_select() const441     inline double get_bank_angle_select() const { return bank_angle_select; }
get_vertical_speed_select() const442     inline double get_vertical_speed_select() const {
443         return vertical_speed_select;
444     }
get_speed_select() const445     inline double get_speed_select() const { return speed_select; }
get_mach_select() const446     inline double get_mach_select() const { return mach_select; }
get_vertical_mode() const447     inline int get_vertical_mode() const { return vertical_mode; }
get_lateral_mode() const448     inline int get_lateral_mode() const { return lateral_mode; }
449 
450     // controls/autoflight/autopilot[n]/
get_autopilot_engage(int ap) const451     inline bool get_autopilot_engage(int ap) const {
452         return autopilot_engage[ap];
453     }
454 
455 
456     // Update functions
457     // controls/flight/
458     void set_aileron( double pos );
459     void move_aileron( double amt );
460     void set_aileron_trim( double pos );
461     void move_aileron_trim( double amt );
462     void set_elevator( double pos );
463     void move_elevator( double amt );
464     void set_elevator_trim( double pos );
465     void move_elevator_trim( double amt );
466     void set_rudder( double pos );
467     void move_rudder( double amt );
468     void set_rudder_trim( double pos );
469     void move_rudder_trim( double amt );
470     void set_flaps( double pos );
471     void move_flaps( double amt );
472     void set_slats( double pos );
473     void move_slats( double amt );
474     void set_BLC( bool val );
475     void set_spoilers( double pos );
476     void move_spoilers( double amt );
477     void set_speedbrake( double pos );
478     void move_speedbrake( double amt );
479     void set_wing_sweep( double pos );
480     void move_wing_sweep( double amt );
481     void set_wing_fold( bool val );
482     void set_drag_chute( bool val );
483 
484     // controls/engines/
485     void set_throttle_idle( bool val );
486 
487     // controls/engines/engine[n]/
488     void set_throttle( int engine, double pos );
489     void move_throttle( int engine, double amt );
490     void set_starter( int engine, bool flag );
491     void set_fuel_pump( int engine, bool val );
492     void set_fire_switch( int engine, bool val );
493     void set_fire_bottle_discharge( int engine, bool val );
494     void set_cutoff( int engine, bool val );
495     void set_mixture( int engine, double pos );
496     void move_mixture( int engine, double amt );
497     void set_prop_advance( int engine, double pos );
498     void move_prop_advance( int engine, double amt );
499     void set_magnetos( int engine, int pos );
500     void move_magnetos( int engine, int amt );
501     void set_feed_tank( int engine, int tank );
502     void set_nitrous_injection( int engine, bool val );
503     void set_cowl_flaps_norm( int engine, double pos );
504     void move_cowl_flaps_norm( int engine, double amt );
505     void set_feather( int engine, bool val );
506     void set_ignition( int engine, int val );
507     void set_augmentation( int engine, bool val );
508     void set_reverser( int engine, bool val );
509     void set_water_injection( int engine, bool val );
510     void set_condition( int engine, double val );
511 
512     // controls/fuel
513     void set_dump_valve( bool val );
514 
515     // controls/fuel/tank[n]/
516     void set_fuel_selector( int tank, bool pos );
517     void set_to_engine( int tank, int engine );
518     void set_to_tank( int tank, int dest_tank );
519 
520     // controls/fuel/tank[n]/pump[p]
521     void set_boost_pump( int index, bool val );
522 
523     // controls/gear/
524     void set_brake_left( double pos );
525     void move_brake_left( double amt );
526     void set_brake_right( double pos );
527     void move_brake_right( double amt );
528     void set_copilot_brake_left( double pos );
529     void set_copilot_brake_right( double pos );
530     void set_brake_parking( double pos );
531     void set_steering( double pos );
532     void move_steering( double amt );
533     void set_nose_wheel_steering( bool nws );
534     void set_gear_down( bool gear );
535     void set_antiskid( bool val );
536     void set_tailhook( bool val );
537     void set_launchbar( bool val );
538     void set_catapult_launch_cmd( bool val );
539     void set_tailwheel_lock( bool val );
540 
541     // controls/gear/wheel[n]/
542     void set_alternate_extension( int wheel, bool val );
543 
544     // controls/anti-ice/
545     void set_wing_heat( bool val );
546     void set_pitot_heat( bool val );
547     void set_wiper( int speed );
548     void set_window_heat( bool val );
549 
550     // controls/anti-ice/engine[n]/
551     void set_carb_heat( int engine, bool val );
552     void set_inlet_heat( int engine, bool val );
553 
554     // controls/hydraulic/system[n]/
555     void set_engine_pump( int system, bool val );
556     void set_electric_pump( int system, bool val );
557 
558     // controls/electric/
559     void set_battery_switch( bool val );
560     void set_external_power( bool val );
561     void set_APU_generator( bool val );
562 
563     // controls/electric/engine[n]/
564     void set_generator_breaker( int engine, bool val );
565     void set_bus_tie( int engine, bool val );
566 
567     // controls/pneumatic/
568     void set_APU_bleed( bool val );
569 
570     // controls/pneumatic/engine[n]/
571     void set_engine_bleed( int engine, bool val );
572 
573     // controls/pressurization/
574     void set_mode( int mode );
575     void set_outflow_valve( double pos );
576     void move_outflow_valve( double amt );
577     void set_dump( bool val );
578 
579     // controls/pressurization/pack[n]/
580     void set_pack_on( int pack, bool val );
581 
582     // controls/lighting/
583     void set_landing_lights( bool val );
584     void set_turn_off_lights( bool val );
585     void set_taxi_light( bool val );
586     void set_logo_lights( bool val );
587     void set_nav_lights( bool val );
588     void set_beacon( bool val );
589     void set_strobe( bool val );
590     void set_panel_norm( double intensity );
591     void move_panel_norm( double amt );
592     void set_instruments_norm( double intensity );
593     void move_instruments_norm( double amt );
594     void set_dome_norm( double intensity );
595     void move_dome_norm( double amt );
596 
597     // controls/armament/
598     void set_master_arm( bool val );
599     void set_station_select( int station );
600     void set_release_ALL( bool val );
601 
602     // controls/armament/station[n]/
603     void set_stick_size( int station, int size );
604     void set_release_stick( int station, bool val );
605     void set_release_all( int station, bool val );
606     void set_jettison_all( int station, bool val );
607 
608     // controls/seat/
609     void set_vertical_adjust( double pos );
610     void move_vertical_adjust( double amt );
611     void set_fore_aft_adjust( double pos );
612     void move_fore_aft_adjust( double amt );
613     void set_ejection_seat( int which_seat, bool val );
614     void set_eseat_status( int which_seat, int val );
615     void set_cmd_selector_valve( int val );
616 
617     // controls/APU/
618     void set_off_start_run( int pos );
619     void set_APU_fire_switch( bool val );
620 
621     // controls/autoflight/
622     void set_autothrottle_arm( bool val );
623     void set_autothrottle_engage( bool val );
624     void set_heading_select( double heading );
625     void move_heading_select( double amt );
626     void set_altitude_select( double altitude );
627     void move_altitude_select( double amt );
628     void set_bank_angle_select( double angle );
629     void move_bank_angle_select( double amt );
630     void set_vertical_speed_select( double vs );
631     void move_vertical_speed_select( double amt );
632     void set_speed_select( double speed );
633     void move_speed_select( double amt );
634     void set_mach_select( double mach );
635     void move_mach_select( double amt );
636     void set_vertical_mode( int mode );
637     void set_lateral_mode( int mode );
638 
639     // controls/autoflight/autopilot[n]/
640     void set_autopilot_engage( int ap, bool val );
641 
642 private:
do_autocoordination()643     inline void do_autocoordination() {
644         // check for autocoordination
645         if ( auto_coordination->getBoolValue() ) {
646             double factor = auto_coordination_factor->getDoubleValue();
647             if( factor > 0.0 ) set_rudder( aileron * factor );
648         }
649     }
650 };
651 
652 #endif // _CONTROLS_HXX
653 
654 
655