Hi all,
First a bit of background to this
request:
I am just starting off a thesis project for my
engineering degree, with the task of building a cockpit mockup of a single
engine light aircraft that my university has designed. Something in the same
sort of class as a cessna 172. The aim is to have a functional cockpit,
especially with regards to flight and engine instruments and
controls.
I was already playing with flightgear, and decided
to use this as the basis for the project, especially once i got the openGc addon
working and found more about the network broadcast abilities of
flightgear.
To control all the instruments I will be using
either stepper motors ( altimeter etc), or air core meters (from car speedos,
for airspeed etc) which are driven by a microcontroller (Mc68Hc11 to be exact).
I know this is not the absolute easiest way of doing this, but it appeals to me
as being one of the more powerfull ways of controlling a reasonable number of
instruments, with all the control done by software.
I am looking at two ways of getting the data from
the pc running flightgear to the microcontroller. My initial choice is to use a
simple network card for the microcontroller, and use flightgear to
broadcast udp packets at a set rate, which are then read, interpreted, and the
instruments are driven to the right positions. This network card is a
self-assemble job, which i have, but have not yet debugged to get it
working.
The other option which may be easier, is to connect
the microcontroller to the serial port, and somehow modify/add to flightgear the
ability to transmit that same data directly to the micro. Connecting to the
serial port is how I am programming the micro at the moment after
all.
Some of the details for implementing these would be
things like:
- finding a way to reduce the frequency at which
the data is transmitted. Since things like the airspeed will really only be
useful at integer values, there is probably not much value in continually
transmitting data when the changes are well below the resolution of the
instruments! I know that the rate of broadcast over the network is set by
command line during startup, but is it possible or viable to make it only
transmit when values have changed by a certain amount?
- if using the serial port option, to also receive
a reply from the micro with the current values displayed, to be able to keep
things in sync. (May not be required?)
I noticed in the IO readme, that there is an option
for using 'serial' as the medium. Does this work as i assume, or is it only to
help show the general form of the startup commands? The only other serial stuff
is to do with NMEA, which as far as i understand is the format for gps, and so
is not the whole flight dynamics data.
Would a hack between the nmea and the fgopengc
classes work to enable me to be able to transmit the OpenGC flight dynamics data
onto the serial port?
Thanks for any comments to do with
this.
Tim Jelliffe
|
- Re: [Flightgear-devel] Sending flight dynamics data to se... Tim Jelliffe
- Re: [Flightgear-devel] Sending flight dynamics data ... Duncan McCreanor