* Bound function also bounds nan
* Update comment
Co-authored-by: Christophe De Wagter <dewagter@gmail.com>
* Bound defaults to min in case of NaN
---------
Co-authored-by: Christophe De Wagter <dewagter@gmail.com>
This is a complete rework of the navigation for rotorcraft with the key features:
- all nav functions and interface in float
- nav function are registered (decoupling between nav API and implementation of standard pattern)
- submodes to specify if setpoint is a position (legacy), speed or accel (better integration of algorithms like GVF)
- guidance (H and V) is reorganized with default function to implement (run_pos, run_speed, run_accel)
- guidance control (the old default PID) is separated from the guidance logic
---------
Co-authored-by: Freek van Tienen <freek.v.tienen@gmail.com>
It allows (for rotorcraft) to use all the possibilities of the guided
mode from a single instruction in the flight plan, but without leaving
the NAV mode as it was done before. Thus all capabilities of the FP are
still accessible.
some errors after #2828
- fix all airframes using dual boards
- fix calls to ap_state or old imcu API
- fix some includes
- protect some code to compile test programs (without 'commands' API)
close#2840
When adding a test node to a makefile section, with required compilation
flags, include and other options, all the files (not arch dependent
files) can be compiled with a TAP compatible program, included in the
standard tests of the CI servers.
Not all module's XML files are converted, but a large part of the most
important parts are already covered. More will be added later. The
number of tested airframes (full compilation of all targets) have been
reduced to speed the CI compile time but still covers the relevant
architecture and boards.
The main benefit is that the overall coverage is already better than
before as previous test aircraft were compiling more or less the same
part of the airborne code, while this new mechanism is more efficient to
test modules not included in any config.
OS X uses clang to compile the code, thus we have a bit different
warning system. Now the C++ code is being compiled with the G++ clang
compiler instead of GCC.
Actually compile C++ files with CXX and C files with CC.
Also fixed some other warnings including UTF-16 character usage.
Converted config report warningt to PRINT_CONFIG_MSG.
We need to push the diagnostics first for clang.
Added GNU99 standard flag to the C targets.
Only the realtime scheduler and SDIO driver from ChibiOS is used.
This brings the support of the SD log on Apogee boards. The current
solution is not fully satisfactory and is an intermediate solution
before switching to a 'pure' ChibiOS arch.
Some of the implementations can be cleaned and/or improved, but since it
is not a long term solution, I doubt it is worth the effort here.
Normal bare-metal libopencm3 code is of course still working.
Git submodules:
- chibios: 2.6.2
- fatfs: patched version for chibios+pprz
- only FW currently, rotorcraft coming soon
- compared to before:
- no macros (easier to debug)
- the default channel/device cannot be set for all the messages at the
same time (it will be possible when we finally replace messages
macros and define proper C struct for that)
- the register function only register for a single process (not
possible to reuse the function for an other process unless you
explicitely register for it)