Skip to content

fix(engine): improve drone stability and update platform validation schema#2

Merged
srpatcha merged 1 commit intoembeddedos-org:masterfrom
RinZ27:fix/drone-numerical-stability
Apr 17, 2026
Merged

fix(engine): improve drone stability and update platform validation schema#2
srpatcha merged 1 commit intoembeddedos-org:masterfrom
RinZ27:fix/drone-numerical-stability

Conversation

@RinZ27
Copy link
Copy Markdown
Member

@RinZ27 RinZ27 commented Apr 16, 2026

Summary

Refactored the drone navigation distance logic to use math.hypot for better numerical stability. While testing these changes, I noticed the CI was failing because the validation schema was missing several architectures and classes (like tricore, mips, automotive, mobile) that are actively used in the platforms/ directory.

Type of Change

  • fix — Bug fix
  • style — Formatting, no code change
  • refactor — Code restructuring without behavior change
  • ci — CI/CD pipeline changes

Changes

  • Switched to math.hypot(dlat, dlon) in drone simulator to prevent precision issues.
  • Updated VALID_ARCHES and VALID_CLASSES in eosim/core/schema.py to match real platform definitions.
  • Removed duplicated simulator class definitions across multiple engine files.
  • Applied project-wide linting fixes with ruff to address existing formatting errors.

Testing

  • Unit tests pass (Verified with pytest)
  • Integration tests pass
  • Manual testing performed

Pre-Submission Checklist

  • Code compiles without warnings
  • All existing tests pass
  • Commit messages follow convention
  • Branch is rebased on latest master

Related Issues

None.

Screenshots / Logs

Local test run: 291 passed, 3 skipped in 1.41s

Additional Notes

The schema updates were necessary because the test_validate_all_real_platforms test was failing on every real platform due to the outdated allowed lists in schema.py. I also spent some time cleaning up the duplicated code blocks in the engine modules that I stumbled upon while debugging.

@RinZ27 RinZ27 requested a review from a user April 16, 2026 14:16
@RinZ27 RinZ27 changed the title Improve numerical stability in drone navigation distance calculations fix(engine): improve numerical stability in drone navigation distance calculations Apr 16, 2026
@RinZ27 RinZ27 force-pushed the fix/drone-numerical-stability branch from 7915337 to b98c283 Compare April 16, 2026 14:39
@RinZ27 RinZ27 changed the title fix(engine): improve numerical stability in drone navigation distance calculations fix(engine): improve drone stability and update platform validation schema Apr 16, 2026
Copy link
Copy Markdown
Member

@srpatcha srpatcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - math.hypot fix, schema updates, code dedup, and ruff cleanup all look good. Net code reduction.

@srpatcha srpatcha merged commit 31a155f into embeddedos-org:master Apr 17, 2026
2 checks passed
@RinZ27 RinZ27 deleted the fix/drone-numerical-stability branch April 17, 2026 14:31
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.

2 participants