30 Commits

Author SHA1 Message Date
Balduin
fa2d1c3662
SIH Simulator: Add wind (#26467)
* SIH: explicitly use local velocity for all aerodynamic calculations

no functional change

* SIH: add param & vars for wind and apparent vel

no functional change

* SIH: replace all relevant vels with apparent vel

Only places where _v_E is remaining:
 - ecefToNed to calculate _v_N
 - generate_rover_ackermann_dynamics
 - equations_of_motion
 - parameters_updated, init_variables
and _v_N:
 - ecefToNed
 - print_status
 - publish_ground_truth
 - generate_rover_ackermann_dynamics
 - equations_of_motion
 - parameters_updated, init_variables

which are all not relevant for aerodynamics.

* sih: wind review suggestions

* sih wind: switch direction to global wind source direction convention

* SIH: clean up variable declarations

* SIH: rename variables for consistency

* docs: SIH: document new wind parameters

* Release notes: note for SIH wind settings

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-05 08:53:39 +01:00
Matthias Grob
9cb3ea44fb
sih: cleanup initializing variables in constructor (#26578) 2026-03-02 13:22:35 -09:00
Jacob Dahl
ce3e62841f
module_base: remove CRTP template pattern to reduce flash bloat (#26476)
* module_base: claude rewrite to remove CRTP bloat

* module_base: apply to all drivers/modules

* format

* fix build errors

* fix missing syntax

* remove reference to module.h in files that need module_base.h

* remove old ModuleBase<T>

* add module_base.cpp to px4_protected_layers.cmake

* fix IridiumSBD can_stop()

* fix IridiumSBD.cpp

* clang-tidy: downcast static cast

* get_instance() template accessor, revert clang-tidy global

* rename module_base.h to module.h

* revert changes in zenoh/Kconfig.topics
2026-02-19 15:17:17 +13:00
Yannick Poffet
3e1b7d4d0a clean-up(SIH): remove confusing runtime uorb sub change 2026-02-11 12:14:54 +01:00
chfriedrich98
b4bfbbb5e0
ackermann: add SIH (#25194) 2025-07-15 09:58:41 +02:00
Matthias Grob
0b3fc0a62d SIH: add Hexacopter X
to enable easy simulation of a motor failure.
2025-05-20 13:23:08 +02:00
Matthias Grob
fa3f255301
SIH: write out vehicle types for clarity (#24731) 2025-04-16 14:03:34 +02:00
Marco Hauswirth
d2cbe10243
Clean up temperature msg fields (#24272)
* remove temp field from airspeed.msg, adjust temp selection

* temp-sensor hirarchy: airspeed, ext. baro, default value

* directly use diff-press or baro temp in true-airspeed  calc

* improve clarity

* add enum for temperature source in VehicleAirData.msg
2025-02-18 13:23:10 +01:00
Balduin
5bca71791a
SIH: clean up control surface configuration (#24205)
* fix sign error in appropriate place

In PR https://github.com/PX4/PX4-Autopilot/pull/24175 I changed the
control surface deflection signs in generate_fw_aerodynamics to make the
1103 airframe work correctly. However, this breaks the 1101 airframe,
introducing sing errors there.

So, here the change in generate_fw_aerodynamics is reverted to the state
before PR #24175. Instead, the signs are set correctly by using
the HIL_ACT_REV bitfield in the respective airframe config files.

* match control surface parameters to SIH model
2025-01-27 16:52:29 +01:00
Balduin
a231fafafa
SIH: Add Standard VTOL Airframe (#24175)
* add standard vtol airframe to SIH.

mostly took changes from 4d930bde and applied to main.

generate_fw_aerodynamics now takes four arguments rather than using the
_u class member, because depending on vehicle type _u is used
differently.
2025-01-09 15:40:06 +01:00
bresch
8b1975cb98 SIH: lower IMU noise before takeoff
This speeds-up the EKF alignment
2024-11-29 14:21:29 +01:00
bresch
cd18138b1c SIH: add transport rate acceleration to local acceleration 2024-11-29 14:21:29 +01:00
bresch
674aa474e7 SIH: use LatLonAlt class 2024-11-29 14:21:29 +01:00
bresch
7ee69d616d SIH: rework FW ground contact 2024-11-29 14:21:29 +01:00
bresch
5d33971712 SIH: refactor MC ground contact 2024-11-29 14:21:29 +01:00
Marco Hauswirth
5d7b734bc9 SIH: ellipsoidal earth model
SIH: use projection functions and constants from geo lib

SIH: remove unnecessary member variable

SIH: clarify names of rotation matrices and frames

SIH: do not store DCM corresponding to quaternion attitude

Using DCM is more efficient when more than 1 rotation needs to be done,
which is not the case here.

SIH: don't store local variable as member

SIH: use Wgs84 constants everywhere

SIH: do not store delta_quaternion

Converting an AxisAngle to a Quaternion uses the exponenial

SIH: organise ECEF member variables

SIH: add earth spin rate to gyro data

Co-authored-by: bresch <brescianimathieu@gmail.com>
2024-11-29 14:21:29 +01:00
bresch
8a9bac29a2 SIH-FW: allow pitching up during takeoff
Otherwise difficult to get lift
2024-11-27 11:14:56 -05:00
bresch
7236ef2d17 SIH-FW: fix aileron and elevator signs
This broken when changing from mixer files to the control allocation module.
2024-11-27 11:14:56 -05:00
bresch
1dad25b763 SIH: do not assume being a tailsitter when creating airspeed measurement 2024-11-27 11:14:56 -05:00
RomanBapst
878c8bfcce SIH: fix airspeed for tailsitter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-13 15:53:52 +03: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
bresch
23b31cc5fd manual_yaw: compensate for yaw estimate convergence
When the yaw estimate is converging, the controller makes the drone yaw
in order to follow the current setpoint. This is unintuitive for the
pilot and it is preferable if the drone continues to fly towards the
same physical direction.
2023-08-30 09:56:19 +02:00
Igor Mišić
05f5ab7988 simulator_sih: increase stack size by 310 bytes 2023-07-24 13:10:31 +02:00
Hamish Willee
96a305322a
params/uorb docs: rename mixer to control allocation (#20447) 2022-10-24 13:22:26 +02:00
Daniel Agar
8f25acd428 sih remove gps and use standalone sensor_gps_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
bfe0d71a21 sih remove baro and use standalone sensor_baro_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
c5336abba2 sih remove mag and use standalone sensor_mag_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
99a20646e2 simulator sih add local position ground truth and cleanup 2022-09-09 18:00:50 -04:00
Daniel Agar
15fece7e14 delete SYS_CTRL_ALLOC 2022-09-09 09:14:09 -04:00
Daniel Agar
4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00