Skip to content

Use VQF for GS attitude and improve sensor/demo screens - #416

Merged
stojadin2701 merged 7 commits into
mainfrom
fix/gs-sensors-demo-startup
Sep 19, 2026
Merged

stojadin2701 merged 7 commits into
mainfrom
fix/gs-sensors-demo-startup

Conversation

@stojadin2701

@stojadin2701 stojadin2701 commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace the Ground Station Madgwick estimator with pinned VQF 2.1.2 and remove the now-unused Madgwick vendor library. The shared adapter preserves the board mounting and existing compass/recovery heading convention, converts sensor units, enables VQF gyro-bias and magnetic-disturbance handling, and defines positive pitch as pointing up. Accepting a new calibration resets learned filter state on the navigation task while preserving saved calibration.
  • Improve the Sensors and Compass pages with header navigation arrows, a vertical pitch ball, readable degree symbols, and removal of the overlapping footer artifact. The light simulator completes startup before Play/Restart Demo renders, Reboot retains the full startup sequence, and simulator telemetry now uses a realistic default battery voltage.
  • Bump Ground Station firmware to 1.3.1.
  • Document and surface that Ground Station telemetry updates require Telemetry 1.2.0 or newer. Telemetry 1.1.3 and earlier stop safely before erase/write when bootloader entry is unsupported and require a one-time ST-Link installation; the updater error, confirmation screen, documentation, and ROM updater tests now state this boundary.
  • Keep legacy Telemetry 1.1.3 serial control compatible by holding all Ground Station UART transmissions for the receiver's first five seconds. Incoming telemetry remains active, while link settings, version requests, test commands, and updater entry wait until the legacy receiver has enabled DMA reception.
  • Update the CATS Flights URL in the repository README.

Validation

ground_station/gs-precommit.ps1 passed at the PR head, including:

  • Windows and WSL firmware builds and clang-tidy.
  • ROM bootloader tests, including the non-destructive legacy no-entry-ACK path.
  • Real VQF integration tests covering 120 poses, vertical pitch limits, gyro axes/units, residual bias, reset, magnetic disturbance/recovery, and invalid inputs.
  • Three-phase self-test coverage.
  • 21 deterministic simulator scenarios, 12 browser/CLI fixtures, framebuffer checks, and the WebAssembly build.

Browser and visual checks cover navigation, degree symbols, pitch movement/clamping, startup/demo transitions, realistic battery display, and stale-pixel clearing. The display simulator injects angles directly; VQF is exercised separately by the native tests.

Hardware validation

  • Built and flashed the current Ground Station 1.3.1 UF2.
  • Flashed Telemetry 1.1.3 through ST-Link and started the patched Ground Station before the legacy receiver completed its UART startup. version.json reported 1.1.3 and the live USART2 status was 0x006210D0 with the overrun flag clear.
  • Restored the telemetry chip to 1.2.0. STM32CubeProgrammer verified the programmed image and the live firmware tick confirmed that the application was running.

Current Windows firmware binary: 623,232 bytes. Reported static RAM: 67,136 bytes.

Physical VQF heading, tilt response, calibration, magnetic recovery, and navigation task timing/stack headroom remain to be validated on the Ground Station.

@stojadin2701 stojadin2701 changed the title Fix Sensors screen artifact and light demo startup flash Improve Sensors/Compass navigation and pitch display; skip demo startup flash Sep 6, 2026
@stojadin2701 stojadin2701 changed the title Improve Sensors/Compass navigation and pitch display; skip demo startup flash Use VQF for GS attitude and improve sensor/demo screens Sep 6, 2026
Replace Madgwick with pinned VQF 2.1.2 while preserving the board mounting, heading convention, and saved calibration behavior. Add the attitude adapter and native pose, axis, bias, reset, disturbance, and invalid-input tests, then remove the unused Madgwick vendor library.
Add header navigation, a vertical positive-up pitch indicator, and readable degree symbols. Remove the overlapping sensor-page hint artifact and extend browser coverage for pitch motion, limits, navigation, and stale-pixel clearing.
Complete startup before Play or Restart Demo renders while preserving the full Reboot sequence. Use a realistic default battery voltage and update the browser framebuffer expectations.
Identify Telemetry 1.2.0 as the first release supporting Ground Station updates. Explain that unsupported legacy attempts stop before erase or write, direct those receivers to ST-Link, and cover the no-entry-ACK path in the ROM updater tests.
Keep each telemetry link receive-only for its first five seconds so Telemetry 1.1.3 can enable DMA without latching USART overrun. Queue settings and version requests during the guard and prevent test or updater writes until it expires.
Point the repository documentation at the current CATS Flights site.
Set the Ground Station firmware version after the VQF, display, simulator, and telemetry compatibility changes.
@stojadin2701
stojadin2701 force-pushed the fix/gs-sensors-demo-startup branch from bc4103c to 9760fce Compare September 18, 2026 20:46
@stojadin2701
stojadin2701 merged commit 1ad6186 into main Sep 19, 2026
11 checks passed
@stojadin2701
stojadin2701 deleted the fix/gs-sensors-demo-startup branch September 19, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant