These contains some rough changes trying to get SITL to speed up by a
SPEED_FACTOR.
This platform time code probably requires some more thought and refactor
but this gets a demo at 4x working.
The startup file rc.board is copied to the build/../genromfs folder
after the pruning of the files happened. Thus, about 2000 bytes of
comments and whitespace were included in the ROMFS.
This commit moves pruning of the files in ROMFS to a separate cmake
custom command which happens after the ROMFS files have been copied and
the extra files have been added.
Testing showed that this change only affected the rc.board file as
expected.
tone_alarm was started before the parameters were loaded, and the first
tune was played before that as well. CBRK_BUZZER was then read as default,
ignoring the user-configured value.
We now start tone_alarm after we load the parameters. Note that a
previously published startup tone or SD card error will still be played.
This is more accurate, because if we use -1000 as lower bound, a very large
yaw command can reduce thrust more than needed.
The difference can be seen in the following example
(with roll/pitch airmode):
p_dot_sp = -1.0 # roll acceleration
q_dot_sp = 0.9 # pitch acceleration
r_dot_sp = -0.9 # yaw acceleration
To run:
cd src/lib/mixer
make tests
This will validate the C++ implementation by taking the python
implementation as ground-truth. It runs through various actuator control
command values for all airmode variations and several mixer types.
The python script also allows to prototype new mixer algorithms.
It is not integrated into the existing build system, because it's easier
to use that way, with less dependencies, and faster testing workflow.
It could however be a bit more integrated.
Reference: https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation
Provides a more generic desaturation algorithm, making it easier to
handle the different mixer strategies.
python reference implementation:
https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation
The behavior for non-airmode and roll/pitch airmode should be the
same as before.
CPU load is slightly higher for the non-airmode case (+0.5%), for airmode
it is the same.