|
|
|
@ -160,4 +160,16 @@ int32_t Copter::ModeFollow::wp_bearing() const
@@ -160,4 +160,16 @@ int32_t Copter::ModeFollow::wp_bearing() const
|
|
|
|
|
return g2.follow.get_bearing_to_target() * 100; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
get target position for mavlink reporting |
|
|
|
|
*/ |
|
|
|
|
bool Copter::ModeFollow::get_wp(Location_Class &loc) |
|
|
|
|
{ |
|
|
|
|
float dist = g2.follow.get_distance_to_target(); |
|
|
|
|
float bearing = g2.follow.get_bearing_to_target(); |
|
|
|
|
loc = copter.current_loc; |
|
|
|
|
location_update(loc, bearing, dist); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif // MODE_FOLLOW_ENABLED == ENABLED
|
|
|
|
|