42481 Commits

Author SHA1 Message Date
Matthias Grob
6cdf09644e PositionSmoothing: fix corner altitude bug
During a round corner the L1 distance calculation
was only done in 2D and the z-axis coordinate
was directly coming from the next waypoint.
This lead to an unpredictable altitude profile
between two waypoints. Sometimes almost all
altitude difference was already covered during
the turn instead of going diagonally.
2023-11-10 19:32:21 +01:00
Julian Oes
4138ab0436 gps: update to latest release/1.14 branch
This sets the src/drivers/gps/devices submodule to the latest
release/1.14 branch. This fixes a potential issue with the Unicore M10
GPS driver, making sure the AGRICA message is requested.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-10 12:16:11 +13:00
Julian Oes
e5d92c5195 mavlink: fix MAVLink message forwarding
This switches from the horribly intertwined ringbuffer implementation to
the new VariableLengthRingbuffer implementation.

By ditching the previous implementation, we fix MAVLink message
forwarding, which didn't work reliably. The reason it didn't work is
that multiple mavlink messages could be added but only one of them was
sent out because the buffer didn't keep track of the messages properly
and only read the first one.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-10 12:15:58 +13:00
Julian Oes
2edc3cf845 lib: add variable length ringbuffer
This adds a reusable class for a FIFO ringbuffer that accepts variable
length packets. It is using the Ringbuffer class internally.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-10 12:15:58 +13:00
Julian Oes
813494bc3d lib: add FIFO ringbuffer class
This adds a reusable class for a simple FIFO ringbuffer.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-10 12:15:58 +13:00
Julian Oes
e9a142ac7d mavlink: properly set mission_type
This was defaulted to 0 before which messed with transmitting geofence
and rally items.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-10 12:15:05 +13:00
alexklimaj
40c9789e7d boards: arkv6x fix wrong pwm output values 2023-10-31 10:23:57 -04:00
Silvan Fuhrer
b8c541dd72 TiltrotorEffectiveness: limit thrust axis tilt to z effectiveness scaling
During transition to FF, only allow update thrust axis up to 45° as with a high tilt angle
the effectiveness of the thrust axis in z is apporaching 0, and by that is increasing
the motor output to max.
Transition to HF: disable thrust axis tilting, and assume motors are vertical. This is to avoid
a thrust spike when the transition is initiated (as then the tilt is fully forward).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
v1.14.0
2023-10-18 16:31:42 -04:00
Beniamino Pozzan
2d3238dfbe
[gz-bridge] fix GZ timeout for slow starting simulations (#22195)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2023-10-18 09:41:53 +02:00
Vincent Poon
ad36b9add7 Fix Default Output Protocol - Airframe 4019_x500_v2
Remove "param set-default PWM_MAIN_TIM0 -4"
2023-10-08 10:43:22 +13:00
Julian Oes
13cb8ce4a8 cubepilot: fix 4. Orange+ variant
There was a missing then, and missing SPI definitions.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-06 08:02:22 +13:00
Julian Oes
b4f425db56 cubepilot: Add support for 4. variant of Orange+
This adds support for the 4. hardware variant of the CubeOrange+
featuring 3 ICM45686.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-06 08:02:22 +13:00
Beat Küng
e961b29c56 fix crsf_rc: prevent potential buffer overflow for unknown packets
The length check for unknown packets did not include PACKET_SIZE_TYPE_SIZE
and CRC_SIZE, and hence working_index could overflow CRSF_MAX_PACKET_LEN,
triggering invalid memory access further down in QueueBuffer_PeekBuffer.

Also the working_segment_size was wrong for unknown packets.

Credits for finding this go to @Pwn9uin.
2023-10-05 08:00:32 +02:00
Silvan Fuhrer
6e65478959
vfr_hud: fix throttle display for FW and show magnitude for 3D thrust (#22157)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 09:55:22 +02:00
Silvan Fuhrer
2f5aa92596 FW Position Controller: handle IDLE waypoints in FW_POSCTRL_MODE_AUTO, also with NAN setpoints
A setpoint of type IDLE can be published by Navigator without a valid position,
and should be handled in the auto function in FW_POSCTRL_MODE_AUTO. If it wouldn't be
handled there the controller would switch to mode FW_POSCTRL_MODE_OTHER, in which case
no attitude setpoint is published and the lower controllers would be stuck with the
last published value (incl. thrust).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
v1.14.0-rc2
2023-09-21 16:23:08 -04:00
Silvan Fuhrer
080e16f0a6 FW Positon Controller: set references to 0 if not provided by local_position (#22101)
* FW Positon Controller: set altitude_ref to 0 if not provided by GPS

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

* FW Positon Controller: set lat/lon reference to 0 if not provided in local_position

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

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-20 17:43:35 -04:00
Thomas Stastny
27e6a0d227 Commander: make sure unsupported do reposition command result is published
todo: need to consolidate the command ack strategy in this function
2023-09-19 19:16:02 -04:00
Thomas Stastny
ff8663b0b1 Commander: dont accept reposition commands without the mode switch bit
avoids erroneous (unexpected) position setpoints when switching into hold from another mode
2023-09-19 19:16:02 -04:00
Thomas Stastny
3e68e806b8 loiter: only accept reposition setpoint if commanded within last 0.5 sec
guards against left over reposition commands (potentially set via geofence) from previous flights
2023-09-19 19:16:02 -04:00
Thomas Stastny
39351acbcb FixedwingPositionControl: initialize the airspeed slew rate controller with trim airspeed in the constructor 2023-09-19 19:15:41 -04:00
Daniel Agar
2c9b739814 drivers/optical_flow/paa3905: backup scheduling to fetch 0 flow
- this sensor provides a MOTION interrupt used for default scheduling, but we also need to publish
   zero flow information
2023-09-18 14:19:56 -04:00
Daniel Agar
5e8ee98bf9 sensors/vehicle_optical_flow: don't publish interval lower than configured rate 2023-09-18 14:19:56 -04:00
Daniel Agar
d98f3554da drivers/optical_flow/paw3902: backup scheduling to fetch 0 flow
- this sensor provides a MOTION interrupt used for default scheduling, but we also need to publish
   zero flow information
2023-09-18 14:19:56 -04:00
Thomas Stastny
1f30b2168d FixedwingPositionControl: rework airspeed slew controller handling
- force initialize takeoff airspeed setpoint at start of takeoff modes
- force set airspeed constraints if slewed value is out of bounds
- always slew airspeed setpoints as long as inside constraints
- move target airspeed setpoint calculation into mode specific logic regions (hand vs runway)
2023-09-13 11:26:03 -04:00
Silvan Fuhrer
17177b3948 ROMFS: SITL plane_catapult: reduce FW_LAUN_AC_THLD to 10m/s/s to detect every throw
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-13 11:26:03 -04:00
Silvan Fuhrer
ccef260f10 FW Pos Control: add in_takeoff_situation argument to adapt_airspeed_setpoint()
when we're in a takeoff situation, we only want to adapt the airspeed to
avoid accelerated stall due to load factor changes. Disable othre logic
like minimum ground speed, wind based adaption and airspeed slew rating.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-13 11:26:03 -04:00
Thomas Stastny
3c9c5f7184 FixedwingPositionControl: slightly simplify manual position control (use navigateLine() to be sure no turnaround)
make notes on odd things that are likely still wrong
2023-09-12 11:22:22 -04:00
Thomas Stastny
7316d50555 FixedwingPositionControl: revise navigateLine(), navigateBearing() and naivgatePathTangent() briefs 2023-09-12 11:22:22 -04:00
Thomas Stastny
97112a7d20 FixedwingPositionControl: forgot to rename input args in navigateWaypoints() declaration 2023-09-12 11:22:22 -04:00
Thomas Stastny
cd9fd12e91 FixedwingPositionControl: reuse line() and waypoint() methods in navigateWaypoints() method 2023-09-12 11:22:22 -04:00
Thomas Stastny
a3f1f0e846 FixedwingPositionControl: split out single waypoint following method
makes more clearly defined interfaces and behaviors. also cleaned up the controlAutoPosition() method
2023-09-12 11:22:22 -04:00
Thomas Stastny
37015c3dbe FixedwingPositionControl: track single point when no prev point exists for waypoint following
make sure correct local position setpoint output is logged
2023-09-12 11:22:22 -04:00
Thomas Stastny
7160da741d FixedwingPositionControl: correct navigation method param description typos 2023-09-12 11:22:22 -04:00
Thomas Stastny
db48b04281 FixedwingPositionControl: follow (infinite) lines instead of waypoints during takeoff and landing 2023-09-12 11:22:22 -04:00
Thomas Stastny
da8dcc4942 FixedwingPositionControl: handle degenerate tangent setpoint in navigatePathTangent() 2023-09-12 11:22:22 -04:00
Thomas Stastny
7c2c288c09 npfg: update signed track error state 2023-09-12 11:22:22 -04:00
Thomas Stastny
30870e50c0 FixedwingPositionControl: fix / clarify navigate waypoint logic 2023-09-12 11:22:22 -04:00
Julian Oes
28b018f9bd px4_fmu-v5_test: save flash by disabling fixedwing
Signed-off-by: Julian Oes <julian@oes.ch>
2023-09-12 11:22:04 -04:00
Julian Oes
3896df3e72 mavlink: improve readability
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2023-09-12 11:22:04 -04:00
Julian Oes
56fcabf0b1 mavlink: Support voltages > 65v in battery status
If the measured voltage is more than 65v we need to split the voltage
over multiple cells in order to avoid overflowing the uint16. This is
according to the MAVLink spec.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-09-12 11:22:04 -04:00
Julian Oes
7b60737f9a mavlink: fix BATTERY_STATUS extension
The extension fields need to be 0 by default according to the MAVLink
spec. This is because extensions are 0 by default and need to be 0 when
unknown/unused for backwards compatibility.

The patch also simplifies the flow slightly in that it doesn't create a
temporary array but just fills in the cell voltages directly.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-09-12 11:22:04 -04:00
Julian Oes
440165809a 6x: fix internal mag rotation
From looking at the history the BMM150 rotation was initially 0. Then,
this was changed to 6 when the intent was to only change it for Skynode.

A bit later, the rotation was changed back to 0, but only for Skynode.

This tells me that rotation 0 was correct for all 6X including Skynode
all along.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-09-12 21:26:59 +12:00
Peter van der Perk
d9fd67be3b [BACKPORT] MR-CANHUBK3 ADAP board support, add ADC support 2023-09-07 19:10:10 -04:00
alexklimaj
3cf205c4a6 ARKV6X update rev 2 heater default temp id 2023-09-05 13:09:45 -04:00
alexklimaj
d54e488288 Add IIM42653 and ARKV6X Rev 2 2023-09-05 13:09:45 -04:00
Matthias Grob
70081652fe Tools/auterion: add Skynode upload scripts (#21842) 2023-08-21 18:16:37 +02:00
Daniel Agar
61bfa4fdc5 gitmodules update NuttX branch name 2023-08-15 21:15:48 -04:00
David Sidrane
3c94a447d6 NuttX with NXP Backports & DEBUGASSERT & Soket CAN fix
This is the same jump off point as main and release/1.14
  with several NXP arch backports, 2 Commit fixing bad DEBUGASSERT
  logic and a  Soket Can change.
2023-08-15 21:15:48 -04:00
Christian Rauch
44805b9e62 skip SSH key check for simpler builds in the Docker container 2023-08-14 10:45:16 -04:00
Christian Rauch
c5fc5c83d2 pca9685_pwm_out: add parameter PCA9685_RATE to set update frequency 2023-08-08 12:49:21 -04:00