Skip to content

Validate variable RotorLag timesteps - #346

Closed
be-student wants to merge 1 commit into
kmolan:mainfrom
be-student:codex/298-checked-rotor-step
Closed

Validate variable RotorLag timesteps#346
be-student wants to merge 1 commit into
kmolan:mainfrom
be-student:codex/298-checked-rotor-step

Conversation

@be-student

Copy link
Copy Markdown

What & why

Fixes #298 by making RotorLag::stepped_over return Result and validating its fresh timestep before changing thrust state. Negative and zero steps now return PlantError::NonPositiveTimestep; NaN and infinity return PlantError::NonFinite.

Tests prove rejected steps leave state untouched and that a sequence of unequal positive steps matches fixed-rate stepping over the same elapsed time. The public method docs, plant tutorial, and changelog describe the behavior and signature change. This contribution was implemented with AI assistance and reviewed through the repository's test and lint gates.

Checklist

  • cargo test + cargo clippy --all-targets clean locally
  • New public APIs have a doc example (no new public API)
  • No unwrap/expect/panic on library paths (typed errors instead)

@be-student
be-student requested a review from kmolan as a code owner September 6, 2026 09:53
@be-student be-student closed this Sep 12, 2026
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.

Add a checked stepped_over to RotorLag

1 participant