Commit Graph

3142 Commits

Author SHA1 Message Date
Peter van der Perk fa87375d0c Add hardfault log progmem flash backend 2023-01-04 12:52:01 -05:00
Yannick Fuhrer 98529a5b49 Battery: delay initialization of SoC (#20729)
* Battery: delay initialization of SoC

* battery: rework of battery initialization delay

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-12-26 18:44:22 +01:00
Eric Katzfey c3e70b03aa Add more to Voxl2 build and fix associated build errors (#20821)
- Do not pull in PWM parameters when DISABLE_PARAMS_MODULE_SCOPING is TRUE since VOXL2 has no PWM nor any of the required timer_config files that go along with that
 - Replace non-standard M_PI constants with PX4 defined M_PI_F constants
 - Include missing header file for function hrt_absolute_time declaration
 - Add new PX4_SOC_ARCH_ID for the VOXL2 board
2022-12-22 15:44:19 -05:00
Daniel Agar f2cd7667dc systemcmds/bsondump: new command line utility (extracted from parameters) 2022-12-21 10:14:00 -05:00
Konrad f5524fa605 TECS: Combine both airspeed and airspeed derivative filters in TECS into one MIMO filter using a steady state Kalman filter. 2022-12-21 09:04:19 +01:00
Konrad 08c36612b3 TECS: Updated throttle control for airspeed sensorless vehicles. It includes the P gain controller instead of feedforward only. I term is still disabled. 2022-12-21 09:04:19 +01:00
Konrad 77539d4dac TECS: Rearrange setpoint input. If an altitude rate is given, use this as a feedforward term in the altitude control. If an altitude setpoint is given use a reference model to get a smooth altitude setpoint. 2022-12-21 09:04:19 +01:00
Konrad 8c6dfc840b TECS: Fix bug to reset airspeed derivative and energy rate low pass filters at every time step. 2022-12-21 09:04:19 +01:00
Konrad 7a3e0f53c2 TECS: Replaced old tecs by cleaned up version. 2022-12-21 09:04:19 +01:00
Konrad 991689d3cd TECS: Add new tecs library in parallel to old tecs in the position control library for comparison. 2022-12-21 09:04:19 +01:00
Konrad c64e111d8e TECS: Rearranged the TECS library into submodules. 2022-12-21 09:04:19 +01:00
Silvan Fuhrer 20342216e2 Airspeed Selector: use better density source and only save scale parameter if valid (#20764)
* AirspeedSelector: use vehicle_air_data.rho for calculating groundspeed-wind CAS

Previously the vehicle_air_data.temperature and pressure was used, instead of the
density field directly.
Only makes a difference if there is an airspeed sensor connected to provide
the air temperature.

* AirspeedSelector: only safe estimated scale in param if airspeed is valid

* AirspeedSelector: remove 0.01 cliff for saving learned scale to param

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-20 15:52:54 +01:00
Igor Misic 52275923ad adsb: add support for callsign 2022-12-20 08:18:09 +01:00
Eric Katzfey 678607117a Qurt UART ESC driver support (#20784) 2022-12-20 01:25:12 -05:00
PX4 BuildBot da7d52e302 Update submodule libevents to latest Tue Dec 20 00:39:10 UTC 2022
- libevents in PX4/Firmware (26f3fea7ebb328ef58d4d592dae0559c91f13c1c): https://github.com/mavlink/libevents/commit/0c8bc543db2f8c78f59214d5bcf959bdadd96677
    - libevents current upstream: https://github.com/mavlink/libevents/commit/8d9c5551273a52e22253ea6abf28d9e4b05e0ab7
    - Changes: https://github.com/mavlink/libevents/compare/0c8bc543db2f8c78f59214d5bcf959bdadd96677...8d9c5551273a52e22253ea6abf28d9e4b05e0ab7

    8d9c555 2022-12-13 Beat Küng - README: clarify use of component ID
2022-12-20 01:24:15 -05:00
Beat Küng 5217bedd4b commander: make SYS_HAS_MAG a count param and ensure system has N calibrated + enabled mags 2022-12-14 07:55:04 +01:00
Eric Katzfey e17ddcc0e5 Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt)
 - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
2022-12-12 22:02:23 -05:00
Eric Katzfey a5e4295029 lib/drivers: device drivers library for Qurt platform (#20741) 2022-12-10 19:31:06 -05:00
Daniel Agar f3884d5835 Update world_magnetic_model to latest Fri Dec 9 11:14:09 UTC 2022
Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-12-09 11:40:30 -05:00
Daniel Agar 8114aad983 initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
2022-12-08 23:03:44 -05:00
PX4 BuildBot b3cebc6686 Update submodule libevents to latest Wed Dec 7 00:39:06 UTC 2022
- libevents in PX4/Firmware (ff161d5eca5ee3e605840dc05642984985fcbf5a): https://github.com/mavlink/libevents/commit/179f86a8fc7fd74cb80630e77b1b9435d3c5b748
    - libevents current upstream: https://github.com/mavlink/libevents/commit/0c8bc543db2f8c78f59214d5bcf959bdadd96677
    - Changes: https://github.com/mavlink/libevents/compare/179f86a8fc7fd74cb80630e77b1b9435d3c5b748...0c8bc543db2f8c78f59214d5bcf959bdadd96677

    0c8bc54 2022-11-07 Beat Küng - README: fix typo
ca1cce0 2022-11-04 Beat Küng - README: add note for usage of UNIT's
2022-12-06 19:39:37 -05:00
Thomas Stastny 2da10183f3 welford mean: remove old comments 2022-12-06 08:59:12 -05:00
Daniel Agar 89b81b0bd6 create Welford mean Vector with covariance and improve precision with Kahan summation (#20676)
- WelfordMeanVector now computes covariance
 - use Kahan summation for Welford mean (but continue using float32 for actual mean, etc)
 - WelfordMean and WelfordMeanVector handle initial value and count roll over
 - Welford mean count rollover at 16 bit max to prevent numerical issues and shift weight to newer samples
 - sensors/vehicle_imu: update Welford mean usage (now simplified with resets removed)
    - fix vehicle_imu_status accel var, now properly rotated with full covariance matrix
 - gyro_calibration: update Welford mean usage
2022-11-30 14:50:13 -05:00
Matthias Grob 9e776741d9 battery: allow for external state of charge injection 2022-11-29 09:27:50 +01:00
Matthias Grob 331cb21dee manual_control_setpoint: change stick axes naming
In review it was requested to have a different name for
manual_control_setpoint.z because of the adjusted range.

I started to investigate what naming is most intuitive and found
that most people recognize the stick axes as roll, pitch, yaw, throttle.
It comes at no surprise because other autopilots
and APIs seem to share this convention.

While changing the code I realized that even within the code base
the axes are usually assigned to a variable with that name or
have comments next to the assignment clarifying the axes
using these names.
2022-11-28 19:25:55 +01:00
Matthias Grob 83246c84cf Switch manual_control_setpoint.z scaling from [0,1] to [-1,1]
To be consistent with all other axes of stick input and avoid future
rescaling confusion.

Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range
according to the message specs now [-1000,1000].
2022-11-28 19:25:55 +01:00
Silvan Fuhrer bd176241f8 param translation: remove old param translations (more than 1 release back)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-25 18:45:36 +01:00
Silvan Fuhrer 1400f81874 FW Pos C: rename LAUN_* param to FW_LAUN_* to be more explicit
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-25 18:45:36 +01:00
Silvan Fuhrer e6e2c889e0 FW Position controller: rename LAUN_ALL_ON to LAUN_DECTN_ON
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-25 18:45:36 +01:00
Matthias Grob 9de3af1cbc Functions: interpolate brackets and spacing 2022-11-23 11:06:44 -05:00
Silvan Fuhrer a787a326e3 Fixed-wing: split out control of steering wheel into seperate message LandingGearWheel
Completely detach the steering wheel logic from the yaw controller (beside using the
same manual stick input in a manual flight mode).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Beat Küng a20c581111 mixer_module: remove unused limit_callbacks_to_primary argument 2022-11-22 13:41:16 -05:00
JaeyoungLim 2586900c26 Log local position setpoint reference for fixedwings when running NPFG (#20512)
* Log position setpoint reference of npfg

This commit logs the local position setpoint reference when using NPFG

* Address review comments

This commit address review comments from @tstastny
2022-11-22 08:19:38 +01:00
GaspardBesacier dfced1fe46 VTOL: Smarter pusher ramp up during front transtitions for standard VTOLs (#20394)
New param VT_PSHER_SLEW for ramping up throttle of pusher during front/back transition, that replaces the old VT_PSHER_RMP_DT param.
2022-11-14 16:32:51 +01:00
Daniel Mesham 1e39c4828f Check for OA interface failures only after it has been activated
The OA interface is 'activated' when it receives the first trajectory message.
2022-11-08 23:20:16 -05:00
Basti e721d8dd8f Split timeout check on avoidance input.
This split is necessary if the input from the mission computer might
switch from waypoints to bezier points. Otherwise
stays true.
2022-11-08 23:20:16 -05:00
JaeyoungLim a9542baf3c Enable motor controls for tailsitter VTOLs in fixed wing mode (enable Quad Tailsitters) (#20511)
* Enable motor controls for fixed wing mode in tailsitters

This commit enable motor controls in fixed wing mode for tailsitters

This is needed for enabling quad tailsitters

* VTOL: differential thrust in FW: adapt params to be generic for all axes

Until now only suppoted on yaw axis. Not to be supported also on Roll and Pitch.

- VT_FW_DIFTHR_EN: make bitmask for all three axes independently. First bit is Yaw,
sucht that existing meaning of VT_FW_DIFTHR_EN doesn't change.
- VT_FW_DIFTHR_SC: rename to VT_FW_DIFTHR_S_Y and add same params for roll (_R) and
pitch (_P).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Integrate differential control bits to three axis control

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-07 15:29:14 +01:00
Beat Küng ab3fe543d4 libevents: update submodule 2022-11-02 09:59:00 -04:00
Eric Katzfey 34c852255e Changed M_PI to M_PI_F in the matrix library since M_PI is non-standard. (#20458)
* Changed M_PI to M_PI_F in the matrix library since M_PI is non-standard.

* Added a new M_PI_PRECISE constant definition to px4_platform_common/defines.h to be
used in places when M_PI is desired but shouldn't be used because it is not C standard.

* Added the px4_platform_common/defines.h include to the matrix library math.hpp header to pull
in some non-standard M_PI constants and updated the test files to use those constants.

* Fixed PI constants in matrix helper test to prevent test failure
2022-10-31 11:51:23 -04:00
Eric Katzfey fa74ee3d5b perf: removed dprintf from perf library
* Removed dprintf from perf library since it is only ever used with fd=1 (STDOUT) so moved to PX4_INFO_RAW instead. This helps with some platforms (e.g. Qurt) which have some Posix support but not full Posix support.
2022-10-27 09:58:05 -04:00
Daniel Agar a242a0210e Update world_magnetic_model to latest Mon 24 Oct 2022 09:29:11 PM EDT 2022-10-25 09:20:01 -04:00
Igor Mišić 1c5750b292 mavlink: add support for uAvionix transmitters 2022-10-24 11:56:17 +02:00
Igor Mišić c35ae7260b transponder/sagetech_mxs: move the ADS-B related parameters to the lib
ADS-B parameters can be reused for other ADS-B devices
2022-10-24 11:56:17 +02:00
Silvan Fuhrer 128e49358e Wind Estimator: remove filter reset due to beta fusion timeout
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-24 09:56:18 +02:00
Silvan Fuhrer d8e483ae20 TECS: guard against NAN airspeed setpoints
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-21 09:51:38 +02:00
bresch 89bc28e836 wind_est: extract utility functions to separate file 2022-10-20 11:41:46 +02:00
bresch 2549054b28 wind_est: remove old derivation
replaced by derivation.py
2022-10-20 11:41:46 +02:00
bresch 7115d5643c wind_est: auto-generate initialization of state and cov matrix 2022-10-20 11:41:46 +02:00
bresch a7124d3738 wind_est: auto-generate beta fusion using Symforce 2022-10-20 11:41:46 +02:00
bresch 487b84e90b wind_est: place codegen details in function 2022-10-20 11:41:46 +02:00