On 10/22/20 6:23 PM, Keith Packard wrote:
> Altus Metrum announces AltOS 1.9.6
>
> Announcing AltOS 1.9.6
>
> This is a bug-fix release. Anyone using EasyTimer should upgrade the
> firmware to 1.9.6 or later immediately!
>
> Firmware Changes:
>
> * Fix EasyTimer bug where it might mis-detect boost (either
> detect it early or not at all) due to small errors in
> accelerometer calibration leading to large accumulated error
> in speed.
>
> * Adjust self-test of new 9-axis IMU (BMX-160) so that it
> doesn't think the part has a failure when tested sitting
> horizontally.
This tweaked my curiosity so I grabbed the code to have a look. Straight
off I noticed something odd. While you say you are using the BMX-160,
the code (ao_easytimer.c) seems conflicted:
#include <ao.h>
#include <ao_ms5607.h>
#include <ao_adxl375.h>
But later there is:
ao_bmx160_init();
Which I would think would generate a warning from the compiler at least.
A quick check in the drivers directory reveals that there is a handy
ao_bmx160.h residing there. (Which has nothing to say about a return
value. "void" would appear to be appropriate.)
Which naturally reminds of the perils of code reuse as illustrated by
the Ariane-5.
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.
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.)
This really should use a square root. I got lucky as the fast floating
point unit in the Teensy 3.6 has one.
--
http://davesrocketworks.com
David Schultz
_______________________________________________
altusmetrum mailing list
[email protected]
http://lists.gag.com/mailman/listinfo/altusmetrum