"David W. Schultz" <[email protected]> writes:

>         ao_bmx160_init();
>
>
> Which I would think would generate a warning from the compiler at
> least.

ao_bmx160.h gets included by ao_data.h which is included by ao.h, so
there's no compiler warning. ao_easytimer.c should probably include it
directly as a way of describing what the application uses though.

> Which naturally reminds of the perils of code reuse as illustrated by
> the Ariane-5.

Yeah, you might imagine we do a bit of cut-n-paste coding when creating
a new project. I've thought of using the 'constructor' attribute on
various startup functions and having them get set up automatically, but
I kinda like the manual mechanism as it makes sure everything matches.

> As for launch detect,  since the Kalman filter code is dragged in by the
> makefile I assume that the filtered velocity is being used. Strictly
> speaking, the velocity state variable is not observable using just an
> acceleration measurement.

Yes, it is computed. We use both acceleration and speed to avoid a sharp
acceleration causing boost detect (like bumping the airframe).

> I used a simple and orientation indifferent version. I used the sum of
> the squares of the three accelerations which should be exactly one on
> the pad. Subtract a small offset and integrate. Flooring the integral so
> it is never negative. The offset makes sure that it will never increase
> much just from noise. (Different from the sensor 1G offset which is of
> course tracked.)

We also track orientation in flight, which means knowing the intended
vertical axis of the airframe so that we can compute the orientation on
the pad (in case you're tilting the rail), and the relation between the
gyro sensors and airframe rotation in flight.

I started writing code that would let you point the device in any of six
directions (any of the three axes pointing in either direction), but got
tangled up trying to rotate the accel and gyro sensor values correctly,
so I bailed for now and only allow the two existing orientations.

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
altusmetrum mailing list
[email protected]
http://lists.gag.com/mailman/listinfo/altusmetrum

Reply via email to