Commit Graph

3206 Commits

Author SHA1 Message Date
Matthias Grob a28ad8e845 mixer_module: consistent PWM/oneshot calibration range 2023-06-16 12:05:47 +02:00
Matthias Grob 1ceca8f2cf actuator_test: condition order refactoring 2023-06-16 12:05:47 +02:00
Matthias Grob 94d2140a4f mixer_module: remove unnecessary init state
That state only delayed the first arming by 50 miliseconds.
Was presumably a workaround for some issue very very early on.
See cc452834c0
2023-06-09 21:15:08 -04:00
Matthias Grob 0f256718d3 mixer_module: correct pwm ramp
Before:
When the mixed throttle for the motor was exactly zero the ramp went
from the disarmed PWM value to the minimum PWM value.

When the throttle was even just slightly different from zero the ramp
made a jump up to the commanded throttle scaled between
disarmed PWM and maximum PWM, then ramped between
disarmed PWM and minimum PWM and at the end jumped up again to
the commanded throttle scaled between minimum PWM and maximum PWM.

After:
The ramp goes from disarmed PWM value to the the
commanded throttle scaled between minimum PWM and maximum PWM.
If the commanded throttle changes during the ramp then the scale and
hence also end value of the ramp changes.
2023-06-09 21:15:08 -04:00
Beat Küng 7230a6dd8e commander: add option to exclude mag to param SYS_FAC_CAL_MODE 2023-06-09 21:05:40 -04:00
mcsauder b8ad9bdbe5 Add magnetometer thermal compensation. 2023-06-07 12:07:29 -04:00
oneWayOut 6ee2d796ea delete unused ECL_LIB_GIT_VERSION
Since 'ecl' is nomore a git submodule, code lines related to
'ECL_LIB_GIT_VERSION' could be deleted
2023-06-06 11:24:49 -04:00
bresch d03f242c04 DCM: use simplified conversion from unit quaternion
This is exactly equivalent for a unit quaternion (and only unit
quaternions should be used to encode a rotation)
2023-06-05 11:58:42 -04:00
Eric Katzfey d2011e99b2 commander: add Open Drone ID arming check (#21652) 2023-06-01 07:52:52 +02:00
Beat Küng db18a94382 refactor param: reduce flash usage
Reduces usage by ~1.5KB
2023-05-31 07:45:20 +02:00
Beat Küng 1bfca24fa9 refactor param: move autosave to px4::wq_configurations::lp_default work queue
Changes initialization order as param_init now depends on wq manager
2023-05-31 07:45:20 +02:00
Thomas Debrunner f0dd9fa445 param: Add contained-params-bitset export interface to the param layers
Allows for efficient looping over the contained data
2023-05-31 07:45:20 +02:00
Thomas Debrunner bc872822bc params: Overhaul param system to use a layered approach without locking
- Instead we disable interrups on Nuttx where needed
- No lock is held during param export. Params can be changed
  concurrently and we rely on the fact that another export will be
  triggered in that case.
2023-05-31 07:45:20 +02:00
Silvan Fuhrer ad769db8d6 FW Rate Controller: allow to enable/disable yaw axis in Acro (#21566)
* RateControl: rename setGains to setPidGains to be more precise

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

* FW Rate controller: only allow to disable Yaw in Acro, not roll and pitch

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

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-26 15:09:29 +02:00
Patrick José Pereira cee21bd703 sensor_calibration: Use snprintf over sprintf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2023-05-22 07:46:54 +02:00
Silvan Fuhrer 77d09785f3 TECS: init _velocity_control_traj_generator properly
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-15 13:53:32 +02:00
Morten Fyhn Amundsen 04c5d70588 matrix: Describe emult, edivide functions 2023-05-09 16:14:55 +02:00
PX4 BuildBot 2a93875a5f Update submodule libevents to latest Mon May 1 12:39:12 UTC 2023
- libevents in PX4/Firmware (406dc9b62627aec0c14df2d1e6d09b849f12487f): https://github.com/mavlink/libevents/commit/48911e7be752a908a15d945b796ed8d8282b7b02
    - libevents current upstream: https://github.com/mavlink/libevents/commit/a9a3fc07abb8bd8eb6fbca64c35b479cab91ff35
    - Changes: https://github.com/mavlink/libevents/compare/48911e7be752a908a15d945b796ed8d8282b7b02...a9a3fc07abb8bd8eb6fbca64c35b479cab91ff35

    a9a3fc0 2023-03-31 Beat Küng - README: update link to initial design doc
fb630b3 2023-03-30 Beat Küng - pylint: fix 'Raising too general exception' errors
72108eb 2023-03-29 flickering-light - Unused content variable fix
2023-05-01 13:40:00 -04:00
Daniel Agar f0bea542d5 Update world_magnetic_model to latest (#21533)
* Update world_magnetic_model to latest Mon May  1 11:14:06 UTC 2023
* [AUTO COMMIT] update change indication

Co-authored-by: PX4BuildBot <PX4BuildBot@users.noreply.github.com>
2023-05-01 08:59:55 -04:00
Eric Katzfey 73db1a02ca modal_io: add rpm unit to parameters (#21473) 2023-04-18 07:41:45 +02:00
Matthias Grob 37d3218d11 matrix: add 2d rotation matrix 2023-04-15 21:57:40 +02:00
Silvan Fuhrer 8f520ab019 tecs: fix throttle prediction (#21444)
* tecs: fix throttle prediction

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

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-04-06 20:13:32 +02:00
Silvan Fuhrer 460956fd33 TECS: revert altitude controller to old logic
- if the height rate input into TECS is finite, use that one to
update a velocity reference generator
- if the velocity reference generator reports position locked or
height rate input is not finite, then run altidue reference generator
- run altitude controller only if altitue is controlled

if height_rate_setpoint is set, only use that one to update altitdue trajectory

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer 60cd20c19c TECS: make more readable
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer 2d01cf63ce TECS: rename _reference_model to _altitude_reference_model
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer beeae1f673 TECS: rename TECSReferenceModel to TECSAltitudeReferenceModel
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer 1f5046f165 FWPositionControl: trim throttle prediction improvements (#21345)
* FWPositionController: add linear airspeed-to-trim-throttle mapping

Scale trim throttle in a linear way with airspeed.
Different gradients above/below trim airspeed.

The airspeed- and airs density-corrected trim throttle is required for an accurate
throttle prediction in TECS, while the default trim throttle is still needed
as well, as the throttle delta from height rate setpoint delta is linked to it.

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 11:56:54 +02:00
Daniel Agar 4d9369dc67 Update world_magnetic_model to latest Fri Mar 24 11:14:06 UTC 2023 2023-03-24 09:39:26 -04:00
bresch 6bee0893de add circle intersection unit tests 2023-03-22 10:03:48 +01:00
bresch af345c88e9 TrajMath: use fmaxf instead of max 2023-03-22 10:03:48 +01:00
bresch c7bddda1db MC auto: add maximum RC assist distance during landing 2023-03-22 10:03:48 +01:00
Matthias Grob 9f8fa99d70 matrix: use stack allocation for debug output string 2023-03-21 15:01:26 +01:00
Matthias Grob b1435c6e34 matrix: use output stream function template
to enable proper automatic output in gtest unit tests
that compare two `Matrix`, `Vector` or two `Dual` objects.

Credits to @jwidauer for showing me this trick.
2023-03-21 15:01:26 +01:00
Matthias Grob b0189d95af Use new Vector4 class 2023-03-21 15:01:26 +01:00
Matthias Grob 08d6465ce5 matrix: add explicit Vector4 type 2023-03-21 15:01:26 +01:00
Beat Küng 22c94f805a component information: add translation support 2023-03-20 21:57:25 -04:00
Silvan Fuhrer 28db47480d TECS: remove ununsed getSteRate()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-16 16:58:08 +01:00
Silvan Fuhrer a1812dbde0 gimbal: move gimbal controls to new dedicated topic
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-16 11:55:45 +01:00
Silvan Fuhrer b16f16598b VTOL: remove virtual actuator_controls and instead use virtual torque/thrust topics
MC/FW rate controller and auto tuner: remove actuator_controls

AirshipAttControl: remove actuator_controls

MulticopterLandDetector: remove actuator_controls

mavlink streams vfr_hud and high_latency2: remove actuator_controls

RoverPositionController: remove actuator_controls

UUVAttitudeController: remove actuator_controls

battery: use length of thrust_setpoint for throttle compensation

VehicleMagnetometer: use length of thrust_setpoint for throttle compensation

Signed-off-by: Silvan Fuhrer
2023-03-16 11:55:45 +01:00
akkawimo bcd6e7adee comment out fake_traffic to prevent flash overflow 2023-03-16 07:32:43 +01:00
Mohamad Akkawi 9de52bb5ec [navigator] Tone Down traffic warnings
- add unit tests for adsb conflict detection
- move adsb conflict detection to lib/adsb and adsb conflict class
- use containers/Array.hpp for buffer array
- expand fake_traffic
2023-03-16 07:32:43 +01:00
Silvan Fuhrer 9a038281c5 RoverPositionController: remove some unused stuff
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-06 14:00:02 +01:00
Silvan Fuhrer feec8b2036 L1: remove some functions that Rover doesn't need
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-06 14:00:02 +01:00
Silvan Fuhrer 76116d79f9 TECS: remove umcommanded_descent flag
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-01 10:39:09 +01:00
Silvan Fuhrer 527225357b TECS: remove unused TECS_MODE_CLIMBOUT
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-01 10:39:09 +01:00
Silvan Fuhrer 837095b9a8 tecs: use FW_T_SINK_MIN for STE_rate_min (#21190)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-24 15:46:41 +01:00
RomanBapst 6e07af959f fixed bug in Matrix library
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
Matthias Grob 6f4d903f45 Battery: address two comments from #2242
- use a constant instead of magic number
- fix code comment typo
2023-02-13 13:27:08 +01:00
Konrad b9f9f25b48 parameter_translation: Add parameter translation for renamed L1 parameters 2023-02-09 17:51:55 +01:00
KonradRudin c5d041a2f7 Rearrange npfg use path input (#21071)
* [npfg]: Remove the guideToPoint function and replace with guideToPath

* [npfg]: remove unused navigateXXX functions

* [npfg]: Move navigateXXX Function into FWPoscontrol

* [FixedwingPositionControl]: Set default flaps and spoilers in attitude setpoint topic, and only change if necessary.
2023-02-08 08:54:00 +01:00