[EMAIL PROTECTED] wrote:

I am working on a autopilot project and we need a flight simulator to prove our control method before use it on a real aircraft. Is there any interface to
get the attitude of aircraft from and send control data to flightgear. I mean get
the altitude, rate, accelerate and so on from it and send rudder, elevator,
aileron and throttle data to flightgear to control a aircraft. Thanks


Hi,

you can use the properties tree. If you look in the source code there are examples of how to access the telnet server of FlightGear using several programming languages like C, java, perl, python, ...(in utils/ I think).
Some properties are (you can find them in the File->Browse Internal Properties menu):


/orientation/alpha-deg[0]
/orientation/heading-deg[0]
/orientation/pitch-deg[0]
/orientation/roll-deg[0]
/position/altitude-agl-ft[0]
/position/altitude-ft[0]
/position/latitude-deg[0]
/position/longitude-deg[0]
/velocities/airspeed-kt[0]
/velocities/speed-down-fps[0]
/velocities/speed-east-fps[0]
/velocities/north-fps[0]
/velocities/vertical-speed-fps[0]
/controls/flight/aileron[0]
/controls/flight/elevator[0]
/controls/flight/rudder[0]
/controls/engines/engine/throttle[0]

The previous properties were all in double format and can be read or set (through a .get() or .set() method/function, see in the source code).
The following are floats:


/surface-positions/elevator-pos-norm[0]
/surface-positions/left-aileron-pos-norm[0]
/surface-positions/right-aileron-pos-norm[0]
/surface-positions/rudder-pos-norm[0]

There are dozens more, you can find them all if you click File->Browse Internal Properties while running FlightGear. A list of all properties does not exist at the moment, that is, not with all the properties: these are the ones I intend to use to test my own autopilot code (feel free to contact me).

Greets,

Steven


_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to