The comment said that the horizontal accuracy needs to be scaled up
using the typical epv/eph ratio but the epv (vacc) is already available,
so no scaling is required.
- extract motion checks performed on ground
- move all non-timing check to controlOpticalFlowFusion. This simplifies and standardirzes the setOpticalFlowData function. Furthermore, in some cases (SITL, PX4Flow), the dt is forced to 0 when the quality is 0 (which is usual on ground) so the ekf needs to ignore those values on ground to initialize properly the flow fusion.
- add filter convergence test
- move check for dt time max in setOpticalFlowData
- in the simulator, do not update dt as this is the sensor integration
period.
- allocate IMU and output buffers on construction according to defaults
- determine buffer max time delay based on configuration parameters
- reorder flowSample and extVisionSample to minimize padding
- adjust parameter defaults to match PX4-Autopilot
- do not gps reference altitude to zero in case gps checks pass before the
filter initialized
- reset the filtered gps position and position derivative filters in case
we are in air or there is movement on the ground
Signed-off-by: RomanBapst <bapstroman@gmail.com>
The `_deadreckon_time_exceeded` flag is used in
`local_position_is_valid()`. This means that
`_params.valid_timeout_max` after startup, in my observed case 5
seconds, the local position switche from valid to invalid and then after
a while back to valid again.
With this fix, the local position is flagged invalid from boot and gets validated after the first aiding event.
Co-authored-by: Julian Oes <julian@oes.ch>
* Support vision velocity expressed in body frame
* Use switch statement for vision velocity frame
* Robustify vision velocity frame test
* Increase lower bound on vision velocity noise to 0.05 m/s