Skip to content

feat(calibration): implement new linear calibration methods - #12

Merged
Awesome-Ace22 merged 1 commit into
devfrom
feature/robust-calibration-fits
Nov 7, 2026
Merged

Awesome-Ace22 merged 1 commit into
devfrom
feature/robust-calibration-fits

Conversation

@Awesome-Ace22

@Awesome-Ace22 Awesome-Ace22 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What and why

This pull request adds support for two new robust calibration methods—Theil–Sen and repeated median regression—to the sensor calibration workflow. These methods help ensure that a single outlier does not disproportionately affect the calibration, improving reliability. The changes update both the UI and backend logic to recognize, fit, and apply these robust methods, and ensure the frontend matches backend behavior.

Calibration method enhancements:

  • Added support for robust calibration methods "theil_sen" and "repeated_median" in both type definitions and the calibration UI, allowing users to select these methods for sensor calibration. [1] [2]
  • Implemented Theil–Sen and repeated median fitting functions (theilSenFit, repeatedMedianFit), and logic to detect and apply these methods in calibration calculations, matching backend behavior. [1] [2] [3]
  • Updated the calibration application logic to use a fitted line for robust methods, ensuring that the calibration result is less sensitive to outliers and consistent with backend processing. [1] [2]

UI and reporting improvements:

  • Modified the calibration modal and reporting logic to display the method used and the number of calibration points, providing clearer feedback to users when robust methods are applied. [1] [2]

Type and export updates:

  • Extended type exports and utility functions to support the new robust calibration methods throughout the codebase.

How was this tested?

  • 1 Unit / Automated Test - CI
  • 2 Simulator Test - testing procedure with the hardware simulators
  • 3 Bench Test - testing procedure on the dev stack, with some real hardware
  • 4 Integration Test - full engine test procedure, real hardware, no propellants

Hardware impact

  • None - UI, docs or tooling only
  • Changes how a sensor is read, converted or shown
  • Changes how an actuator is commanded, or safety rules, interlocks, timeouts or sequencing → add the hardware-risk label; a lead must approve
  • Changes a message format, MQTT topic or FAS protocol that another repo depends on → title needs !, link the matching PRs:

Checklist

  • Targets dev (or main for a release/hotfix, or with a reason given above)
  • Branch is up to date ("Update branch" button)
  • No station config/calibrations, data files, secrets, .env files or build output committed
  • README/docs updated if behaviour changed

@Awesome-Ace22
Awesome-Ace22 requested a review from a team as a code owner November 7, 2026 16:16
@Awesome-Ace22
Awesome-Ace22 merged commit 0a52653 into dev Nov 7, 2026
2 of 6 checks passed
@Awesome-Ace22
Awesome-Ace22 deleted the feature/robust-calibration-fits branch November 7, 2026 17:10
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