27 #ifndef NAV_ROVER_BASE_H
28 #define NAV_ROVER_BASE_H
74 #define NavCircleCount() (fabsf(nav_rover_base.circle.radians) / (2*M_PI))
75 #define NavCircleQdr() ({ float qdr = DegOfRad(M_PI_2 - nav_rover_base.circle.qdr); NormCourse(qdr); qdr; })
77 #define CloseDegAngles(_c1, _c2) ({ float _diff = _c1 - _c2; NormCourse(_diff); 350 < _diff || _diff < 10; })
78 #define CloseRadAngles(_c1, _c2) ({ float _diff = _c1 - _c2; NormRadAngle(_diff); fabsf(_diff) < 0.0177; })
82 #define NavQdrCloseTo(x) CloseDegAngles(x, NavCircleQdr())
83 #define NavCourseCloseTo(x) CloseDegAngles(x, DegOfRad(stateGetHorizontalSpeedDir_f()))
float leg_progress
progress over leg
struct RoverNavGoto goto_wp
uint8_t count
number of laps
vector in East North Up coordinates Units: meters
struct EnuCoor_f to
end WP position
float leg_length
leg length
float radius
radius in meters
enum oval_status status
oval status
struct EnuCoor_f from
start WP position
Waypoint and route pattern.
struct EnuCoor_f center
center WP position
struct RoverNavCircle circle
struct RoverNavBase nav_rover_base
float dist2_to_wp
squared distance to next waypoint
float radians
incremental angular distance
Rover navigation functions.
void nav_rover_init(void)
Init and register nav functions.