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