Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: fix takeoff drift if vehicle is not in origin #17294

Merged
merged 2 commits into from
May 4, 2021

Conversation

chobitsfan
Copy link
Contributor

replace #17132

@lthall suggest change the implementation of shift_wp_origin_to_current_pos() to

// get current and target locations
const Vector3f& curr_pos = _inav.get_position();

// shift origin and destination horizontally
_origin.x = curr_pos.x;
_origin.y = curr_pos.y;
_destination.x = curr_pos.x;
_destination.y = curr_pos.y;

// move pos controller to the current position
_pos_control.set_pos_target(curr_pos); 

It makes it just the same as shift_wp_origin_and_destination_to_current_pos_xy(). Maybe we should just use it
flight test log using ext nav
5 2021-4-29 AM 10-12-26.zip
4 2021-4-29 AM 10-10-10.zip

@rmackay9
Copy link
Contributor

I wonder what happens if we have significant barometer drift...

@rmackay9 rmackay9 merged commit 00b44ff into ArduPilot:master May 4, 2021
@rmackay9
Copy link
Contributor

rmackay9 commented May 4, 2021

I'm pretty sure we will see issues with the altitude changing due to baro drift but I think this is an improvement so merged!

@chobitsfan
Copy link
Contributor Author

I wonder what happens if we have significant barometer drift...

Hi @rmackay9 Thank you. I will try to do more test and check this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants