# $Id: sensors,v 1.4 2001/11/01 20:50:05 tramm Exp $

Some thoughts on output formats and data streams from the realtime
system.  Comments are welcome!

There are four groups of output:

1. Attitude (roll, pitch, heading)
2. Engine stats (N1, N2, CHT, EGT, Fuel, Voltage)
3. Position (lat, long, alt)
4. Payload stats (???)

Of these, the attitude is the most important.  I would rank the
priorities for the realtime and nav systems as:

1. Keep it under control
2. Ensure the systems are safe
3. Go where we want
4. Perform the mission

Which, oddly enough, coincide with the output groups...

So far, all of the effort has been on the attitude output.  Once we
have that working, progressing through the other groups should be
quite easy.

Details on the sensor inputs and the output formats:

Attitude
--------
Internally, the realtime system is reading the acceleration rates
from the gyros (or the attitude reference) and performing rate
integration to produce the attitude.  The three (roll, pitch and
heading) values are output for use by the nav system or EFIS.
With the PWM gyros we need to poll the servo input lines.
With the Gyrations MG100 we sample the Vg1, Vg2, Vref and Temp analog
inputs to compute the acceleration values.

Output every 1/8th of a second:
R=xxxx P=xxxx H=xxxx

Engine stats
------------
N1 and N2 are easily sensed from magnetic set screws on the
crankshaft and mainshaft.  The HAL effect sensor feeds into the
realtime system which counts pulses and computes the RPM.
CHT and EGT thermocouples are read with the onboard A->D.
The voltage is read directly from the A->D.  We will need a
fuel tank sender to read the fuel level; this will have to wait.

Output every 1/2 second:
N=xxxx T=xxxx C=xxxx E=xxxx V=xxxx F=xxxx

Position
--------
Lattitude and Longitude are read from the NMEA data stream from the
GPS chipset.  We can also get altitude and heading, but both of
these are fairly useless for hovering.  At low altitude AGL hovers,
we use a sonar altimeter (such as the Polaroid range finder) to
maintain a stable altitude.  This unit feeds pulses into the realtime
system in a manner similar to the engine tachs.  For high altitude
hovers we can use the GPS altitude since a few meter error won't be
as obvious.

Should we output the velocity or allow the nav system to compute
it from the values?  I'm not sure who should do this.

Output every 1 second:
X=xxxx Y=xxxx Z=xxxx

Payload
-------
This will vary with the payload, obviously.  Cameras might report
the number of frames remaining, the focal depth, etc.  Crop seeding
operations would report the remining quantity in the hoppers, etc.

Output every 1 second:
???



---------------------------------

Output summary:

C=xxxx		CHT
E=xxxx		EGT
F=xxxx		Fuel level
H=xxxx		Heading
P=xxxx		Pitch
N=xxxx		Engine RPM
R=xxxx		Roll
T=xxxx		Rotor RPM
V=xxxx		Voltage
X=xxxx		Longitude
Y=xxxx		Lattitude
Z=xxxx		Altitude
