Commit Graph

34 Commits

Author SHA1 Message Date
Siddharth Bharat Purohit f811777789 commander: add new math for sphere fit for compass calibration 2017-02-01 08:38:26 +01:00
Beat Küng 9c73eae941 sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In
most places the value is needed, not the integral.

Note that this breaks the replay format for sdlog2 replay
2016-07-07 11:35:50 +02:00
Beat Küng d846ad5dac sensors: move voting into sensors module
- voting is now at a central place instead of duplicated within the
  estimators
  -> this also means that estimators that did not do voting so far,
     now have voting, like ekf2
- estimators requiring more than that can still subscribe to the raw
  sensors
- allows sensors_combined to be 3 times smaller
  - reduces logger, memcpy (cache) & RAM overhead
- all modules requiring only 1 or 2 sensor values now automatically get
  the voted result
- this also adds voting to baro
2016-07-07 11:35:50 +02:00
Beat Küng b4ecc5a8d9 sensor_combined cleanup: remove many unneeded fields
Decreases the message size from 780 to 280 bytes.
In particular, all modules using sensor_combined must use the integral now.
The sensor value can easily be reconstructed by dividing with dt.

Voters now need to be moved into sensors module, because error count and
priority is removed from the topic.

Any module that requires additional data from a sensor can subscribe to
the raw sensor topics.

At two places, values are set to zero instead of subscribing to the raw
sensors (with the assumption that no one reads them):
- mavlink mavlink_highres_imu_t::abs_pressure
- sdlog2: sensor temperatures
2016-07-07 11:35:50 +02:00
Lorenz Meier 851b5d02a9 Fix potential string overflow corner case 2016-04-22 09:36:07 +02:00
Lorenz Meier 4077616264 Significantly reduce stack size needed for calibration in commander 2016-04-22 09:03:57 +02:00
Don Gagne 91d4e129f4 Change to normal cal message
This way QGC can respond to it and show good ui
2016-04-10 10:58:37 -07:00
Lorenz Meier 224aaeddfe Harden calibration experience on master 2016-04-09 13:44:53 -07:00
Julian Oes f583f51027 commander: add macros for log messages and wait
As a current workaround we need to wait some time after publishing a
mavlink log message in order for it to arrive in QGC.
2016-04-05 15:36:02 -07:00
tumbili 94aaf0d298 increase sleep time in accel calibration routine to make accel calibration work on snapdragon 2016-04-04 11:17:26 +02:00
Julian Oes 13866400fa commander: workaround to get calibration status
If mavlink_log calls follow close after each other a later one will
replace the previous one. Therefore do a quick usleep to get the
calibration status out the door.
2016-03-24 13:10:02 +01:00
Julian Oes bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Lorenz Meier ea7ae7d019 Merged beta into master 2015-08-01 16:58:02 +02:00
Lorenz Meier 6d096401b5 Commander: Turn calibration warnings into critical (voice) output 2015-07-20 10:44:09 +02:00
Mark Charlebois 28dd9759a6 POSIX: fixes for use of open vs px4_open, etc
Fixes for the posix build when virtual devices are used.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 23:51:12 +02:00
Lorenz Meier 454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier c402d0c2f7 Commander: updated mag calibration routine, matlab script updates 2015-06-25 14:44:24 +02:00
Lorenz Meier c18210b163 commander: Update command names 2015-05-27 15:21:33 -07:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Mark Charlebois 0cea93a55c POSIX and QuRT: fixed calls needing px4_ prefix
There were some missed calls to open and ioctl that need to be
px4_open and px4_ioctl.

QuRT also does not provide usleep() so px4_time.h has to be included
in files calling usleep.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:13:39 -07:00
Mark Charlebois 12a25e4b63 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
	src/modules/commander/module.mk
	src/modules/mavlink/mavlink_ftp.h
	src/modules/mavlink/mavlink_tests/module.mk
2015-05-04 16:36:59 -07:00
Lorenz Meier 0e78e38cda commander: Use pre-rotated topic in board frame 2015-05-04 14:06:19 +02:00
Mark Charlebois 190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Lorenz Meier 362672ece8 commander: Fix calibration feedback so that QGC picks up all error conditions 2015-04-26 17:33:45 +02:00
Don Gagne a7f88d97b8 Sensor cal rework
- cancel support
- versioned cal messages
- better still detection
- better messaging
2015-04-26 14:34:19 +02:00
Mark Charlebois 187f13cd70 QuRT and POSIX changes - part 4
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:24:31 -07:00
Mark Charlebois 260bbcb64a Nuttx: fixups after rebase on Linux
Seems that mavlink_receiver_linux.cpp inherited the history
from mavlink_receiver.cpp so updates went to it vs mavlink_receiver_nuttx.cpp

Two module.mk files used ifdef instead of ifeq.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:57:02 -07:00
Mark Charlebois bba26c3430 Linux: enabled commander module
The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Don Gagne eff3d9d713 New worker routines for orientation detection 2015-03-28 13:09:07 -07:00
Daniel Agar 8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
Lorenz Meier 259014b0d5 Documentation only and unused defines only cleanup. 2014-07-13 11:40:09 +02:00
Lorenz Meier 3f6851b987 Re-send the RC config warnings once the GCS is connected, fixed compile warnings 2014-06-30 12:19:08 +02:00
Don Gagne 92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Lorenz Meier 68ab69de01 moved commander to C++, preparation for better gyro scale calibration respecting the current attitude for more accurate results 2013-07-20 13:47:51 +02:00