Commit Graph
49 Commits
Author SHA1 Message Date
Mathéo Taillandier 336eafd0c5 fix(drivers): fix wrong RPM in UAVCAN ESC telemetry (#29580) 2026-11-16 08:55:04 +01:00
c058227cf0 feat(boards/agam): add FloRange board support (#28901)
* feat(boards/agam): add florange board target

DroneCAN optical flow, distance sensor and IMU module, derived from
ark/can-flow. board_id 1939, UAVCAN hardware version 7.147.

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Farhang <46557204+farhangnaderi@users.noreply.github.com>
2026-10-24 09:16:48 -04:00
Hamish Willee 67a9e81d42 docs: replace GNSS blending text with receiver selection (#29098)
* docs: replace GNSS blending text with receiver selection

GNSS blending and SENS_GNSS_MASK were removed in #28921, but the dual
receiver section of the EKF tuning guide and three ARK DroneCAN pages
still told users to configure it, through links to a parameter that no
longer exists.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* Apply suggestion from @hamishwillee

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-14 15:24:42 -06:00
Jacob Dahl de52c98eff feat(cannode): bootloader update from the app and combined flash image (#28293)
* feat(bl_update): pet the watchdog during erase and program

CAN nodes start the IWDG in the bootloader, and nothing else pets it
while bl_update holds the scheduler lock.

Assisted-by: Claude:claude-opus-5-5

* feat(nuttx): emit canbootloader to board extras and build bootloader+app image

canbootloader builds now write extras/<vendor>_<board>_bootloader.bin
like FMU bootloader builds do, which plugs CAN nodes into the existing
ROMFS / rc.board_bootloader_upgrade / jlink wiring. CAN node app builds
with that file also emit <config>_with_bootloader.bin (bootloader padded
to the app's ELF load address, followed by the CRC'd image) so a bare
board is flashed in one SWD step instead of two.

Assisted-by: Claude:claude-opus-5-5

* feat(cannode): run rc.board_bootloader_upgrade at startup

The hook was only wired into the FMU rcS, so SYS_BL_UPDATE did nothing
on CAN nodes even with bl_update built in.

* feat(ark): enable bootloader update on CAN nodes

Ships the CAN bootloader in the app ROMFS so a node can rewrite it via
SYS_BL_UPDATE without SWD.

Assisted-by: Claude:claude-opus-5-5

* docs(dronecan): bootloader update and combined image for CAN nodes

Assisted-by: Claude:claude-opus-5-5

* build(ark): rebuild CAN node bootloaders from current main

The committed binaries predated the F412 chip-selection and linker fixes
and the NuttX 12.12 upgrade, so they no longer matched the source.

Assisted-by: Claude:claude-opus-5-5

* feat(uavcannode): update the bootloader as soon as SYS_BL_UPDATE is set

Same approach as AP_Periph. Running the update on the next boot needed
two reboots and reported nothing over CAN: it ran before uavcannode
started, and the boot script printed "done" even when bl_update failed.
The node now flashes while running, skips an identical bootloader, and
the result reaches the flight controller through the existing log
message forwarding. A value left set from before boot is cleared rather
than acted on.

The flash routine moves into a library so uavcannode can call it.

Assisted-by: Claude:claude-opus-5-5

* docs(dronecan): note that the combined CAN node image resets parameters

Found on the bench: the padding between bootloader and app covers the
parameter sectors, so every SWD flash of the combined image erases them.

Assisted-by: Claude:claude-opus-5-5

* fix(nuttx): limit CAN bootloader extras and combined image to STM32

Every canbootloader build wrote its binary to the board's extras, so a
later nxp_ucans32k146 default or cyphal configure picked it up and failed
in prepend_bootloader.py: the S32K application loads at 0x6000, below
the 0x08000000 base the script and bl_update assume. CI only passed
because the canbootloader was built after both had configured.

Assisted-by: Claude:claude-fable-5-1

* fix(bl_update): pad the image before erasing and warn on every flash failure

The STM32F4 up_progmem_write() returns -EINVAL for an odd byte count,
which was only found out after sector 0 had been erased. An erase or
program failure also leaves the board without a bootloader, but only a
verify failure told the user to retry before rebooting.

Assisted-by: Claude:claude-fable-5-1

* fix(romfs): pack rc.board_bootloader_upgrade only where rcS runs it

CAN nodes with bl_update carried the script in their ROMFS although the
cannode rcS never sources it: uavcannode flashes the bootloader itself.

Assisted-by: Claude:claude-fable-5-1

* refactor(bl_update): move the flash routine to src/lib

The library lived under systemcmds, which is configured after drivers,
so uavcannode could only link it through a forward reference. The
watchdog is now selected by chip because the platform targets do not
exist yet when src/lib is configured.

Assisted-by: Claude:claude-fable-5-1

* docs(dronecan): the CAN bootloader is written to extras on STM32 only

Assisted-by: Claude:claude-fable-5-1
2026-10-06 15:42:33 -06:00
Jacob Dahl b12d17f632 fix(gps): run a moving base and its rover at 5 Hz on every board (#28986)
* fix(gps): run a moving base and its rover at 5 Hz on every board

PX4-GPSDrivers f6f5c2d89a (PX4/PX4-GPSDrivers#244, with the style pass of #245): a moving base and its rover must share one navigation and measurement rate, and u-blox caps a moving base at 5 Hz on the F9P and the X20P. With the board defaults (F9P 5 Hz, X20P 10 Hz) a mixed pair was mismatched and the X20P rover reported no heading for the epochs its base never observed.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* docs(gps): moving base and rover share one navigation rate

The driver now holds both to 5 Hz in the moving base modes; the pages say so and tell the reader to leave GPS_UBX_RATE at 0.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-10-02 20:40:28 -06:00
Jacob Dahl e40501eba0 refactor(msg): rename GPS to GNSS in messages, topics and sensor parameters (#24399)
* refactor(msg): rename SensorGps to SensorGnss and add VehicleGnss

GPS is one constellation; the receivers and the rest of PX4 handle GNSS. Field names lose their units (latitude, speed_accuracy, course, ...), which move into the metadata comments. The sensors module's output becomes VehicleGnss on vehicle_gnss: the selected receiver's sample next to what the sensors module adds to it (corrected sample time, antenna position, selected instance), so a consumer can tell the two apart and later selection and check results have a place to go.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/gps): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/septentrio): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/pps_capture): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/gnss): select receivers on sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(sensors): publish VehicleGnss on vehicle_gnss and rename SENS_GPS* to SENS_GNSS*

The sensors module's output nests the selected receiver's sample, with the corrected sample time, antenna position and selected instance next to it. SENS_GPS_MASK/TAU/PRIME and SENS_GPSn_ID/OFFX/OFFY/OFFZ/DELAY take the SENS_GNSS name the heading parameters already use; saved parameters migrate on import, and the EKF2_GPS_POS/EKF2_GPS_DELAY translations now land on the new names directly.

Assisted-by: Claude:claude-opus-5-5

* refactor(logger): log sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(ekf2): fuse vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(replay): replay vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(local_position_estimator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(attitude_estimator_q): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/terrain_estimation): take sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/wind_estimator): read vehicle_gnss in the replay script

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(vision_target_estimator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(navigator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(commander): read sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(mavlink): stream sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(uxrce_dds_client): bridge vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(zenoh): bridge vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(failure_injection): inject GNSS failures on sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/ins): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/uavcan): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/uavcannode): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/cyphal): bridge sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/telemetry): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/rc): read vehicle_gnss for telemetry

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/osd): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/transponder): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(boards/modalai): publish sensor_gnss from the voxl2 drivers

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(examples): publish sensor_gnss and read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(simulation): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the sensors module and receiver drivers

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the estimators and navigator

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in commander, mavlink and failure injection

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the remaining drivers and simulation

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* docs(gnss): reference sensor_gnss, vehicle_gnss and SENS_GNSS* parameters

