What to build
Estimate attitude and local pose from the recorded sensor stream and expose estimator health to the application without depending on either external autopilot.
Acceptance criteria
- Validate orientation conventions, NED origin and altitude datum with independent reference data. Published GeographicLib frame examples and analytic raw-wire truth pass; physical orientation/position reference capture remains open.
- Quantify attitude/position error and estimator reset behavior under GNSS, compass and IMU failures. Synthetic GNSS/IMU/bias/reset campaigns pass; no compass observation or physical failure campaign exists yet.
- Add a replayable first estimator implementation and document the path to EKF fusion, VIO, optical flow, RTK and multi-sensor redundancy.
Implemented first software slice
Commit 2c524be:
- Owned TypeScript estimator under
resources/functions/drone/estimation/, independent of ArduPilot/PX4. - Unit-quaternion gyro/gravity tilt observer. BODY_FRD maps into a gravity-aligned reference with relative yaw. No absolute heading is fabricated.
- Fixed-origin WGS84 ellipsoid-to-ECEF-to-NED conversion, including fix-local velocity/covariance rotation. Three constant-velocity position/velocity Kalman blocks smooth qualified GNSS; no inertial-position/EKF claim.
- Separate pressure-relative height datum, independent output health, explicit resets, innovation gating and bounded prediction.
- Replay consumes every sensor event, fault and clock refresh. Board capture deltas drive propagation; mapping changes adjust output epochs and expiry without reintegration.
- Native Stacks
estimator:replayshared by Buddy and the compiled standalone CLI; read-only capabilities Action and separate simulator estimate snapshots. - Independently encoded six-second analytic register fixture, 19 estimator tests and reproducible maximum/RMS error report.
Validation: 116 Bun tests / 14,892 assertions, two native CTest contracts, five Python tests, lint, application/runtime/view typechecks and roadmap checks pass. Standalone replay runs outside the checkout and beyond EOF. The clock-mapping review finding was fixed and verified.
CI passed for application checks and both Pico firmware profiles.
The scripted trajectory reports maximum Euler error norm 0.0061411 rad and maximum NED position error 0.0025786 m across 276 checks. These are regression values for synthetic truth, not hardware accuracy. Absolute heading, navigation and physical-flight capability remain unavailable.
See estimator guide, ADR 4, retained report and validation.
Remaining acceptance and roadmap
- Complete #3 physical sensor capture/calibration/group-delay and PPS timing evidence, plus #2 runtime timing/watchdog prerequisites.
- Quantify estimator error and reset behavior against independent physical orientation/position instruments.
- Add calibrated compass or dual-antenna GNSS/vision heading, disturbance detection and compass-failure/yaw-reset tests.
- Build full-covariance error-state inertial EKF with gyro/accelerometer biases, stable numerical updates and Monte Carlo consistency evidence.
- Add delayed/out-of-sequence fusion, declared barometric/geoid/ellipsoid alignment and reference discontinuity handling.
- Add optical-flow range/scale quality, camera/body VIO extrinsics and timing, RTK fix/baseline quality, then multi-sensor fault isolation/redundancy.
- Propagate full-rate anti-aliased IMU deltas with coning/sculling handling; port a validated bounded implementation to the native scheduler and measure execution/stack limits.
This issue remains open and in progress. Resumed IMU packets during motion do not restore attitude until apparent-rest alignment succeeds. No estimator output is wired to physical commands or the simulator's ideal control telemetry.
Blocked by
- #3 Sensors: calibrate and replay time-aligned IMU, GNSS and pressure samples