-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
AP_Mission: Relative Mission (translation, rotation, altitude-adaption) #14100
Conversation
Translation of a defined Mission at start or restart of AUTO-mode. Related to the Homepoint. Different translation-modes are selectable via MIS_Parameters. - parallel translation - additional rotation - additional adaption of altitude - ignoration of achieving of altitude at first Waypoint
whaaa, that looks interesting! But that is a big change in the mission library... It will be long to merge. |
sqrt() replaced by sqrtf() to conform with DO_NOT_USE_DOUBLE_MATHS()
to conform with DO_NOT_USE_DOUBLE_MATHS()
That's my first contribution, so a little advice and support how and where to find the root cause of the failing checks would be very welcome. |
Literal "Bit" in @bitmask:... deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation math is incorrect. Past that this is invasive enough and seems to be enough of a special case that I'd rather see us support this via scripting if that's okay with you? We have a PR open that will hopefully be in soon which would let you read/write the mission items from a script, and you could do all the translation effort that is appropriate for your use case without having to make this invasive a change in AP_Mission.
libraries/AP_Mission/AP_Mission.cpp
Outdated
} | ||
else { | ||
if (restart_behaviour >= Restart_Behaviour::RESTART_PARALLEL_TRANSLATED){ // do at least parallel translation | ||
cmd.content.location.lat += _translation.lat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurately translating anything. You can't simply add lat/long pairs, you actually have to project it down a bearing at a distance. It probably looks correct at a small scale, but it will slowly be warping the mission.
The translation math is accepting a positioning error of <0.02% at 45 and <0.09% at 80 degrees of latitude if the mission is translated one Km north or south. In normal visual flight, with definition of the Start-Position in flight by the vehicle, that should be acceptable. In the past I asked for a feature like that here: #1611 (comment) but nobody understood my aim, I guess - so I did it by myself. If the solution by script is as smart and easy to handle as my solution, it might be a better way. But that will decide the experienced developers. |
@WickedShell |
this is the open 'mission' PR to enable scripting to edit missions arbitrarily. |
Thanks very much for the effort put into this. As discussed on the dev call we're unfortunately not going to be able to merge this because we are worried about the increased complexity and ongoing support. |
this is too complex in its current form, it makes the core mission code a lot more complex and uses quite a lot of flash space. |
Linking related issue: #1428 |
Rollback of all changes in AP_Mission.cpp and AP_Mission.h for separating the code in extra files and making the feature optional - as requested by Tridge
This reverts commit 085b35b.
Rollback of all changes in AP_Mission.cpp and AP_Mission.h for separating the code in extra files and making the feature optional as requested by Tridge - now with updated submodules
Just for learning
I fought against Rebase - and it seems I lost... |
@WillyZehnder let me know if you need help in rebasing. Can help you :) |
Translation of a defined Mission at start or restart of AUTO-mode
related to the Homepoint and the Location where AUTO has been switched on.
Different translation-modes are selectable via MIS_Parameters.