The upgrade guide covers the topic, field, ROS 2, parameter and Cyphal register renames.

Assisted-by: Claude:claude-opus-5-5

* fix(boards): name EKF2::UpdateGnssSample in the fmu-v6xrt ITCM lists

The rename left the old UpdateGpsSample symbol in the lists, so the ITCM check fails and the function drops out of ITCM on the boards it doesn't check.

Assisted-by: Claude:claude-opus-5-5

* chore(drivers/gps): bump PX4-GPSDrivers to the merged sensor_gnss rename

The submodule pointed at the PX4-GPSDrivers#243 branch commit; #243 is merged.

Assisted-by: Claude:claude-opus-5-5

* docs(msg): restore WGS84 in SensorGnss and point VehicleGlobalPosition at vehicle_gnss

The rename dropped the only mention of the WGS84 datum and ellipsoid, and left VehicleGlobalPosition referring to the removed vehicle_gps_position topic.

Assisted-by: Claude:claude-opus-5-5

* refactor(msg): drop selected_instance from VehicleGnss

receiver.device_id already names the selected receiver, and 0 while blended. The sensor_gnss instance depends on the order drivers advertise at boot, so it doesn't identify a receiver across boots or logs, and nothing reads it. It would also be meaningless on the per-receiver VehicleGnss instances proposed in #28894.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): fuse vehicle_gnss.timestamp_sample directly and document the receiver's corrected time

vehicle_gnss.timestamp is now the sensors module's publish time, so EKF2's check of timestamp_sample against it was always true; the sensors module always fills timestamp_sample. The message docs described receiver.timestamp_sample as the driver's uncorrected value, but the sensors module writes the corrected time into it as well.

Assisted-by: Claude:claude-opus-5-5

* docs(msg): point VehicleGnss users at the top-level timestamp_sample

uXRCE-DDS shifts only top-level timestamp and timestamp_sample into agent time, so receiver.timestamp_sample reaches ROS 2 on the PX4 boot clock even though it holds the same value on uORB.

Assisted-by: Claude:claude-opus-5-5

* docs(releases): tell ROS 2 users which VehicleGnss timestamps to read

Only top-level timestamps are converted to ROS time, so a port that reads receiver.timestamp gets the PX4 boot clock, and vehicle_gnss.timestamp is now the sensors module's publish time rather than the receiver's.

Assisted-by: Claude:claude-opus-5-5
2026-09-29 10:36:49 -06:00
Jacob Dahl eb8f2f9b42 refactor(ekf2): separate GNSS heading from position into independent topic (#27102)
* feat(sensors/vehicle_gps_position): publish GNSS heading on its own topic

Dual-antenna heading was only reachable through the blended
vehicle_gps_position, so it carried the position timestamp, followed the
position blending weights and was published at the position rate.
vehicle_gnss_heading carries one selected source at a time, preferring
sensor_gnss_relative (callback driven) and falling back to
sensor_gps.heading for receivers that do not publish it. Per-receiver
delay and the driver heading offset are resolved by device_id; a sample
timestamp within 10 ms of the publish timestamp is treated as unset so
the configured delay applies.

* refactor(ekf2): fuse GNSS heading from its own sample buffer

Heading rode on gnssSample and was only fused when a position sample was
popped: faster heading was dropped by the observation rate limit, its
timestamp was the position timestamp and a position outage blocked the
start. gnssYawSample has its own TimestampedRingBuffer and pop. Non-finite
yaw is rejected at the interface and a NaN heading_offset is treated as
zero instead of reaching the fusion Jacobian. The test simulator feeds
heading as an independent sensor.

* feat(sensors/vehicle_gps_position): per-receiver baseline rotation SENS_GPSn_ROT

The antenna baseline orientation lived in three places depending on the
transport: the serial driver (GPS_YAW_OFFSET), the Septentrio receiver
(SEP_YAW_OFFS, SEP_PITCH_OFFS) and EKF2 for anything arriving with a NaN
offset, in practice CAN receivers (EKF2_GPS_YAW_OFF). A second receiver
with a different baseline had no parameter at all. Drivers now publish
the raw baseline heading and vehicle_gps_position rotates it into the
body frame from the receiver's SENS_GPSn_* slot, the same Rotation enum
the other sensors use, before blending and before publishing
vehicle_gnss_heading. Bumps PX4-GPSDrivers so sensor_gnss_relative
carries a real UTC time and no parse-time sample timestamp, which lets
the relative-position heading be delay-compensated and PPS-aligned.

* refactor(drivers/gps): drop the UBX heading_offset setting

Bumps PX4-GPSDrivers to PX4/PX4-GPSDrivers#241, which removes the
driver-side heading offset now that SENS_GPSn_ROT is the only place the
baseline is rotated.

Assisted-by: Claude:claude-opus-5-5

* refactor(sensors/vehicle_gps_position): remove sensor_gps.heading_offset

With the baseline rotation in SENS_GPSn_ROT, a finite offset only meant
"the driver already rotated this heading, skip SENS_GPSn_ROT". The only
remaining writer was older DroneCAN node firmware through the Fix2 ECEF
hack, which made a CAN node's heading switch between two conventions
depending on whether a RelPosHeading arrived between Fix2 messages: with
a non-zero SENS_GPSn_ROT yaw the heading jumped by that angle. Every
receiver's heading is now the measured baseline and SENS_GPSn_ROT is the
only rotation. MicroStrain external heading aiding, which recovered the
baseline heading from vehicle_gps_position, reads vehicle_gnss_heading.

Assisted-by: Claude:claude-opus-5-5

* fix(mavlink): report the body-frame GNSS heading in GPS_RAW_INT and GPS2_RAW

sensor_gps now carries the measured baseline heading, so for a baseline
not along the body x axis the yaw field was off by the mounting angle.
The body-frame heading is taken from vehicle_gnss_heading when the
streamed receiver is the heading source.

Assisted-by: Claude:claude-opus-5-5

* fix(replay): replay vehicle_gnss_heading to EKF2

ReplayEkf2 publishes only the topics it lists from inside the lockstep
barrier, so EKF2 replay never received the heading.

Assisted-by: Claude:claude-opus-5-5

* feat(parameters): migrate GNSS heading offsets to SENS_GPSn_YAW

GPS_YAW_OFFSET, SEP_YAW_OFFS and EKF2_GPS_YAW_OFF were removed without a
migration, so an upgraded vehicle silently lost its antenna mounting
offset and its GNSS yaw was off by that angle.

Assisted-by: Claude:claude-opus-5-5

* fix(sensors/vehicle_gps_position): build GNSS heading only where it is consumed

The heading selection, baseline rotation and SENS_GPSn_ROT parameters
overflowed diatone_mamba-f405-mk2 flash by 657 bytes. Boards built
without EKF2 GNSS yaw fusion or MicroStrain have no consumer for
vehicle_gnss_heading, so SENSORS_VEHICLE_GNSS_HEADING defaults on only
with one of them. The parameter migration also drops fmodf, since the
old parameters never exceeded one wrap.

Assisted-by: Claude:claude-opus-5-5

* feat(sensors/vehicle_gps_position): carry the heading receiver's jamming and spoofing state

So that EKF2 can gate GNSS yaw on the receiver providing the heading, which is not necessarily the position receiver.

Assisted-by: Claude:claude-fable-5-1

* fix(ekf2): gate GNSS yaw on the heading, not the position checks

Yaw fusion could only start once the position checks passed, and stopped with them. On an ARK G5 outdoors the heading was good from 36 s after power-up and was first fused at 104 s, held back by EPV while Galileo HAS converged; a 0.45 s PDOP failure while the vehicle was handled on the ground stopped yaw for 10 s with its innovations under 5.4 deg.

The heading is its own observation, often from its own receiver: yaw now starts on fresh data, tilt alignment and the heading receiver's spoofing and jamming state under the EKF2_GPS_CHECK bits, and keeps running when position and velocity fusion stop. The hold-off after a yaw fusion failure was a side effect of the position checks resetting; it is now a yaw timer that withholds the heading from a reset for the GNSS health time.

Assisted-by: Claude:claude-fable-5-1

* fix(sensors/vehicle_gps_position): carry an unknown GNSS sample time as 0

A GNSS sample time within 10 ms of the publish time was treated as unset and replaced by SENS_GPSn_DELAY. An ARK G5 over DroneCAN measures 8.3 to 21.5 ms from epoch to receipt, so 0.4% of its headings were re-stamped 110 ms early; at 20 Hz EKF2 dropped them as out of order, at a lower rate they would have been fused 100 ms late. A stamp meaning unset that crossed a busy bus in more than 10 ms would have been trusted instead.

Unknown is now 0 end to end: the serial driver leaves timestamp_sample at 0, the CAN node sends RelPosHeading's timestamp as UNKNOWN for it, and the autopilot's bridge publishes 0 when the node timestamp can't be used. Any other sample time before the publish time is trusted.

Assisted-by: Claude:claude-opus-5-5

* feat(sensors/vehicle_gps_position): derive the GNSS heading baseline from antenna positions

SENS_GPSn_ROT and its Euler angles carried one number: roll never moves a baseline along x, pitch only flagged a vertical one, and the heading model uses the baseline yaw alone. Nothing checked the heading against the installation either, so a receiver that flagged float solutions as valid reset yaw 87 deg wrong at first fix on an ARK G5 moving-base pair.

As in ArduPilot, the baseline now comes from the antenna positions: SENS_GPSn_HDG selects the other receiver's antenna (moving base, from both slots' SENS_GPSn_OFF) or a custom SENS_GPSn_BLX/Y/Z (single dual-antenna receiver), and a heading is used only when the receiver reports a baseline within 20% of it in length and in its vertical component over the sample's attitude. Those float solutions reported 10.9 m and 1.04 m for a 0.347 m baseline. A source is published once it has passed for 1 s: the headings right after the base antenna was re-plugged passed for 0.9 s while up to 25 deg wrong. vehicle_gnss_heading logs the reported baseline length.

A yaw offset can't be turned into a baseline, so GPS_YAW_OFFSET, SEP_YAW_OFFS and EKF2_GPS_YAW_OFF are not migrated; GNSS yaw stays off, with a warning, until SENS_GPSn_HDG is set.

Assisted-by: Claude:claude-opus-5-5

* fix(ekf2): stop GNSS yaw on a spoofed or jammed heading receiver

The heading receiver's spoofing and jamming state only kept yaw fusion from starting; a receiver that reported spoofing in flight kept feeding yaw, where position fusion stops. Its samples are now not fused, the fusion stops once none has been for the reset timeout, and a reset to its heading waits for the GNSS health time, as for position.

Assisted-by: Claude:claude-opus-5-5

* docs(dronecan): configure the ARK G5 heading baseline on the autopilot

The page still configured the heading offset with the module's SEP_OFFS_YAW, and required GPS blending for the heading to be published, which no longer carries it.

Assisted-by: Claude:claude-opus-5-5

* fix(sensors/vehicle_gps_position): drop a mismatched GNSS heading without restarting the settle

Outdoors on an ARK G5 moving-base pair 0.35 m apart, the reported down component of the baseline scattered by up to 0.16 m while the airframe was turned, and 9 cm at rest, against the 7 cm the vertical check allows. The rejected headings were as good as the accepted ones, but every rejection restarted the 1 s settle, so during 720 deg turns a heading was published for 4 to 62% of the time.

A sample that fails the baseline checks is now only dropped; the settle restarts when the receiver reports no heading. Replayed on that log, 85 to 99% of the turns get a heading.

Assisted-by: Claude:claude-opus-5-5

* fix(sensors/vehicle_gps_position): drop the GNSS heading baseline's vertical check

The check compared the reported down component of the baseline with the configured baseline rotated by the vehicle attitude, within 20% of the baseline length. On an ARK G5 moving-base pair 0.35 m apart the down component scattered by up to 9 cm at rest and 0.16 m while the airframe was turned, so it rejected good headings: across seven outdoor logs it rejected 184 samples under 5 deg of error and 6 over 10 deg, all of which the EKF innovation gate would handle, and nothing the length check missed on a receiver that withholds float headings.

The length check and the near-vertical check on the reported baseline stay. The sensors module no longer reads the vehicle attitude to check the heading.

* feat(sensors/vehicle_gps_position): SENS_GNSSn_HDG with the auxiliary antenna position

The heading parameters are new, so they take the GNSS name the rest of the SENS_GPS family moves to rather than being renamed again shortly. The setup names what the receiver is: the rover of a moving base pair, or a receiver with two antennas. For the latter the second antenna is given by its position, like the main one's SENS_GPSn_OFF, so every setup derives the baseline from antenna positions.

Assisted-by: Claude:claude-opus-5-5

* feat(drivers/septentrio): publish the heading baseline on sensor_gnss_relative

The heading only reached PX4 through sensor_gps, without the baseline the receiver measured, so the sensors module could not check it against the configured one and a heading from float ambiguities, confident on a baseline metres off, was used. AuxAntPositions (dual antenna) or BaseVectorGeod (moving base rover) now go out with the heading of the same epoch on sensor_gnss_relative at EndOfAtt, the heading valid only with fixed ambiguities. Ported from ARK's driver, where it was tested outdoors on mosaic-G5 P3H, P6 and P8.

A receiver that rejects the extra blocks falls back to the previous output without a heading. The heading accuracy is the square root of the reported variance; it was the deg^2 variance scaled as if it were degrees.

Assisted-by: Claude:claude-opus-5-5

* refactor(sensors/vehicle_gps_position): take GNSS heading only from sensor_gnss_relative

The sensor_gps fallback carried no reported baseline, so its headings skipped the length check that rejects a wrong ambiguity fix. Every receiver that matters now reports on sensor_gnss_relative: u-blox, Septentrio, the Unicore UM982 (PX4/PX4-GPSDrivers bump) and DroneCAN RelPosHeading. The heading fields of sensor_gps go, with the paths that filled them: NMEA HDT, Trimble MB-Two, Femtomes, SBG and MicroStrain, the heading in DroneCAN Fix2 on both the node and the autopilot, and the RelPosHeading copy into sensor_gps.

Assisted-by: Claude:claude-opus-5-5

* docs(gps_compass): configure GNSS heading with SENS_GNSSn_HDG

The heading parameters were renamed and the heading now only comes from receivers that report their baseline, so the Trimble MB-Two and Femtomes pages no longer describe a heading setup. The antenna spacing is the recommended 30 cm rather than the 5 cm the code rejects below.

Assisted-by: Claude:claude-opus-5-5

* chore(drivers/gps): point PX4-GPSDrivers at the merged PX4/PX4-GPSDrivers#242

The submodule tracked the PR's branch commit; the squash-merged commit has the same tree.

Assisted-by: Claude:claude-opus-5-5
2026-09-28 17:37:58 -06:00
Ramon Roche e0dc50d7cc build(uavcan)!: stop embedding CAN node firmware in flight controller builds
CONFIG_BOARD_UAVCAN_PERIPHERALS made ROMFS clone the PX4 repository and
run a second full build of a CAN node on every build of the flight
controller, to carry that node's firmware in /etc/uavcan/fw/. Its only
user, px4_fmu-v5_uavcanv0periph (CUAV CAN GPS v1), disabled about 30
modules to make room, and was downloaded 40 times in five years, never
through QGroundControl. Releases now publish every CAN node's firmware
standalone as <target>.uavcan.bin, which the DroneCAN firmware server
installs from the SD card on any flight controller.

