forked from Archive/PX4-Autopilot
Navigator: Obey minimum turn radius the controller is capabable of.
This commit is contained in:
parent
c7be59038c
commit
0f3438eb17
|
@ -144,7 +144,7 @@ public:
|
|||
Geofence& get_geofence() { return _geofence; }
|
||||
bool get_can_loiter_at_sp() { return _can_loiter_at_sp; }
|
||||
float get_loiter_radius() { return _param_loiter_radius.get(); }
|
||||
float get_acceptance_radius() { return _param_acceptance_radius.get(); }
|
||||
float get_acceptance_radius();
|
||||
int get_mavlink_fd() { return _mavlink_fd; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -571,6 +571,20 @@ Navigator::publish_position_setpoint_triplet()
|
|||
}
|
||||
}
|
||||
|
||||
float
|
||||
Navigator::get_acceptance_radius()
|
||||
{
|
||||
float radius = _param_acceptance_radius.get();
|
||||
|
||||
if (hrt_elapsed_time(&_nav_caps.timestamp) < 1000000) {
|
||||
if (_nav_caps.turn_distance > radius) {
|
||||
radius = _nav_caps.turn_distance;
|
||||
}
|
||||
}
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
void Navigator::add_fence_point(int argc, char *argv[])
|
||||
{
|
||||
_geofence.addPoint(argc, argv);
|
||||
|
|
Loading…
Reference in New Issue