//
// Written by Curtis Olson, started January 2004.
//
-// Copyright (C) 2004 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2004 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
virtual ~FGXMLAutoComponent() {}
- virtual void update (double dt) {}
+ virtual void update (double dt)=0;
- inline string get_name() { return name; }
+ inline const string& get_name() { return name; }
};
double r_n; // reference (set point) value
double y_scale; // scale process input from property system
double r_scale; // scale reference input from property system
+ double y_offset;
+ double r_offset;
// Configuration values
double Kp; // proportional gain
double edf_n_1; // edf[n-1] (derivative error)
double edf_n_2; // edf[n-2] (derivative error)
double u_n_1; // u[n-1] (output)
+ double desiredTs; // desired sampling interval (sec)
+ double elapsedTime; // elapsed time (sec)
double rateOfChange; // The maximum allowable rate of change [1/s]
deque <double> output;
deque <double> input;
- string filterType;
+ enum filterTypes { exponential, doubleExponential, movingAverage, noiseSpike };
+ filterTypes filterType;
bool debug;