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: Remove WP Delay in ZIGZAG Mode by S-Curve #17596

Conversation

muramura
Copy link
Contributor

I would remove the WP delay in ZIGZAG mode.
This delay is a shortcut support by leash.
I will remove this delay process by implementing the S-curve, which will reduce flight time.

SITL
Screenshot from 2021-05-29 10-33-40
Screenshot from 2021-05-29 10-33-22

@peterbarker
Copy link
Contributor

Could we get the same effect by changing the default for this parameter?

@muramura
Copy link
Contributor Author

muramura commented May 29, 2021

https://github.com/ArduPilot/ardupilot/blob/master/ArduCopter/mode_zigzag.cpp#L407

@peterbarker, you can change the above process to the following process to support 0 delay time.
I changed to this process and confirmed that it works.
I was able to confirm that it does not shortcut.

If the delay process supports shortcuts, I would like to remove it.
If the delay processing has other purposes, I think the size of int16_t is better.

Change process:
return ((now - reach_wp_time_ms) >= (uint16_t)constrain_int16(_wp_delay, 0, 127) * 1000);

Screenshot from 2021-05-29 18-33-39
Screenshot from 2021-05-29 18-33-12

@tatsuy
Copy link
Contributor

tatsuy commented May 29, 2021

Please delete the definitions of _wp_delay and reach_wp_time_ms as well.

@rmackay9
Copy link
Contributor

Great to see a parameter get removed because it simplies things a little. Thanks for this!

@rmackay9
Copy link
Contributor

rmackay9 commented Jun 1, 2021

@muramura if you can remove those extra variables then we will merge, thanks!

@muramura
Copy link
Contributor Author

muramura commented Nov 4, 2021

rebase #19149

@muramura muramura closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants