1 /**************************************************************************
2 * autopilot.hxx -- autopilot defines and prototypes (very alpha)
4 * Written by Jeff Goeke-Smith, started April 1998.
6 * Copyright (C) 1998 Jeff Goeke-Smith - jgoeke@voyager.net
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 **************************************************************************/
30 #include <Aircraft/aircraft.hxx>
31 #include <Flight/flight.hxx>
32 #include <Controls/controls.hxx>
42 int heading_hold; // the current state of the heading hold
43 int altitude_hold; // the current state of the altitude hold
44 int terrain_follow; // the current state of the terrain follower
45 int auto_throttle; // the current state of the auto throttle
47 double TargetHeading; // the heading the AP should steer to.
48 double TargetAltitude; // altitude to hold
49 double TargetAGL; // the terrain separation
50 double TargetClimbRate; // climb rate to shoot for
51 double TargetSpeed; // speed to shoot for
52 double alt_error_accum; // altitude error accumulator
53 double speed_error_accum; // speed error accumulator
55 double TargetSlope; // the glide slope hold value
57 double MaxRoll ; // the max the plane can roll for the turn
58 double RollOut; // when the plane should roll out
59 // measured from Heading
60 double MaxAileron; // how far to move the aleroin from center
61 double RollOutSmooth; // deg to use for smoothing Aileron Control
62 double MaxElevator; // the maximum elevator allowed
63 double SlopeSmooth; // smoothing angle for elevator
65 } fgAPData, *fgAPDataPtr ;
69 #define AP_CURRENT_HEADING -1
73 void fgAPInit( fgAIRCRAFT *current_aircraft );
75 void fgAPToggleHeading( void );
76 void fgAPToggleAltitude( void );
77 void fgAPToggleTerrainFollow( void );
78 void fgAPToggleAutoThrottle( void );
86 #endif // _AUTOPILOT_H