Beat Küng
881f2d2d36
sensors: add 'sensors start -hil' parameter
...
This does the following if given:
- don't initialize the sensors (the sensor drivers are not started)
- publish sensor_combined even in hil mode
- do not apply or publish thermal corrections
2017-03-04 05:59:10 +08:00
Beat Küng
f43f3baa02
ATT_VIBE_THRESH param: move the definition of this param to sensors
...
since it's only used in sensors module (otherwise it could get pruned)
2017-02-25 11:02:15 +01:00
Andreas Antener
a5f3f65c2b
Switch assignment: added manual and stabilized switch for a default stabilized switch scheme, let FW go into Acro
2017-02-18 08:03:19 +01:00
Paul Riseborough
9858b0b491
sensors: Add calibration control parameters to QGC list
2017-02-12 09:21:37 +01:00
Daniel Agar
80c8130f07
sensors true airspeed fix
...
- _voted_sensors_update.baro_pressure() is already in pascals
2017-02-09 21:29:03 +01:00
Matthias Grob
9e80a6c9d6
sensors: rc filter no unstable cutoff, better initialisation, reset filter on change, constrain output
...
Filter gets unstable if cutoff is above sample rate/2.
Filter initial frequencies do not matter a lot because they get replaced by parameters anyways.
Filter delay values get reset to 0 when the filter is reconfigured otherwise there can be some weird spikes in the output.
Filter output gets constrained to the range again because of possible overshoot.
2017-02-02 21:24:05 +01:00
Matthias Grob
81dcba3a2a
sensors: rc added low pass filter parameters
2017-02-02 21:24:05 +01:00
Matthias Grob
d991285406
sensors: rc filter: added sample rate of 33.3Hz and lowpass cutoff 5Hz hardcoded for testing
2017-02-02 21:24:05 +01:00
Matthias Grob
27a4ce2691
sensors: rc added lowpass filters to the 4 main channels without useful samplerate and cutoff frequency yet
2017-02-02 21:24:05 +01:00
Matthias Grob
a14dbdcfdb
sensors: rc refactored min max ifs to constrain
2017-02-02 21:24:05 +01:00
Daniel Agar
6631e72d6f
clang-tidy modernize-redundant-void-arg
2017-02-01 22:15:50 -05:00
Beat Küng
80c348d3b0
temperature_compensation: fix return value for set_sensor_id
...
got dropped during rebase cleanup
2017-02-01 08:40:23 +01:00
Beat Küng
4f6e379e50
temperature_compensation: use const for reference
2017-02-01 08:40:23 +01:00
Paul Riseborough
7d8ce9ab9c
sensors: Fix bug in temperature offset calculation
2017-02-01 08:40:23 +01:00
Beat Küng
e31958cad1
voted_sensors_update: don't report failover if previous index is invalid
2017-02-01 08:40:23 +01:00
Beat Küng
4a8d29800c
voted_sensors_update: cleanup & remove some attributes
...
since the correction topic now contains data from all sensors, we don't
need additional fields in voted_sensors_update
2017-02-01 08:40:23 +01:00
Beat Küng
6ee3c1a117
temperature_compensation: fix copy-paste error (max_temp was not initialized)
2017-02-01 08:40:23 +01:00
Beat Küng
75be1abc4c
temperature_compensation: make sure to reset temperature when params change
...
Makes sure that the offsets & scales are updated and published later on.
2017-02-01 08:40:23 +01:00
Paul Riseborough
bdd3b094a7
sensors: report mapping from uORB to compensation parameter index
2017-02-01 08:40:23 +01:00
Paul Riseborough
8b1a5461c4
sensors: Update documentation
2017-02-01 08:40:23 +01:00
Paul Riseborough
f2f5034832
sensors: prevent high frequency updating of sensor corrections
...
The use of a float to integer cast was causing high frequency reporting when the float value was close to the rounding boundary.
2017-02-01 08:40:23 +01:00
Paul Riseborough
170bc91587
sensors: fix bug in thermal compensation temperature limit (+2 squashed commits)
...
Squashed commits:
[2df1d9e] sensors: change definition of sensor offset and scale factor to match legacy code
[089e103] sensors: publish thermal corrections for all sensors
2017-02-01 08:40:23 +01:00
Lorenz Meier
1b06c04b5c
Sensors: Style fix
2017-01-29 16:24:47 +01:00
Lorenz Meier
9cacdaafc7
Sensors: Reset gyro and accel calibration if one sensor goes missing.
...
This is to ensure that if sensor IDs are fixed we do not end up in a state where the system is partially calibrated and the need for re-calibration is not properly communicated to the user.
2017-01-29 16:24:47 +01:00
Daniel Agar
019c6647f2
astyle src/modules/sensors
2017-01-29 01:18:32 +01:00
Lorenz Meier
63057d7b60
Ensure that manual control is only sent by sensors app if signal is valid and initialized
2017-01-25 07:43:45 +01:00
Lorenz Meier
42c5684a06
Fix temperature clipping for temperature calibration. Fixes #6412
2017-01-21 12:08:18 +01:00
David Sidrane
df6b46d0ba
FMUV1 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
894b41e313
AEROCORE Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
f86a8c0e5e
MINDPX_V2 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
e0fa53f444
FMUV2 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
0baefec09f
FMUV4 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
e9ca626e19
TAP_V1 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
fd25f0a594
AEROFC_V1 Moved magic numbers for battery V div and A per V to board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
99902807c9
SITL Moved magic numbers for battery V div and A per V to px4_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
a8b9c906f6
Board_config.h will provide the BOARD_BATTERYx_V_DIV
...
Prep to distrubte the magic numbers assgined in parameters.cpp
to the board_config.h
common/board_common.h will define:
1) BOARD_BATTERY[1|2]_V_DIV as 0.0f if not defined to ensure
the missing default trips a low voltage lockdown
2) BOARD_BATTERY[1|2]_A_PER_V as 0.0f if not defined to ensure
the default leads to an unrealistic current value.
2017-01-21 11:45:36 +01:00
Paul Riseborough
1d66d4b051
sensors: Allow for difference in temperature readings across sensors
...
We need to track the temperature change in each sensor instance individually when using it as basis for publication.
2017-01-21 08:31:56 +01:00
Beat Küng
ab9e0aa524
sensors temp compensation: do an orb_copy to get the driver ID
...
This removes the necessity, that the driver class ID matches the uorb topic
instance.
Also improve error handling & reporting
2017-01-19 19:24:52 +01:00
Beat Küng
41d220ac2d
sensors: reorder initialization calls
...
needed for the next commit
2017-01-19 19:24:52 +01:00
Beat Küng
f6f145cbe8
sensors & mc_att_control: increase stack sizes due to recent changes
2017-01-19 19:24:52 +01:00
Beat Küng
fd48d9c190
sensors: print status of temp compensation with 'sensors status'
2017-01-19 19:24:52 +01:00
Beat Küng
916a04bc56
sensors temp compensation: use SENSOR_COUNT_MAX instead of just 3
2017-01-19 19:24:52 +01:00
Beat Küng
117826a31f
sensors temp compensation: refactor into a separate class
...
- reduces some code duplication
- provides clear API & separation for temp compensation
additional changes:
- added timestamp to sensor_correction topic
- reduced its publication rate, to only when voting index or scales or
offsets change (if there is more than 1deg change in temperature)
2017-01-19 19:24:52 +01:00
Beat Küng
23d278cc43
sensors temp compensation: minor cleanup
2017-01-19 19:24:52 +01:00
Beat Küng
f38843278d
voted_sensors_update: make msl_pressure static const
2017-01-19 19:24:52 +01:00
Beat Küng
535b1ea0dd
voted_sensors_update: simplify accel & gyro poll methods
2017-01-19 19:24:52 +01:00
Beat Küng
bbd47389e0
voted_sensors_update: fix copy paste naming mistake
2017-01-19 19:24:52 +01:00
Beat Küng
0765ed552c
sensor_correction.msg rename {gyro,accel,baro}_select to match uORB convention
2017-01-19 19:24:52 +01:00
Paul Riseborough
0485c2b94a
sensors: add baro pressure temperature compensation and reporting
2017-01-19 19:24:52 +01:00
Paul Riseborough
c2fc283fdb
sensors: Update single axis temp comp method to 5th order
...
This allows future use with baro sensors that require a higher fit order
2017-01-19 19:24:52 +01:00