Remove the option, the ROMFS ExternalProject and the board variant, and
point the DroneCAN docs and the release notes at the SD card path. The
server still serves /etc/uavcan/fw/, which is now empty.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-09-28 09:45:09 -07:00
Jacob Dahl 816a234175 docs(dronecan): drop EKF2_RNG_A_HMAX from rangefinder setup (#28836)
EKF2_RNG_A_HMAX is the height below which conditional range aid uses the rangefinder as the height source, not the maximum range the EKF uses; that comes from the sensor's reported max distance (UAVCAN_RNG_MAX). The DIST and smartmicro pages set it to the sensor range (30, 50, 175 m), above the parameter's 10 m max, so QGroundControl only accepts it with a force-save. The right value depends on the vehicle's baro ground effect rather than the sensor, so the default applies.

Assisted-by: Claude:claude-opus-5-5
2026-09-24 11:17:24 -06:00
Matthias Grob 6702a8bc69 feat(uavcan_esc): add DroneCAN device quirks bitmask parameter for non-compliant ESCs (#28279)
Introduces a general UAVCAN_QUIRKS bitmask so workarounds for other
non-compliant DroneCAN devices can be added as new bits without
introducing a new parameter each time. Bit 0 covers the Hobbywing
ESC esc_index off-by-one quirk.
2026-09-10 11:27:06 +02:00
Jacob Dahl 7cfa8d1d40 docs(gps): UART2 cannot update u-blox firmware (#28593)
u-blox does not support firmware upgrade on UART2. GPS_UBX_MODE 7 is a diagnostic port only.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-09-08 20:17:13 -06:00
Hamish Willee ba5a120c06 docs(docs): DroneCAN ESC and ark 6rt RC fix (#28503)
* DroneCAN ESC armingstatus and relnote

* Shrink ard6xrt images

* docs(docs): Fix up RC section of docs

* docs(docs): IO module docs include protocols
2026-09-02 13:09:03 +10:00
Jacob Dahl 3969a1b8ff fix(ci): publish flashable CAN node firmware (#28445)
* fix(ci): publish flashable CAN node firmware

Release packaging only collected .px4 files, which the DroneCAN bootloader cannot flash.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ci): attach canbootloader .bin as the SWD image

The cannode bootloader is a raw .bin for st-flash, not a .px4 envelope.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ci): drop cannode.zip from release assets

The target-named .uavcan.bin and _canbootloader.bin files are the flashable images; the zip only duplicated them.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-28 22:17:34 -06:00
Hamish Willee a906b72868 docs(docs): Fix external links and add ignore deferals to retested cases (#28400) 2026-08-27 15:53:41 +10:00
UlliJohnSMS 59061867d5 docs(docs): add smartmicro rangefinder (#28274) 2026-08-27 15:42:41 +10:00
Alex KlimajandJacob Dahl e5156f77ea fix(uavcan): publish ArmingStatus when ESC output is enabled (#28364)
* fix(uavcan): publish ArmingStatus when ESC output is enabled

DroneCAN ESCs such as ARK32 ignore RawCommand unless they receive
STATUS_FULLY_ARMED. Requiring UAVCAN_PUB_ARM made QGC actuator tests
fail out of the box.

Publish ArmingStatus automatically when UAVCAN_ENABLE is 3, and send
it at the arming-status rate so actuator tests are reported promptly.

Assisted-by: Grok:grok-4.6
Signed-off-by: alexklimaj <alex@arkelectron.com>

* Update docs/en/dronecan/escs.md

* Update src/drivers/uavcan/uavcan_main.cpp

* Update src/drivers/uavcan/uavcan_params.yaml

---------

Signed-off-by: alexklimaj <alex@arkelectron.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-08-24 12:45:05 -06:00
3a35c014be feat(control_allocator): reversible-motor failure recovery for hexarotors (#28078)
* feat(control_allocator): add reversible-motor failure recovery for hexarotors

On a single motor failure (CA_FAILURE_MODE), handle the failed motor's
geometric-opposite motor on a hexarotor to recover the lost control authority:
  1 = remove failed + shut off opposite (restores symmetry)
  2 = remove failed + make opposite reversible (assumes a reverse-capable ESC)
Non-hex frames have no opposite and keep the upstream remove-only behavior.

The opposite motor is found geometrically (opposite spin, closest antipode) and
only for hexarotors. Reverse thrust is modeled as CA_REV_THR_FRAC of forward
thrust and the reversible actuator range is rescaled to [-1, 0] on publish.
Consumes failure_detector_status.motor_failure_mask, independent of detection.

* feat(uavcan): render reversible motor outputs as signed RawCommand

Re-encode reversible channels from the mixer's [min,max] range to a signed
RawCommand (negative = reverse). A channel at its disarmed value is passed
through untouched, so a stopped motor is never inverted to reverse.

* fix(dshot): match per-channel minimums to the 3D encoding

calculate_output_value() applies the 3D split when DSHOT_3D_ENABLE is set or the
channel is reversible, but the per-channel minimum was derived from the
reversible bit alone. Two problems followed.

A reversible channel made reversible at runtime kept a stale minimum, so its
neutral no longer landed on the mid-throttle split. A non-reversible channel
with 3D enabled was worse: it mapped from DSHOT_MIN, which sits below the split,
so zero commanded thrust decoded as near-full reverse.

Select the minimum from the same two facts the encoder uses. A reversible
channel keeps the range bottom so neutral lands on the split, a forward-only
channel starts just above it, and without 3D the DSHOT_MIN idle floor applies as
before. For a split channel the idle floor is applied per direction inside
convert_output_to_3d_scaling(), so it must not be added to the minimum. The
deadband is now applied only to reversible channels, since a channel that cannot
be commanded negative has no neutral to guard.

Apply the minimums from a new OutputModuleInterface::reversibleMaskChanged(),
called once the new mask is known and before any output is computed with it.
Applying them from Run() left the range one cycle behind the mask it depends on,
which in 3D mode changed the sign of the output on the transition.

The reversible mask can now change while armed, since failure recovery reverses a
motor in flight, so the reversibleOutputs() contract is updated to say so.

Changes output values for every DSHOT_3D_ENABLE=1 setup that has any
non-reversible motor. Verified on fmu-v4 with 3D-mode ESCs: forward-only
channels floor at 1001 with no samples below the split across 85 s armed, and a
runtime-reversed recovery motor tracks yaw input through the split in both
directions.

* docs(control_allocator): document motor failure recovery

Add a Motor Failure Recovery page covering CA_FAILURE_MODE, the hexarotor
stop-or-reverse behaviour of the opposite motor, CA_REV_THR_FRAC, the
detection prerequisites and which output protocols can drive a motor in
reverse.

Document the signed DroneCAN RawCommand encoding for reversible motors,
and correct the failure detector section, which claimed motor failures
are non-latching while the current-based check holds a flagged motor
until the vehicle disarms.

Add the page to the navigation and to the v1.18 release notes.

* docs(docs): subedit

* docs(docs): subedit

* refactor(control_allocator): align CA_REV_THR_FRAC naming and description

Rename the parameter member to _param_ca_rev_thr_frac to match the
parameter name, and note in the description that the reverse thrust
fraction is mostly a property of the propeller.

* docs(motor_failure_recovery): move under Actuators and target v1.19

The page documents how control allocation is reconfigured, so list it
under Actuators next to Actuator Allocation instead of under Safety, and
link it from the Actuators and multicopter Features indexes. Safety
configuration still links to it from the motor failure trigger section.

The release branch for v1.18 is already cut, so move the release notes
to main.md and set the version badges to main (PX4 v1.19).

* docs(motor_failure_recovery): spell out the reversing requirements

Any of the six motors can fail, so every motor has to be reverse-capable,
not just one. List the settings that mode 2 needs, split the per-protocol
detail out (DroneCAN reverses from the signed RawCommand alone, DShot also
needs the ESCs in 3D mode and DSHOT_3D_ENABLE to match), and say what
happens when they are not set: a reverse command comes out as forward
thrust, and on PWM the recovery motor sits at around half throttle.

Also note that motors do not have to be marked bidirectional (CA_R_REV)
for this, since the recovery motor is made reversible at runtime.

* Apply suggestions from code review

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* fix(uavcan_main): log final value in actuator_outputs, always run through reversible logic

We want worst case execution time all the time and as little control paths as possible. Also actuator_outputs is used to debug ESC behavior and should contain the final value that is sent out over the wire.

* refactor(DShot): directly calculate minimum dshot value in apply_min_values()

* refactor(control_allocator): static_cast, correct CA_FAILURE_MODE description

* fix(control_allocator): treat undefined parameter values as default, use matrix function to zero a collumn

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-08-07 09:46:17 +00:00
Jacob Dahl e194513f2c feat(gps): frame UBX AssistNow MGA and harden the correction injection path (#27935)
* feat(gps): frame UBX AssistNow MGA in CorrectionFramer

PointPerfect -MGA mountpoints deliver a UBX-MGA burst before RTCM3/SPARTN.
The shared framer only recognized RTCM3/SPARTN preambles, so MGA bytes were
discarded before reaching the receiver. Add transport-layer UBX framing
(sync, length, Fletcher checksum) with no sticky protocol lock so MGA then
corrections frame in arrival order.

* fix(gps): stop injecting corrections into a receiver that is resetting

handleInjectDataTopic() gates on receiverReady(), which GPSDriverUBX backs with
_configured — and reset() left that true while the receiver rebooted onto its
saved configuration. Corrections kept being written into it until the receive
timeout re-ran configure(), and every byte in that window was discarded.

That matters most for AssistNow (MGA), which the framer now passes through: a
caster sends the assistance burst once per connection, so a burst delivered
during the reboot is lost until the client reconnects for another one.

Bumps GpsDrivers to dakejahl/PX4-GPSDrivers@4f9a086, which clears the flag.

* fix(gps): keep the driver mode across a reset we issued

Leaving the receive loop is normally how a wrong protocol guess shows up, so
auto-detect advances to the next driver. A commanded reset now leaves that loop
too — the receiver stops being configured the moment we send UBX-CFG-RST — and
advancing there walks a receiver we were already talking to through every other
protocol before coming back to the one that worked.

Remember that the reset was ours and hold the mode, so the driver waits for the
same receiver to come back on the same protocol.

* chore(gps): point GpsDrivers at the merged reset fix

f24a03c bumped the submodule to a fork branch to stop corrections being written
into a receiver that is resetting. That landed upstream as
PX4/PX4-GPSDrivers#220, so point at it instead — a fork pointer is not
mergeable here.

Moving off 1925b37 also brings #216 (NAV-DAHEADING for X20 dual antenna
heading), #218 (automatic_gain_control logging) and #219 (disable unused
NAV-TIMEGPS and RXM-RAWX/SFRBX msgout).

* fix(gps): keep draining corrections while the receiver is unconfigured

handleInjectDataTopic() returned early until receiverReady(), so nothing read
rtcm_corrections during configuration. The topic is queued 16 deep and the CAN
and MAVLink publishers keep filling it, so a burst arriving in that window
overflows, and the first read afterwards silently discards whatever fell off
the back.

Measured on an ARK X20 CAN node: the client forwarded 58 AssistNow messages and
the node injected 57, with the drain logging "rtcm_corrections lost, generation
0 -> 2". By the queue arithmetic that jump is only reachable at
generation = current - o_queue + 1, so 17 messages had been published against
16 slots. What falls off is the oldest, and for an AssistNow burst that is the
leading UBX-MGA-INI - the ephemeris behind it has no time base, so the receiver
cannot use any of the 57 that did arrive.

Drain regardless of readiness and drop what cannot be injected, so the
subscription stays current instead of accumulating a backlog that eats the head
of the next burst.

* fix(gps): stop discarding the message that trips the injection budget

Both correction drains read one message past their budget and threw it away.
The do/while injects what the previous iteration read, then reads again before
testing num_injections, so the read that finds the budget spent takes a message
off the queue and exits without injecting it. Exactly one message is lost per
capped pass, silently - the generation stays consistent, so nothing warns.

That is the missing frame: an ARK X20 node received 57 of the 58 AssistNow
messages the client forwarded, on two different firmwares, with the framer
buffer and UART TX counters both clean. A burst of 58 at 20-50ms outruns a
drain capped at 16 per pass, so it caps at least once and drops one. Assistance
is one-shot and the ephemeris is useless without the MGA-INI that leads it, so
a single dropped message costs the whole burst.

Check the budget before reading instead of after, in the GPS driver and in the
UAVCAN bridge that feeds CAN nodes.

Also name each injected UBX frame on the console. Assistance is rare enough to
afford it, and inferring which frame went missing from perf counts is what made
this take three rounds. Drop that log once the path is trusted.

* chore(gps): point GpsDrivers at the stale-UTC-time fix

* feat(gps): raise the ark x20-gps receiver link to 921600 via GPS_UBX_BAUD1

New param plumbs the ubx driver's uart1_baudrate target: the link is
still auto-detected, only the rate both ends move to afterwards
changes, so a receiver at its power-on default always connects. The
x20-gps node defaults to 921600 (USART1 runs RX DMA with 2KB buffers)
to give the injection path and nav output headroom.

* style(gps): trim comments

* chore(gps): point GpsDrivers at the merged stale-time fix

* chore(gps): demote the per-frame UBX injection log to debug

The naming was added at INFO to make a missing assistance message
findable, with a note to drop it once the path was trusted. It is: a
full burst now injects cleanly, and 58 lines in two seconds is console
spam. Keep the naming for debug builds.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(gps): print correction framer stats in gps status

The per-frame injection log is debug-only, so a release build had no way
to show whether a one-shot assistance burst fully reached the receiver.
Print the per-protocol frame counts, CRC errors and discarded bytes from
each framer; moving baseline only when it has seen traffic.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(uavcan): count failed RTCM stream broadcasts

PublishRTCMStream ignores the broadcast result, so a TX-queue or pool
allocation failure drops the rest of the message silently - the
receiver-side framer sees a partial frame and fails its CRC. RTCM also
publishes at NumericallyMax, the lowest arbitration priority, making its
frames the first casualties under TX pressure. Count the failures so
perf / uavcan status shows them.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(gps): point GpsDrivers at UART1 baud source-of-truth fix

PX4/PX4-GPSDrivers#224 removes the heading-mode 921600 hardcode so
GPS_UBX_BAUD1 is the only UART1 target in all modes.

* docs(gps): trim GPS_UBX_BAUD1/BAUD2 and drop mode 3/4 921600 labels

GPS_UBX_BAUD1 is the UART1 target in all modes; mode labels no longer
imply a hard-coded baud. Align BAUD2 description with the trimmed style.

* feat(gps): default ark can-rtk-gps UART1 to 921600 via GPS_UBX_BAUD1

On-module F9P link is short and uses RX DMA; keep the prior heading-mode
rate via the board default now that modes no longer hard-code it.

* chore(gps): point GpsDrivers at the merged UART1 baud fix

PX4/PX4-GPSDrivers#224 landed on main; replace the fork-branch pointer
with the merge commit.

* docs(gps): document GPS_UBX_BAUD1 and GPS_UBX_BAUD2

Cover UART1/UART2 baud targets in the dual F9P heading guide and on
the ARK RTK / X20 node parameter tables so users know defaults, when
to raise the rate, and when to keep it low on long cables.

* docs(gps): tighten GPS_UBX_BAUD docs to match surrounding style

Drop the hard-code and MCU-link notes; keep baud coverage as short setup
bullets and param-table rows like the rest of the pages.

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-06 17:40:16 -06:00
maksimdrachovandHamish Willee da47a168a5 docs(gripper): add DroneCAN EPM setup guide (#28049)
* docs(gripper): add DroneCAN EPM setup guide

Signed-off-by: Maksim Drachov <maksim.drachov@outlook.com>

* docs(docs): subedit

* docs(dronecan): clarify gripper publications

* payload_deliverer: clarify gripper command type

* docs: convert FluxGrip image to PNG

* docs: fix FluxGrip image path

* Update src/modules/payload_deliverer/module.yaml

---------

Signed-off-by: Maksim Drachov <maksim.drachov@outlook.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-08-03 16:08:46 -07:00
Jacob Dahl 0524a374d9 fix(drivers/uavcannode): make CANNODE_NODE_ID the sole node ID policy (#27644)
* fix(drivers/uavcannode): make CANNODE_NODE_ID the sole node ID policy

The startup bootloader_app_shared_write() never reached the bootloader:
it only accepts App-signed data and invalidates the shared region on
every boot. The only consumer was uavcannode itself on a restart
without a reset (nsh stop/start), where the persisted bus_speed=0 made
the CAN driver init fail and left the node off the bus. The bootloader
learns our node ID exclusively through the firmware update handoff in
cb_beginfirmware_update, which already carries the static ID.

CANNODE_NODE_ID now overrides the bootloader handoff only when nonzero,
so the default (0) reuses the ID the bootloader already allocated
instead of running allocation a second time. The handoff is ignored
unless it carries a valid bitrate, healing regions poisoned by firmware
that wrote bus_speed=0. Max is 125 because 126/127 are reserved for
debug tools by DroneCAN convention, matching UAVCAN_NODE_ID.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(drivers/uavcannode): harden bootloader handoff validation

Invalidate the shared region whenever it was read valid, not only when
the handoff is accepted, so stale data cannot linger on boards whose
bootloader never invalidates it. Require a plausible bitrate (the
CANNODE_BITRATE minimum) rather than nonzero: the canbootloader alt-app
update path can hand off bus_speed = CAN_UNDEFINED (999). Reword the
invalid-param error, which claimed dynamic allocation while keeping the
bootloader handoff.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-07-16 20:43:22 -06:00
Alexander Lerach da60889b3c chore(uavcan): remove FW flashing database (#27930)
* feat(uavcan): remove FW.db generation

* docs(dronecan): remove FW.db section, update remote update workflow
2026-07-16 17:21:43 +02:00
Hamish Willee 96e760a782 docs(docs): Fix almost all broken external links (#27790)
* docs(docs): Add missing uorb topics sidebar
* docs(docs): discontinue cuav v5 plus/nano
* docs(docs): Fix 404 and 303 status HTTP links
* docs(docs): more link fixes
* update(drivers): Docs fix to fix up link
* docs(docs): Fix up all remaining  broken links and add exclusions
2026-07-02 16:58:40 +10:00
Phil-Engljaehringer fe35de7195 feat(docs): ufw-firmware flashing (#27373) 2026-06-10 08:26:29 +10:00
Hamish Willee 4cbdc3dec6 docs(updates): Link fixes and orphan image removals (#26925)
* docs(updates): Link fixes and orphan image removals
* docs(delete): Remove orphaned translations
2026-04-01 13:51:06 +11:00
Jacob Dahl 89855926ef feat(sensors/gps): move GPS antenna offsets to per-receiver parameters (#26634)
* sensors: move GPS antenna offsets to per-receiver parameters

Move antenna position configuration from the single EKF2_GPS_POS_X/Y/Z
parameter set into per-receiver SENS_GPS{0,1}_OFF{X,Y,Z} parameters in
the sensors module. Each offset slot is matched to a physical receiver
by device ID (SENS_GPS{0,1}_ID), falling back to uORB instance index
when no IDs are configured.

The antenna offset is now carried through the SensorGps uORB message
and blended alongside other GPS states when multi-receiver blending is
active, so EKF2 receives the correct lever arm for whichever receiver
(or weighted combination) is selected.

- Add antenna_offset_{x,y,z} fields to SensorGps.msg
- Remove EKF2_GPS_POS_X/Y/Z params; EKF2 reads offset from gnssSample
- Add SENS_GPS{0,1}_ID and SENS_GPS{0,1}_OFF{X,Y,Z} params (module.yaml)
- Blend antenna offsets in GpsBlending (weighted average)
- Add unit tests for single, blended, and failover antenna offset cases
- Migrate params.c to module.yaml for the vehicle_gps_position module

* sensors: gps_blending: add asymmetric weight and fallthrough offset tests

Add two additional antenna offset test cases:

- dualReceiverAsymmetricWeightAntennaOffset: verify that unequal eph
  values produce correctly skewed blend weights (0.8/0.2) and that the
  output antenna offset reflects the weighted average
- blendingFallthroughAntennaOffset: verify that when blending is enabled
  but can_do_blending evaluates false (eph=0), the non-blending path
  correctly assigns the selected receiver's antenna offset

* feat(param_translation): translate EKF2_GPS_POS_ to SENS_GPS0_OFF_

* fix(msgs): proper formatting

* chore(msg): 0 if invalid/unknown

* fix(ROMFS): migrate EKF2_GPS_POS_ params

* fix(docs): migrate EKF2_GPS_POS_ params

* fix(blending): unsigned param

* Update msg/SensorGps.msg

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(sensors/gps): remove 'values:' tag in  module.yaml

* fix(sensors/gps): unsigned instance index

* fix(blending): restore const on gps_blend_states()

Move antenna offset blending into blend_gps_data() where the
weights are computed, keeping gps_blend_states() const.

* fix(sensors/gps): fix msg annotation and restore SENS_GPS_PRIME values

Remove incorrect @invalid NaN annotation from antenna offset fields
(0.0 default is correct, not a sentinel). Restore values tag for
SENS_GPS_PRIME so QGC shows a dropdown.

* fix(gps_blending): fix pre-existing bug to clear _gps_updated flags

The loop iterates over i but always clears gps_select_index. The intent is to clear
all updated flags, but only the selected one gets cleared (N times)

* test(gps_blending): add stale update flag regression test
2026-03-17 17:33:41 -08:00
Jacob Dahl 1e5a485424 docs(dronecan): add SENS_GPS_PRIME guidance for moving baseline GPS heading (#26769)
Recommend setting SENS_GPS_PRIME to the moving base CAN node ID
when using dual antenna GPS heading. The rover receiver in a
moving baseline configuration can experience degraded navigation
rate and increased data latency when corrections are intermittent,
making the moving base the better primary position source.
2026-03-16 15:06:41 -08:00
Hamish Willee b37733459d docs: Codespell check on English sources + swd fixes (#26657) 2026-03-05 12:50:59 +11:00
Hamish Willee 040b885dbd docs: DroneCAN Lights (#26641) 2026-03-05 10:43:41 +11:00
Matthias Grob 51be1e3fb9 uavcan rgbled: overhaul color functions 2026-02-23 22:11:35 +01:00
Claudio Chies 637cece115 Added support for colored navigation lights and hybrid light functions.
add functionality for Status or Off
2026-02-23 22:11:35 +01:00
Claudio ChiesandMatthias Grob e52ce5c43b UAVCAN: Configurable LED Light Control with Flexible Addressing (#26253)
* feat: implement UAVCAN LED control for individual light control and assignment

* uavcan led: nit-picks from review

* uavcan led: reduce maximum number of lights

to avoid unused parameters

* uavcan led: simplify anticolision on check

* uavcan led: correctly map 8-bit RGB to rgb565

* Trim param name character arrays to 17

16 characters + \0 termination

* uavcan led: final nit-picks

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-16 18:39:48 +01:00
PX4BuildBot 36b5e1e1bb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-11 22:43:01 +00:00
Patrik Dominik Pordi 210239324d Added ARK G5 and G5 Heading RTK GPSs (#26154) 2026-01-09 05:59:09 +11:00
Claudio Chies 1ff36422c9 docs: UAVCAN asset tracking (#26152) 2026-01-07 14:46:15 +11:00
Hamish Willee 96f428b683 docs: Update metadata (#26167) 2025-12-24 14:57:46 +11:00
Jacob Dahl b26db22c1a docs: ark_flow: add EKF2_RNG_CTRL (#26130) 2025-12-18 14:21:24 +11:00
Hamish Willee a2b1795236 ark_rtk_gps_l1_l2 - numbering hints 2025-12-01 09:20:17 -09:00
Hamish Willee e7be62a342 Prettier and minor fixes 2025-12-01 09:20:17 -09:00
patrikpordi 204d82a5c1 Add ARK documentation for GPS modules, distance sensors, and power modules
- Added DAN, SAM, SAM Mini, X20, RTK L1 L5 GPS modules
- Added ARK distance sensors documentation
- Added ARK power modules documentation
2025-12-01 09:20:17 -09:00
Jacob Dahl 8ca8f12a24 docs: uavcannode: document CANNODE_NODE_ID for static node ID 2025-10-17 18:35:20 -08:00
Hamish Willee dd65380bf3 Ark GNSS CAN - link to the DroneCAN docs for fixed base (#25382)
* Ark GNSS CAN - link to the DroneCAN docs for fixed base

* Update docs/en/dronecan/ark_rtk_gps.md
2025-09-17 22:58:56 -08:00
Jacob DahlandHamish Willee 2cc64c438f docs: UAVCAN_ESC_IFACE (#25560)
* dronecan: esc: change UAVCAN_ESC_IFACE to 2 to default to only outputting on CAN2

* revert param default and update docs

* Subedit

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-09-16 15:53:00 -08:00
Jacob Dahl 4cf7bb2429 correct ARK Flow 2025-08-06 12:45:36 -06:00
Jacob Dahl c2db8ab313 docs: ARK CAN node LED meaning 2025-08-06 12:45:36 -06:00
Hamish Willee 8e0f223b3a Link fixes and removal of dead docs (#25239)
* Remove Zubax Orel - not available and no other presence

* Fix up zubax product links

* Snapdragon flight - delete as no longer relevant hardware

* Delete intel aero docs

* Brushless whoop - remove docs except for link to old version

* Many link fixes
2025-07-17 15:30:56 +10:00
Hamish Willee dd0dcbb82c Link fixes - mostly redirects (#25186) 2025-07-10 17:35:07 +10:00
Hamish Willee 2c31e2bad5 Fix all possible HTTP to HTTPS docs links (#25153) 2025-07-03 18:09:58 +10:00
Hamish Willee 375f421c61 Link fixes galore (#25151) 2025-07-03 14:53:12 +10:00
Hamish WilleeandRamon Roche 88d623bedb Move PX4 Guide source into /docs (#24490)
* Add vitepress tree

* Update existing workflows so they dont trigger on changes in the docs path

* Add nojekyll, package.json, LICENCE etc

* Add crowdin docs upload/download scripts

* Add docs flaw checker workflows

* Used docs prefix for docs workflows

* Crowdin obvious fixes

* ci: docs move to self hosted runner

runs on a beefy server for faster builds

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci: don't run build action for docs or ci changes

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci: update runners

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* Add docs/en

* Add docs assets and scripts

* Fix up editlinks to point to PX4 sources

* Download just the translations that are supported

* Add translation sources for zh, uk, ko

* Update latest tranlsation and uorb graphs

* update vitepress to latest

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2025-03-13 16:08:27 +11:00