794 Commits

Author SHA1 Message Date
Gautier Hattenberger 27e59d9db5 [guided] support full ref update in guided mode (#3502)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
New message can set position, speed, acceleration and heading setpoint
for an accurate trajectory tracking.

Also fix the update of ref when h_ref is disabled.
2025-07-21 16:21:44 +02:00
Gautier Hattenberger 65de23341e [build] fix compilation warnings and remove unused code (#3468)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
Some code from base64 module in ocaml is deprecated but is only used by
the outdated tool broadcaster. Better remove them.
2025-06-12 11:21:23 +02:00
Gautier Hattenberger 646a79795d [guided] rewrite guided mode example with a separated lib (#3442)
Doxygen / build (push) Has been cancelled
* [guided] rewrite guided mode example with a separated lib

* [Settings] Allows to set setting by name.

---------

Co-authored-by: Fabien-B <Fabien-B@github.com>
2025-03-21 16:51:41 +01:00
Gautier Hattenberger 980e52eecf [autopilot] fix parsing of modules in generated AP files (#3432)
Doxygen / build (push) Waiting to run
2025-02-13 13:57:49 +01:00
Fabien-B d97533b353 [Flightplan lib] Retrieve flight plan over http if needed. (#3431)
Doxygen / build (push) Waiting to run
Co-authored-by: Fabien-B <Fabien-B@github.com>
2025-02-12 18:07:51 +01:00
Gautier Hattenberger c158c856f3 [ocaml] use glib from gtk3 if gtk2 is not found (#3290)
Gtk3 doesn't support all features of gtk2 (or have a different interface), so if only gtk3 is found, GUI tools are not compiled, only CLI tools based only on glib.
If no gtk found, tools based on glib/gtk are not compiled.
Remove two old tools not used and not supported by gtk3.
2024-06-05 18:10:51 +02:00
Gautier Hattenberger 1b345804b4 [generator] add support for matrix and struct in airframe (#3228)
* [generator] add support for matrix and struct in airframe

update ENAC airframe and code for indi G1 matrix and IMU calib

* update calibration tool output
2024-01-09 10:46:47 +01:00
Christophe De Wagter 45884b3eea Fix all compile warnings confs (on 20.04) (#3227)
* JP aircraft removed from ENAC

* Silent compile warnings GVF

* silent warning: periodic freq must be dividable by telemetry freq

* NPS_COMMANDS_NB

* gzip -f since compiling make small targets in a row can have the same file name if compiling is too fast.
2023-12-22 10:36:40 +01:00
Gautier Hattenberger 10bdec0463 [ocaml] add old and new GCS srtm path to default directory list (#3030) 2023-05-09 09:09:46 +02:00
Gautier Hattenberger e5af06a001 [ocaml] parse XML file with ExtXml version (#3023)
it provides better messages in case of XML or DTD errors
2023-04-09 17:37:17 +02:00
Gautier Hattenberger 03238c1639 [fix] fix dep solver to recursively check suggested module (#3009)
* [fix] fix dep solver to recursively check suggested module

the issue was that suggested modules can depend on modules that should
be found from the suggested list

also enforce that an autopilot should have at least an ins or a ahrs

* move dep to targets
2023-03-08 12:42:31 +01:00
Gautier Hattenberger 62646d68de Modules recommends and suggests (#3005)
Add two new items in module's dependency:
- recommends: a recommended module tells the sorting algo that if the module is found, it should be sorted accordingly. It is useful for optional dependencies, like shell or mission in some modules
- suggests: if a functionality is not provided by the user, a module can suggest a list of modules that can provide them. It is a convenient way to have "default" modules.

As a result the former autoload node is removed and replaced by suggested modules.
2023-03-07 17:14:15 +01:00
Gautier Hattenberger b152b927b3 Fix nav rework (#3004)
* fix guidance_v in flight plan and remove old settings

* nav radius, descend and climb

* [stab] make a attitute set quat function

* fix function name

* fix parsing of variables in proc, don't use = in fp

* fix nav heading in modules

* fix some more errors

* fix var name
2023-03-06 10:45:44 +01:00
Gautier Hattenberger 8dafb7840a [ocaml] fix warnings in ubuntu 22.04 2023-02-14 10:07:45 +01:00
Gautier Hattenberger cf150db155 [ocaml] move the GCS-only related code out of xpprz lib
Most of the pprz.xlib is used by the legacy GCS only, using in
particular the deprecated canvans.
This PR is isolating the relevant part to the GCS folder, so it will be
easier in the future to avoid the compilation of this part by default.

Conditional compilation of the old GCS: test if glade is installed
to build supervision, logplotter and the (legacy) GCS.
2023-02-14 10:07:45 +01:00
Fabien-B ca94874f74 [generated autopilot] Include settings defined in the autopilot file. (#2928) 2022-10-15 23:26:04 +02:00
Gautier Hattenberger e436d78c84 [autopilot] merge AP and FBW in normal operation (#2828)
There is no longer a separated FBW in normal operation for fixedwing,
only a single AP task/thread.
The code for main_ap is now factorized for all firmwares.
Dual MCU support (separated AP and FBW) is still possible, based on the
rotorcraft implementation and intermcu pprzlink messages. Relevant code
is also factorized and available in all firmwares.
The recovery mode (in case of hard fault) is still available for
fixedwing with ChibiOS implementation.
Only intermcu_uart is supported at the moment. Other options (spi/can)
might be added back in the future if really used.

Some other evolution are made:
- in the radio_control and actuators modules, now integrated to AP and
using ABI messages
- the message parsing on datalink event (defined in module) that is now
properly filtering the messages based on their class and allowing to
have multiple callbacks for the same message
- cleaning the part of code that were using the old intermcu fixedwing
interface
2022-03-10 14:21:04 +01:00
Fabien-B 5758bb1058 [python lib] small fix for the python flight plan lib. (#2834) 2022-03-07 13:38:33 +01:00
Fabien-B 7bcb7e2182 [Telemetry] Fix phase type. (#2809) 2021-12-13 23:49:06 +01:00
Gautier Hattenberger 1e14fd5bde [modules] clean some remaining traces of subsystems 2021-11-13 00:48:14 +01:00
Gautier Hattenberger eceffb8bd5 [ocaml] apply a second topological sort to modules (#2793)
* [ocaml] apply a second topological sort to modules

After the first one, all functionalities are checked, but corresponding
modules are not ordered with the other one.
This second sorting algorithm (simpler) is just checking that final
selection of modules is correctly ordered and check for possible cyclic
dependencies not yet found.
ahrs_common dep node is fixed to avoid such a situation.

* [modules] trying to fix cyclic dependency in rotorcraft gnc modules

the main issue is that the rotorcraft navigation is not explicitely
included by the user but automagically included, which is not a good
idea, same goes for guidance.

* [modules] fix dep

system_core is already provided by firmware module and @no_settings
was making a cyclic dep for fbw
2021-11-09 16:04:04 +01:00
Gautier Hattenberger cae5024cb2 [fix] correct ocaml wgs84_distance function
also remove the warning in the GCS for "approaching" which is not
producing anything since 2016
2021-10-27 14:19:46 +02:00
Gautier Hattenberger 83a74e412f Drop old compat (#2786)
* [ocaml] drop of compat for Ocaml < 4.05

this is linked to Ubuntu 16.04 that have reached end of life

* [pprzlink] update pprzlink for removed old compat
2021-10-08 13:01:28 +02:00
Fabien-B e8ca332b6b [libs] Fix python settings lib. (#2774) 2021-08-30 20:52:36 +02:00
Gautier Hattenberger cf49ef3303 [ocaml] make a clean functional version of topological sort algorithm 2021-08-17 12:50:03 +02:00
Gautier Hattenberger 9fe528ab54 [generator] improve error messages
print the name of the module creating the confict or missing requirement
2021-07-27 18:33:49 +02:00
Gautier Hattenberger 9d06398c56 [autopilot] reorganize autopilot code
- better structure for the autopilot tasks
- convergence between firmwares
- remove unused int_enable functions
- update generators
2021-07-27 13:34:23 +02:00
Fabien-B 7e0dbf2a2b [Maps] Use correct address for google tiles. (#2727) 2021-05-19 11:39:16 +02:00
Gautier Hattenberger 2490147fa0 [fix] take the reverse into account in macro as well
the reverse flag is directly applied by the parser, so correct values
are use for all macros
2021-05-12 22:14:37 +02:00
Fabien-B e9656391a2 Remove static sectors (#2701)
* [sectors] Remove static sectors.

* [sectors] Update conf.

* [sectors] Keep "type" in DTD and issue error.

* [generator] move inside sector functions out of NAV_C section

Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
2021-05-04 16:51:34 +02:00
Christophe De Wagter 2f094ec4ff Health tools based cleaning (#2691)
* [conf] fix health script, remove flightplans that reference missing files, fix illegal XML that python can not load.

* [fixes] removed modules with missing c-code, solved bad XML formats, fixed missing modules in airframes, solved health-tools (Python3)

* [airframe] removed unexisting modules

* [calib] unreferenced calibrations
2021-04-09 16:59:20 +02:00
Christophe De Wagter 345c0b9a73 [tools] convert script to python3 as it is called from a python3 script (#2689) 2021-04-09 10:39:31 +02:00
Gautier Hattenberger e4d9e10492 [modules][ocaml] implement module dependency (#2669)
- support depends, conflicts and provides nodes, all under a 'dep' node
- autoload are kept for now and are not moved yet
- modules are updated for new dep format
- it is now required that module's name and filename are the same
2021-03-16 17:47:34 +01:00
Gautier Hattenberger 80b2c91a39 [ocaml] fix SRTM download path (#2659)
SRTM data are no more available for direct download, using ESA data
instead. The new SRTM data are SRTM3 GL1 (1 arcsec instead of 3
previously), so the code is now adapted to support both formats,
the most accurate available will be used first.
The only way to force the update of new files is to remove the previous
ones from data/srtm folder.

close #2642
2021-02-11 15:45:13 +01:00
Gautier Hattenberger b6a300d03e [fix] allow float values for delay in module XML (#2652)
* [fix] allow float values for delay in module XML

see comments in #2553

* [conf] update delay parameters and add warning in generator
2021-02-08 21:50:41 +01:00
Gautier Hattenberger 494e3f3ad9 [tests] add a compilation test node to modules (#2653)
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.
2021-02-08 17:24:19 +01:00
Tom van Dijk 172f8fe44b SPI SD Logger updates (#2605)
* modify spi sd logger for arbitrary downlink devices
* Update sglogger_download to pprzlink v2
* Fix logger_sd_spi_direct enum settings
* Change commented printf to DEBUG_PRINT
* settings_xml_parse.py: print errors and warnings to stderr

Co-authored-by: Tom van Dijk <tomvand@users.noreply.github.com>
2020-12-10 09:41:41 +01:00
Fabien-B bb7986f8ec [Server] modify ac_id field of CONFIG message for replay sessions (#2616)
* [server] Send real ID with CONFIG message instead of the original ID.

* Fix pprz_connect to accept non integer ac ids.
Makes "conf_by_id" docstring true.

* Makes suggested modifications.
2020-11-10 16:42:45 +01:00
Gautier Hattenberger 9dd0a81f11 [fix] parse correctly settings with names (#2604)
the appear with a ~ in the settings list which should be removed before
testing for modules
2020-10-29 10:35:42 +01:00
Fabien-B adce81e35e [Python libs] Start python settings and flight plan libs. (#2592)
* [Python libs] Start python settings and flight plan libs.

* [Python libs] Robustify XML attribute getters.

* [Python libs] Adds WP number, improve getters.

* [Python libs] Adds license headers.
2020-10-13 11:19:16 +02:00
Gautier Hattenberger 3c5e7d0f08 [fix] check FP and AP modules for correct firmware (#2581) 2020-09-16 10:59:41 +02:00
Gautier Hattenberger 6aef1fe591 [ocaml] iter on correct target name 2020-09-04 14:37:10 +02:00
Gautier Hattenberger 6ad7fa93d0 Fix settings in log (#2569)
* [log] add the latest generated settings if available to log file

This way, the exact order of the settings used during the flight might
be available.
The only false case would be to start a server, rebuild and aircraft
with different parameters or target, then flash and start the plane. In
this case, there is no guarantee that the information is correct.
However, this is the best we can do, since we can't know when starting
the server with which target the aircraft will be used.

close #2563

* [fix] use correct FP dumping tool for replay
2020-08-26 16:15:24 +02:00
Gautier Hattenberger 5dfb6f2259 [fix] handle more exceptions when parsing conf (#2562)
it is currently crashing the server when their is an error in the conf
files
2020-08-17 18:21:39 +02:00
Mohammad Jafar Mashhadi eeac31e1e4 Added try...except to be more safe after pprzlink api changes. (#2548)
* Updated pprzlink library to the latest version

* Added try...except to crazyradio2ivy.py to be safer after pprzlink API changes. paparazzi/pprzlink#117

* Updated request messages with the new pprzlink API

* Added a #noqa comment so linters won't remove the seemingly unused import.

* Updated the guided_mode_example.py to have a wait timeout.
2020-07-14 01:01:36 +02:00
Gautier Hattenberger 09c0c8ccb9 Aircraft generator (#2545)
* [ocaml] massive update of the build process
convert individual code generator to a single process, parsing everything once and calling the required generators
- remove all subsystems makefiles
- fix module name
- example of radio file without ctl attribute

* [build] start with flight plan to make semaphore happy
* [ocaml] move the buffer outside the lazy block
for some reason, it seems to make problems with compilation server
Semaphore
it really makes no sense, but nevermind...
2020-07-05 21:38:09 +02:00
Roderick Tam 8b140c1db7 Instead of 'import commands' use 'import subprocess' as this is compatible with Python3. 2020-05-27 15:50:31 +02:00
Gautier Hattenberger 00d0c27c4e [gtk] fix depreciated gtk2 elements 2020-03-30 23:47:59 +02:00
Gautier Hattenberger 4d920c118c [ocaml] fix and update for latest ocaml
fix usage of Bytes and String
drop support of ocaml < 4.02
we keep Compat for functions that need ocaml 4.03 until end of life of
Ubuntu Xenial 16.04, drop support of previous releases
enforce type safe_string option to prevent future errors
replace Pervasives by Stdlib (depreciated in latest ocaml vesions)
only use ocamlnet >= 4.0.4
2020-03-30 23:47:59 +02:00
Gautier Hattenberger 1b57ff131b [build] fix build dep for tools (#2472)
* [build] fix build dep for tools

fix #2228

* fix more dep for fast and recent proc

it's awesome

![clean_after](https://user-images.githubusercontent.com/483944/70664849-8b28b280-1c6b-11ea-81b3-d21ff45e2897.png)
![make_after](https://user-images.githubusercontent.com/483944/70664852-8cf27600-1c6b-11ea-977a-8cb783217548.png)
2019-12-11 23:13:41 +01:00