uorocketry / hydra

Hyper Dynamic Rocketry Avionics
GNU General Public License v3.0
5 stars 1 forks source link

Wait for recovery state does not wait for recovery #67

Open NoahSprenger opened 1 year ago

NoahSprenger commented 1 year ago

Turns out that +- 4m/s does not mean that the vehicle has landed :100: :rocket: :fire: Oops...

NoahSprenger commented 1 year ago

This is still not a great solution. Ideally I can wait 10 minutes after the vehicle finds it is not moving. Also I doubt +- 0.25 is small enough.

NoahSprenger commented 1 year ago

I could take an average over say 2000 points since 2000 * 250 ms ~= 8 minutes and if this average is within an acceptable range, I can safely assume that the vehicle has landed.

NoahSprenger commented 1 year ago

Ignore the previous, I act like I have infinite memory and to assume time between messages is not a solid implementation.

NoahSprenger commented 10 months ago

Or just use a timer :) see the ATSAMDHAL TimerCounter.