-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGTrimAxis.h
Author: Tony Peden
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGTRIMAXIS_H
#define FGTRIMAXIS_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <string>
"Roll Angle", "Flight Path Angle",
"Pitch Trim", "Roll Trim", "Yaw Trim"
};
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
enum Accel { tUdot,tVdot,tWdot,tQdot,tPdot,tRdot };
enum Control { tThrottle, tBeta, tAlpha, tElevator, tAileron, tRudder, tAltAGL,
~FGTrimAxis();
void Run(void);
-
+
float GetAccel(void) { getAccel(); return accel_value; }
//Accels are not settable
inline void SetControl(float value ) { control_value=value; }
inline void SetControlToMin(void) { control_value=control_min; }
inline void SetControlToMax(void) { control_value=control_max; }
+
+ inline void SetControlLimits(float min, float max) {
+ control_min=min;
+ control_max=max;
+ }
inline void SetTolerance(float ff) { tolerance=ff;}
inline float GetTolerance(void) { return tolerance; }
void SetThetaOnGround(float ff);
void SetPhiOnGround(float ff);
-
+
+ bool initTheta(void);
+
void AxisReport(void);
bool InTolerance(void) { getAccel(); return (fabs(accel_value) <= tolerance); }
void getAccel(void);
void getControl(void);
void setControl(void);
+
+
};