Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pull request for a control allocation scheme, made by Daan Höppener, a student of mine. It allows you to specify priorities for different control objectives through a weighting in the cost function. This is why it has weighted least squares (WLS) in the name. Prioritizing parts of the control objective (pitch and roll over yaw for instance) is important for stable flight when there are saturations. Normally, the optimal control input can be found with the pseudo-inverse. However, when there are saturations, WLS-control allocation will satisfy the important parts of the control objective at the cost of the unimportant parts.
The optimal solution for this cost function is found using the active set method, which requires solving multiple least squares problems. For this we are using a (trimmed down) library from John Burkardt (http://people.sc.fsu.edu/~jburkardt/cpp_src/r8lib/r8lib.html). I wasn't sure what header we need for these files.
Probably I can still improve some stuff here and there, but I wanted to get the ball rolling with this pr...