520 Commits

Author SHA1 Message Date
wangxdflight
b693e29d64 enable px4 flight for excelsior(legacy) 2017-01-16 08:25:58 -08:00
Lorenz Meier
1549f5a5d1 sdlog2: Fix string termination 2017-01-14 07:47:03 -08:00
Mark Charlebois
62a3e07423 orb_exists support for muorb
Also added builtin command wait_for_topic

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2017-01-09 15:41:54 -08:00
Daniel Agar
34b2fb55e6 Makefile add clang-check and clang-tidy helpers 2017-01-02 10:14:41 +01:00
Beat Küng
41dc34204c version cleanup: move all version information into version.c and use a common API
The provided versioning information is the same, except for some additions,
like OS version (which still need to be implemented on NuttX).
2016-12-21 11:35:10 +01:00
Beat Küng
c662113527 board_name.c: remove the file and HW_ARCH macro, use px4_board_name() instead
boards define BOARD_NAME, so board_name() is not necessary. HW_ARCH was
just a wrapper around board_name().

This patch simplifies to having only one common method px4_board_name().
2016-12-21 11:35:10 +01:00
David Sidrane
dc8c6ea5e5 White space fixes 2016-12-21 08:34:21 +01:00
Andreas Antener
62103be7ba Load monitor: report and log processes low on stack 2016-12-09 21:12:12 +01:00
Daniel Agar
46a697787f log all raw diff pres and airspeed 2016-11-19 15:15:36 +01:00
Dennis Shtatnov
a634c14582 Scale throttle outputs by battery level. Fixes #4751 2016-11-19 14:55:52 +01:00
CarlOlsson
106c882cea modified logging 2016-11-15 23:58:05 +01:00
Lorenz Meier
ee314d2f50 Remove unused gx, gy, gz fields from attitude 2016-10-18 20:46:08 +02:00
tumbili
38b949a5aa calculate euler angles for logging 2016-10-18 20:46:08 +02:00
tumbili
5e0e522903 adapted to new vehicle attitude message 2016-10-18 20:46:08 +02:00
Paul Riseborough
ed0cc2af43 sdlog2: log ekf output predictor tracking errors 2016-10-13 09:06:41 +02:00
Paul Riseborough
66e887e581 sdlog2: log estimator innovation test pass/fail data 2016-10-11 08:52:35 +02:00
Beat Küng
ce0d31b7d9 mavlink log: ensure all critical & emergency msgs are also logged to console & ulog
Critical messages that the user sees should also go to the log file, so
that the exact error (with time) can later be analyzed from the log file.
2016-09-30 13:50:51 +02:00
Julian Oes
8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Lorenz Meier
f815d9fa74 sdlog2: Adjust writer stack size 2016-09-11 20:07:30 +02:00
Lorenz Meier
8c49372e7a Better error reporting for sdlog2 2016-09-04 18:47:41 +02:00
David Sidrane
deeefe5dd1 Describe the issues that requires the +=2 on arg[c|v] for NuttX (#5293)
This may be moot and should be revisited if only px4_getops is used, but this pr politely documents the reson for the logic.
2016-08-10 06:19:59 -10:00
Beat Küng
8aa3b245a5 fix sdlog2: use LOG_DGPS_MSG for second gps (#5235) 2016-08-04 17:18:02 +02:00
Julian Oes
c4cb916afa Fix sdlog2/logger path/file name overflows. (#5138)
* logger: prevent logpath buffer overflows

The handling of the log path had the potential to cause buffer
overflows, especially on POSIX platforms where the paths are often much
longer than just 64 chars.

* sdlog2: prevent logpath buffer overflows

When the log folder path was created, this was done with the unsafe
sprintf function instead of snprintf. This caused buffer overflows in
SITL but the overflow was usually not detected until recent testing of
some work in progress.
2016-07-27 00:55:29 -07:00
Beat Küng
5b85fdb636 fix sdlog2 replay: changed format string from 9c73eae941c (#5090) 2016-07-18 15:25:49 +02:00
Beat Küng
ee58f0d11d encoders.msg: remove this topic, it's never published (#5074) 2016-07-15 14:59:52 -07:00
Julian Oes
ddba274496 sdlog2: fix poll_counter that I broke earlier 2016-07-07 16:48:27 +02:00
Julian Oes
03dbcf5464 sdlog2: don't forget to copy after poll
The previous changes broke sdlog2 on NuttX because no orb_copy was
called after polling in the case when sdlog2 was not actually logging.
2016-07-07 16:48:27 +02:00
Julian Oes
772dc302b6 sdlog2: raise min write size back
Turns out in practice there was not really a difference, so there was
no reason to change it.
2016-07-07 16:48:27 +02:00
Julian Oes
fe91527604 sdlog2: poll for sensor and replay on Snappy
This brings better performance, so less missed updates on Snappy, as
well as a bit of a cleanup of the poll and orb_copy logic.
2016-07-07 16:48:27 +02:00
Julian Oes
5f18f9bbba sdlog2: select MIN < MAX bytes to write
Previously, the MAX and MIN were both 512 meaning that usually it would
start writing at > 512 bytes but only write 512 bytes which results in
a 512 bytes write shortly followed by a e.g. 30 bytes write.

Also, performance (measured in missed poll updates) seems slightly
better on Snapdragon with bigger chunks.
2016-07-07 16:48:27 +02: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
c5ea4b43be sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
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
Beat Küng
c407123a72 cleanup sensor_combined: remove adc & differential_pressure fields
These are not really used. differential_pressure is just copied from the
topic with the same name.

for sdlog2 we assume no one needs the diff pressure fields and set it to 0.
We plan to switch to the new logger soon anyway.
2016-07-07 11:35:50 +02:00
James Goppert
00dfc99e08 LPE Variance Dependent Publication (#4914)
* Use variance to control publishing for LPE.

* Don't stop publishing if we have gps/ baro.

* LPE tuning and cleanup.

* Added bias saturation to LPE.

* Added vector enabled low pass filter block.

* Added rk4 integration and pub lowpass to LPE.

* Fix std::abs issue on mac/ reset lowpass on state reset.

* Don't estimate gyro bias when rotating at high speed  att_est_q.

* Lowered low pass on position to 5 Hz for LPE.

* Streamline state space update for LPE.

* Added health flags to est2 log.

* Revert to old tuning, more conservative, less faults.

* Formatting.

* Fix for fault message on LPE.

* Added subscription throttling to LPE.

* Formatting.
2016-07-01 11:43:09 -04:00
Julian Oes
f4f0892b25 sdlog2: no new sessXXX folder on every arm (#4775)
Previously, if no time was set, sdlog2 created a folder like sess001,
sess002 for every logfile. The logfiles would then always be named
log001.px4log and their numbering would not actually increase.

This is now fixed and a new folder is only created per boot.
2016-06-10 08:48:37 +02:00
CarlOlsson
9c170f7fae added parameter which defines threshold for airspeed given to the filter
remove unnecessary replay fields
2016-06-08 17:11:10 +02:00
Julian Oes
4827f0d931 sdlog2: removed a printf 2016-06-07 22:10:56 +02:00
Paul Riseborough
2e127a4737 sdlog2: Add external vision data to ekf2 replay
Put struct definitions in enum order
Fix duplicate enum value
Add ekf2 replay message for external vision data
2016-05-28 14:54:14 +02:00
Julian Oes
af06737e7e sdlog2: fix Segfault on Eagle (#4638)
Since orb_exist doesn't work on the Snapdragon Linux side, we need to do
an additional orb_check after the orb_subscribe_multi, otherwise we copy
garbage.

The segfault was triggered by a count/length information about ESC
packets which lead to access outside the struct in the garbage case.
2016-05-25 21:50:23 +02:00
Beat Küng
7f3a95508e logger: move SDLOG_UTC_OFFSET param definition into logger module
It's still used in sdlog2, but once we'll depricate/remove sdlog2, we will
not remove this parameter as well.
2016-05-22 13:31:35 +02:00
Sebastian Verling
c1cdef7e63 fixed multi subscribing and publishing
removed debugging message

changed to orb_publish_auto
2016-05-22 12:19:47 +02:00
Andreas Bircher
556851a511 applying dual gps patch
resolve transfer errors

reformatting

implementing multi-topics
2016-05-22 12:19:47 +02:00
CarlOlsson
ee33f21303 added airspeed to ekf2 replay 2016-05-14 11:32:11 +02:00
Daniel Agar
76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Daniel Agar
0042c8ed12 sdlog2.c param metadata 2016-05-13 21:03:40 -04:00
Daniel Agar
e43751c219 params.c param metadata 2016-05-13 21:03:40 -04:00
Lorenz Meier
a40e1ea269 sdlog2: Properly handle pragma 2016-05-13 10:35:07 +02:00
Julian Oes
30b6f9ff6c sdlog2: more merge conflict resolving 2016-05-12 08:16:36 +02:00