Repository navigation
NAV POF: Landing state - #178
Conversation
NArmistead
left a comment
There was a problem hiding this comment.
gobble gobble test if you can first
|
|
||
| /* Get the current speed over the timestep */ | ||
| curr_vspd = prv_state->pof_state.land_detect_lookback_buf[i] - prv_state->pof_state.land_detect_lookback_buf[i - 1]; | ||
| curr_vspd /= prv_state->curr_update_time - prv_state->last_update_time; |
There was a problem hiding this comment.
may be overcomplicating things, but we could look into finite differences that do the speed estimate over more samples, although that might require a circular buffer implementation. also if we do kalman we might be able to use those velocity estimates directly
There was a problem hiding this comment.
yes, the idea would use the kalman error in the future
| bool expect_detected; | ||
| } coast_test_case; | ||
| float threshold = 0.75f * GRAVITY; | ||
| coast_test_case cases[] = |
There was a problem hiding this comment.
hit the road dude this aint no coast detect this is landing detect
There was a problem hiding this comment.
gyersh dern. ehhh it's a test im leaving it NAT.
| * 2: Rocket has a vertical speed within the threshold over 16 samples. | ||
| * | ||
| * @todo In the future, we should factor a confidence statistic into this estimate. We | ||
| * can use Kalman error once that statistic exists. Alternatively, we could fit a regression |
There was a problem hiding this comment.
Kalman error would be tricky because even when you're completely still there will still be error from how you tune the measurement and process noise
|
I'm not gonna test this first -- instead I want to do more comprehensive testing of POF transitions on the FC once we do a bunch of these related changes. |
Description
Implements a phase-of-flight transition for landing. This only applies to cases where we have high confidence we've landed (flat ground at launch altitude, and very little vertical speed).
Includes testing & tracing.
Issue Link
Closes #176.
One of my very few "pure" PRs without submodule dependencies.
Testing
N/A
AI Disclosure (Required)
Scope of AI assistance:
<ex: Used to generate an inverse function for magnetometer calibration>
Please consider disclosing the specific tools you used (this part is optional):
Other
Leave any additional notes here
Reviewer Checklist
Standards
Accuracy
Error Handling
Memory
Performance