44066 Commits

Author SHA1 Message Date
Matthias Grob
e2b31454a3 SubscriptionInterval: move updated, update, copy function to a cpp file
Saves 17.3 kilobytes of flash 😮
2024-07-12 23:26:24 +02:00
Claudio Chies
33be5d8356
Survey - fix of survey tracking problem on steep slopes (#23371)
* initial working

* incoperated review
2024-07-11 14:54:22 +02:00
Daniel Agar
9124a7b471 ekf2: add IMU delta_ang_dt/delta_vel_dt safety constrain before pushing into buffer 2024-07-10 21:20:47 -04:00
Daniel Agar
ac77049c47 ekf2: directly use IMU sample to find corresponding aid source sample
- I think this helps make it clear we're using a sensor sample
   corresponding with a particular IMU sample
2024-07-10 21:20:47 -04:00
Daniel Agar
f93dc61770 ekf2: use bias corrected angular velocity
- avoid unnecessarily storing _ang_rate_delayed_raw
2024-07-10 21:20:47 -04:00
Julian Oes
20137bea40 boards: add console build for Cube Orange(+)
This adds a build variant which enables the serial console, and
therefore disables the ADSB receiver.
2024-07-10 21:14:08 -04:00
Claudio Chies
57e303b11b bugfix for failing actions 2024-07-10 21:12:55 -04:00
PX4 BuildBot
e0ea91fc27 Update submodule gz to latest Thu Jul 11 00:39:09 UTC 2024
- gz in PX4/Firmware (2c3401dc8367a860cbbabc5e77898ff206f554aa): 881558c8c2
    - gz current upstream: 312cd002ff
    - Changes: 881558c8c2...312cd002ff

    312cd00 2024-07-08 chfriedrich98 - Add rover ackermann model (#46)
2024-07-10 21:05:57 -04:00
chfriedrich98
c391509c23 ackermann: add SITL airframe 2024-07-10 21:04:59 -04:00
Matthias Grob
2c3401dc83
uORB: SubscriptionInterval fix timestamp wrapping when initializing less than the interval time after boot (#23384)
* SubscriptionInterval: ensure _last_update is never before timer start
2024-07-10 12:43:31 -04:00
Daniel Agar
75bb339d94 ekf2: remove warning events logging
- some of these warning flags aren't even being used, and most of the rest we can figure out from other sources
2024-07-10 10:43:55 -04:00
Daniel Agar
c29b4ff87e ekf2: apply astyle formatting and enforce 2024-07-10 10:43:55 -04:00
chfriedrich98
3fe609f769 exclude 4017 from v5x to save flash 2024-07-10 12:06:48 +02:00
chfriedrich98
03ff837c50 ackermann: new features and improvements
added return mode support, slew rates for actuators, new ackermann specific message, improved cornering slow down effect and fixed logging issue.
2024-07-10 12:06:48 +02:00
Daniel Agar
223397c20e ekf2: always add accel/gyro bias process noise
- continue adding accel/gyro bias process noise even if inhibited
2024-07-10 11:49:01 +02:00
Marco Hauswirth
419652b9fe
EKF2: Spoofing GPS check (#23366)
* estimator gps check fail flag for spoofing

* warn whenever spoofing state changes to true, use default hysteresis to completely stop fusion

* dont introduce more GPS namings, GNSS instead

* flash: exclude mantis for cuav_x7pro
2024-07-09 16:31:11 +02:00
Daniel Agar
62ff39a669
ekf2: EV vel (body) update last fuse timestamps
- these are set by the NED fuseVelocity() helper so also need to be set in the body frame velocity case
2024-07-09 10:16:12 -04:00
Daniel Agar
5d08b97fd7 ekf2: add vehicle_local_position dist_bottom_var 2024-07-09 10:10:01 -04:00
Daniel Agar
3e3b886b5d ekf2: add terrain estimator_status_flags 2024-07-09 10:10:01 -04:00
Daniel Agar
64a6971bdb ekf2: only limit opt flow HAGL if range only terrain
- increase HALG limit from 75%->90% of sensor max
2024-07-09 10:10:01 -04:00
Daniel Agar
c56f84fe8a ekf2: range, check if terrain valid for reset on fusion timeout 2024-07-09 10:10:01 -04:00
Daniel Agar
e52025cc20 ekf2: optical flow fusion timeout only reset if quality is good 2024-07-09 10:10:01 -04:00
Daniel Agar
6be06ecbb3 ekf2: optical flow failing also reset terrain if needed 2024-07-09 10:10:01 -04:00
Daniel Agar
ea8f14b883 ekf2: optical flow logic, timeout if bad_tilt, etc
- previously we could get stuck with optical flow still technically
   active (_control_status.flags.opt_flow=true), but nothing being
updated due to excessive tilt, etc
2024-07-09 10:10:01 -04:00
Daniel Agar
8bf15b01c4 ekf2: optical flow don't compute innovation variance twice
- collapse updateOptFlow() and startFlowFusion() to avoid recomputing H
 - this is a relatively expensive call we can easily avoid with the
   right structure
2024-07-09 10:10:01 -04:00
Daniel Agar
f709ed409d ekf2: optical flow stop reset all flags 2024-07-09 10:10:01 -04:00
Daniel Agar
9dfd82ab06 ekf2: optical flow remove _flow_data_ready flag 2024-07-09 10:10:01 -04:00
Daniel Agar
7047f9441c ekf2: fix calcOptFlowBodyRateComp() gyro bias
- adjust flow sample gyro_rate immediately after popping from ring
   buffer
 - always update flow gyro bias (calcOptFlowBodyRateComp()) regardless
   of flow quality or magnitude
2024-07-09 10:10:01 -04:00
Daniel Agar
4d324da9f8 ekf2: update flow aid src status every sample 2024-07-09 10:10:01 -04:00
Daniel Agar
bcd666b3f8 ekf2: fix optical flow start logic
- remove fallthrough that enables flow regardless of success
 - add appropriate start messages for each case
2024-07-09 10:10:01 -04:00
Daniel Agar
bf4e564b23 ekf2: resetTerrainToFlow() reset aid src status appropriately 2024-07-09 10:10:01 -04:00
Daniel Agar
ced609daa8 ekf2: flow fusion start require valid fusion 2024-07-09 10:10:01 -04:00
Daniel Agar
1df8f3f9d2 ekf2: resetFlowFusion() reset aid src status appropriately 2024-07-09 10:10:01 -04:00
Roman Bapst
8221940b60
Added pitot tube icing detection (#23206)
* lib: add FilteredDerivative class

* AirspeedValidator: add first principle check

- filters throttle, pitch and airspeed rate, and triggers
if the airspeed rate is negative even though the vehicle
is pitching down and giving high throttle.
Check has to fail for duration defined by ASPD_FP_T_WINDOW
to trigger an airspeed failure.

* AirspeedValidator: define constants for first principle check

* FilteredDerivative: set initialised to false if sample interval is invalid

* airspeed_selector: improved comment

* increase IAS derivative filter time constant from 4 to 5

* use legacy parameter handling for FW_PSP_OFF

* handle FW_THR_MAX as well

* ROMFS/airframes: exclude some airframes for v6x and v4pro to save flash on them

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-09 11:16:40 +02:00
Julian Oes
a35cecece4 gnss: add missing include
Breaks CLion otherwise.
2024-07-08 20:38:40 -04:00
Peter van der Perk
6bd81f38a6
imxrt dshot timing fix (#23365)
* imxrt: Change PLL settings for more accurate dshot timing
* Update NuttX submodule
2024-07-08 12:57:15 -04:00
Silvan Fuhrer
77709c2948 FW Position control: clean up param descriptions
Mostly to save flash, but also to improve generally.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-08 16:44:09 +02:00
Claudio Chies
aed0fd41cf
SIH - change how LAT and LON is used for Takeoff location (#23363)
change how lat long is used for SIH
2024-07-08 14:51:08 +02:00
Marco Hauswirth
4bc0286eb8
fix error from refactring commit, fix reset on ground (#23370) 2024-07-08 13:55:05 +02:00
Marco Hauswirth
e04c53241a
EKF2: reset position by fusion (#23279)
* reset position by fusion

* handle local_pos_valid for fixed wing in gnss denied

* [WIP] ekf2: setEkfGlobalOrigin respect current height reference and vertical position aiding

* global origin, also reset vertical pos without gps as ref

* fix wo gnss, that bitcraze ci passes

* revert some changes as requested

* remove duplicate reset messages

* undo unrelated whitespace changes, I'll fix it everywhere in a followup

* [SQUASH] ekf2: add vehicle_command_ack

* resetGlobalPosToExternalObservation consolidate logic

* remove gnss check from local_pos validation check

* reset when  0<accuracy<1, otherwise fuse

* replace gps param with flag

* ekf2: dead reckon time exceeded, respect ZUPT preflight if air data or optical flow expected

* subtract timeout from last inertial dead-reck, change fake pos conditions, save flash

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
2024-07-07 22:43:55 +02:00
Peter van der Perk
ac1effa32a fmu-v6xrt: MTD use full FRAM (32KB) 2024-07-05 10:25:08 -04:00
Ryan Johnston
fd8df2e84d
Update int_res_est_replay.py (#23351)
Pulls cell count, min voltage and max voltage from log file but still allows for over-rides. Also added debug info to tell user what what it found in the log and what it is using

Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-07-05 11:04:45 +02:00
Marco Hauswirth
a1f43636f3
ekf2: EV fusion in body frame (#23191) 2024-07-04 21:17:19 -04:00
Silvan Fuhrer
1f33abb4e9
battery_status.msg: remove unused fields (#22938)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-04 11:57:26 +02:00
PonomarevDA
4c5ce7af6b Cyphal: add feedback for 8 ESC 2024-07-03 13:02:18 -04:00
PonomarevDA
8569eeb90c Cyphal: add *type registers for ESC 2024-07-03 13:02:18 -04:00
PonomarevDA
f81e36a3a0 Cyphal: optimize ESC setpoint 2024-07-03 13:02:18 -04:00
PonomarevDA
41bd6c92e2 Cyphal: add zubax.telega.CompactFeedback 2024-07-03 13:02:18 -04:00
PonomarevDA
515543b1c5 Cyphal: divide EscClient into 2 publishers, so setpoint and readiness are 2 different ports now 2024-07-03 13:02:18 -04:00
Dmitry Ponomarev
52476633a8 Cyphal: use actual time instead of transfer id in uptime field of heartbeat 2024-07-03 13:02:18 -04:00