38 Commits

Author SHA1 Message Date
David Sidrane
a7123f115c sih:Fix type mismatch 2021-08-13 14:22:00 -04:00
romain-chiap
c8346534f1
sih: using Quatf::expq(), fuselage added 2021-08-12 10:10:03 -04:00
romain-chiap
718e5b5b5d
sih: add fixed-wing support 2021-08-05 09:16:14 +02:00
Daniel Agar
39c96a8884 gps add device_id 2021-04-08 08:27:07 +02:00
romain-chiap
f150e1e7aa
sih: time constant added on thrusters, and minor cleanup 2021-03-12 12:04:14 -05:00
Nicolas MARTIN
d65d06f82d SIH/gps: express gps position noise in meters and reduce noise value
Previous horizontal position noise was a white Gaussian noise with std=0.8m
It results in a noise with high frequencies too high making some ekf
position tests fail (test ratio to allow arming).

The new noise values are below real GPS errors but as theses errors are
generally low frequency, so they cannot be modeled with a white noise.
2021-02-23 13:27:28 -05:00
Nicolas MARTIN
80a73ab5b5 SIH: add distance sensor fault simulation 2021-02-23 12:57:40 -05:00
Nicolas MARTIN
ab41319009 SIH: add distance sensor 2021-02-23 12:57:40 -05:00
Nicolas MARTIN
50ec809fdf SIH: add mag offset from parameters
An absolute value superior to 10000 block mag publication
2021-02-22 11:56:16 -05:00
Nicolas MARTIN
8f54dc402d SIH: add baro offset (or pressure change) from parameters
An absolute value superior to 10000 block barometer publication
2021-02-22 11:56:16 -05:00
Nicolas MARTIN
1df63cb6b1 SIH: add gps fix loss simulation from parameters
A new parameter allows to change the SIH number of gps satellites used
If it is below 4, fix is lost
2021-02-22 11:56:16 -05:00
Daniel Agar
bb7dd0cf00 modules/sih: move to px4 work queue (wq:rate_ctrl)
- respect IMU_GYRO_RATEMAX for configured interval
 - optionally compile at higher optimization level per board (${MAX_CUSTOM_OPT_LEVEL})
2021-01-31 12:56:45 +01:00
Jacob Dahl
a24488328f
Move GPS blending from ekf2 to sensors module
- new sensors work item that subscribes to N x sensor_gps and publishes vehicle_gps_position
 - blending is now configurable with SENS_GPS_MASK and SENS_GPS_TAU

Co-authored-by: Jacob Crabill <jacob@volans-i.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2020-09-25 23:28:31 -04:00
kritz
9d962cdfbc
Pr update matrix (#15520)
* Update submodule Matrix

* replace deprecated matrix functions

* update submodule ECL

* Update Matrix submodule

* Use absolute value of loiter radius

* Update ECL submodule
2020-08-11 10:08:41 +02:00
Daniel Agar
e34bdb4be9
move IMU integration out of drivers to sensors hub to handle accel/gyro sync
- IMU integration move from drivers (PX4Accelerometer/PX4Gyroscope) to sensors/vehicle_imu 
 - sensors: voted_sensors_update now consumes vehicle_imu
 - delete sensor_accel_integrated, sensor_gyro_integrated
 - merge sensor_accel_status/sensor_gyro_status into vehicle_imu_status
 - sensors status output minor improvements (ordering, whitespace, show selected sensor device id and instance)
2020-05-30 11:07:54 -04:00
Daniel Agar
ca998c1822
IMU: parameterize IMU integration time (IMU_INTEG_RATE)
- default integration rate now 200 Hz (5000 us interval)
 - set update rate for all drivers and simulators using PX4Accelerometer/PX4Gyroscope
2020-05-05 20:34:09 -04:00
rfu
8787780de4 some printf format and conversion fixes 2020-05-04 09:49:23 +02:00
Daniel Agar
a89b69b0ea
vehicle_global_position: remove velocity fields (duplicates of local vx, vy, vz)
* attitude_estimator_q: get velocity from local position (if available)
2020-03-11 23:57:43 -04:00
Daniel Agar
4fef3dd7d5 simulated sensors minor cleanup
- mavlink receiver use PX4Accelerometer/PX4Gyroscope for hil_sensor and hil_state_quaternion
 - simulator module remove unnecessary fake scaling
 - sih module remove unnecessary fake scaling
2020-01-24 12:50:22 -05:00
Daniel Agar
22a005c9f4
delete module's redundant print_status()
- we can already get the running status from ModuleBase and the other misc information is already available through perf or uORB
2019-11-30 18:22:19 -05:00
Daniel Agar
b418f937a3 sih update orb usage 2019-11-30 15:52:53 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
c8e59c4e39 parameter_update use uORB::Subscription consistently 2019-09-29 10:49:03 -04:00
Daniel Agar
2ad12d7977
sensors: create vehicle_angular_velocity module (#12596)
* split out filtered sensor_gyro aggregation from mc_att_control and move to wq:rate_ctrl
2019-08-06 12:55:25 -04:00
Daniel Agar
be99d2f111 sih: fix code style 2019-07-28 11:18:02 -04:00
Daniel Agar
09eaef82f6 sih: move to PX4Accelerometer/PX4Gyroscope/PX4Magnetometer/PX4Barometer helpers 2019-07-28 11:18:02 -04:00
Beat Küng
3135f9f0d2 sih: avoid static variable + style fixes 2019-04-12 09:25:07 +02:00
romain
65f623bd73 acceleration added when hitting the ground 2019-04-12 09:25:07 +02:00
romain
7be1cc389e removed arguments from constructor 2019-04-12 09:25:07 +02:00
Beat Küng
744b50b478 send MAVLink GROUND_TRUTH at 25 Hz, only in SIH mode. And minor cleanup 2019-04-12 09:25:07 +02:00
romain
9adb4410bd newline added at the end of files 2019-04-12 09:25:07 +02:00
romain
8b6480c1cf sih.msg removed, serial port communication removed 2019-04-12 09:25:07 +02:00
romain
e1d9438f79 sih: remove SYS_SIH parameter and extend SYS_HITL 2019-04-12 09:25:07 +02:00
romain
a9660d9da0 white noise generator updated 2019-04-12 09:25:07 +02:00
romain
cdd7e95a92 added a call to px4_sem_destroy() 2019-04-12 09:25:07 +02:00
romain
6ff228c2ff sih module implemented with hrt_call_every and semaphore_wait 2019-04-12 09:25:07 +02:00
Beat Küng
914a9b78b6 new airframe for sih, HIL_STATE_QUATERION sent through MAVLink 2019-04-12 09:25:07 +02:00
romain
c09e9ec97f simulator in hardware, new module added that allows to run a simulator in the hardware autopilot, for more documentation visit https://github.com/romain-chiap/PX4_SIH_QuadX 2019-04-12 09:25:07 +02:00