undocumented register 0x11 sometimes starts with value 0, which gives
an offset on the Y accel axis of 2.7m/s/s. It sometimes boots with
0xc9, which gives a zero offset. Force it to 0xc9 to get consistently
correct behaviour
Previously, pointer to an uninitialized int was being passed as the
instance pointer. Now we pass a NULL pointer instead and the code
being called will use the default instance value of zero.
Make sure `struct position_estimator_inav_params params` is properly initialized.
At first there was no indication that this struct was un-initialized because valgrind
was issuing warnings about values that were derived (via float calculations) from
values in this struct. Maybe instruction re-ordering during optimization caused
this disconnect between the source of the problem and the symptom.
The `orb_check` function takes a pointer to a `bool` which it then passes
to `px4_ioctl`. However, if the call to `px4_ioctl` fails, the bool
doesn't get updated (neither set nor cleared). Therefore, in `orb_check`
we explicitly set the bool to `false` before passing the pointer to
`px4_ioctl`.
During construction of an Navigator object, a pointer to the incomplete
object was passed to the RTL constructor which then called a method on
the incomplete Navigator object accessing uninitialized data.