mirror of https://github.com/ArduPilot/ardupilot
Copter: fix do_loiter when executed in same location
This commit is contained in:
parent
8ce8551669
commit
8fb318a6e1
|
@ -361,7 +361,9 @@ void Copter::do_loiter_unlimited(const AP_Mission::Mission_Command& cmd)
|
|||
// To-Do: make this simpler
|
||||
Vector3f temp_pos;
|
||||
wp_nav.get_wp_stopping_point_xy(temp_pos);
|
||||
target_loc.offset(temp_pos.x * 100.0f, temp_pos.y * 100.0f);
|
||||
Location_Class temp_loc(temp_pos);
|
||||
target_loc.lat = temp_loc.lat;
|
||||
target_loc.lng = temp_loc.lng;
|
||||
}
|
||||
|
||||
// use current altitude if not provided
|
||||
|
|
Loading…
Reference in New Issue