Skip to content

Conversation

@DavidLegg
Copy link
Contributor

  • Tickets addressed: N/A
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

When doing clamped integration, we need to build fixed-time conditions. These conditions fire after a fixed time, computed in advance for performance. Previously, the fixed time condition reported it would be satisfied in a fixed amount of time, regardless of when it was asked. This is incorrect if the condition is queried at any time later than its creation; the condition appears to "retreat" in time as it's queried.

Fix this bug by having the fixedTimeCondition consult the clock, so it can factor in the time elapsed since its creation.

Verification

@bradNASA discovered the faulty behavior, and he tested the change locally for me.

Documentation

N/A

Future work

N/A

@sonarqubecloud
Copy link

@DavidLegg DavidLegg requested a review from mattdailis November 24, 2025 18:49
@mattdailis mattdailis force-pushed the bugfix/clamped-integrate-timing branch from a3e011e to 0337a76 Compare November 24, 2025 19:50
@mattdailis mattdailis force-pushed the bugfix/clamped-integrate-timing branch from 0337a76 to 8119931 Compare December 3, 2025 06:01
When doing clamped integration, we need to build fixed-time conditions. These conditions fire after a fixed time, computed in advance for performance.
Previously, the fixed time condition reported it would be satisfied in a fixed amount of time, regardless of when it was asked.
This is incorrect if the condition is queried at any time later than its creation; the condition appears to "retreat" in time as it's queried.

Fix this bug by having the fixedTimeCondition consult the clock, so it can factor in the time elapsed since its creation.
@Mythicaeda Mythicaeda force-pushed the bugfix/clamped-integrate-timing branch from 8119931 to 8baee3d Compare December 16, 2025 17:16
@Mythicaeda Mythicaeda merged commit 0f5ccb6 into develop Dec 16, 2025
10 checks passed
@Mythicaeda Mythicaeda deleted the bugfix/clamped-integrate-timing branch December 16, 2025 17:34
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.

4 participants