fw l1 controller: added a flag to indicate if navigation has updated

- can be used to check if l1 controller ran during a cycle

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2021-10-11 16:41:42 +02:00
committed by Silvan Fuhrer
parent e2f048f608
commit ae5d3103f4
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -203,6 +203,10 @@ public:
*/
void set_dt(float dt) { _dt = dt;}
void reset_has_guidance_updated() { _has_guidance_updated = false; }
bool has_guidance_updated() { return _has_guidance_updated; }
private:
float _lateral_accel{0.0f}; ///< Lateral acceleration setpoint in m/s^2
@@ -224,6 +228,9 @@ private:
float _roll_slew_rate{0.0f}; ///< roll angle setpoint slew rate limit in rad/s
float _dt{0}; ///< control loop time in seconds
bool _has_guidance_updated =
false; ///< this flag is set to true by any of the guidance methods. This flag has to be manually reset using has_guidance_updated_reset()
/**
* Convert a 2D vector from WGS84 to planar coordinates.
*