Commit Graph

263 Commits

Author SHA1 Message Date
Lorenz Meier
7cc0b32e74 Make altitude more efficient and estimator status safe in terms of memory overflow 2016-08-15 19:53:21 +02:00
Sebastian Quilter
3b7ba915a8 small refactor (#5155) 2016-07-28 14:49:37 -07:00
Beat Küng
0f6a6f7150 mavlink_messages.cpp: only warn once, when MAVLink log opening fails
This happens for example if no SD card is present.
2016-07-20 13:07:32 +02:00
Beat Küng
9a8c092116 mavlink_messages.cpp: fix coding style: prepend _ to class members 2016-07-20 13:07:32 +02:00
Julian Oes
eda2915f0b mavlink: whitespace fix 2016-07-13 10:10:45 +02:00
tommises
4fa2c54485 Mocap timestamp cleanup (#5021) 2016-07-11 12:46:29 +02:00
Lorenz Meier
71d150f6ec MAVLink app: Fix rate handling 2016-07-10 17:05:33 +02:00
Lorenz Meier
8b3045baa2 MAVLink: clean up vision timestamps 2016-07-10 12:43:47 +02:00
tommises
f69e9a3d37 Fixed VISION_POSITION_ESTIMATE.usec
Fixed units to be microseconds and not milliseconds.
2016-07-10 12:29:19 +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
Daniel Agar
050eedc4f8 mavlink publish WIND_COV (#4913)
* mavlink publish WIND_COV

-closes #4678

* px4fmu-v2_default disable logger and sync configs
2016-06-27 16:16:24 +02:00
Beat Küng
89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Chris Lovett
534e10c96a Implement code review feedback. Add get_id_static to MavlinkStream items. Add implementation of MAV_CMD_SET_MESSAGE_INTERVAL, MAV_CMD_GET_MESSAGE_INTERVAL. Add deprecation message to REQUEST_DATA_STREAM. 2016-06-21 10:10:50 +02:00
Daniel Agar
7bbfa5d94b cleanup px4_custom_mode 2016-06-15 20:35:16 +02:00
Daniel Agar
e322359b27 get_mavlink_mode_state remove unused pos_sp_triplet (#4613) 2016-06-10 10:33:56 -04:00
Lorenz Meier
0a597d0d62 MAVLink: Update to version 2 compaat API 2016-05-19 20:13:32 +02:00
Lorenz Meier
6eccfe3d14 MAVLink 2.0: Take a first stab at integration, enable heartbeat packets 2016-05-19 20:13:32 +02:00
Lorenz Meier
55c879a0ab MAVLink: Use valid flag to initialize fields 2016-05-15 15:38:01 +02:00
Daniel Agar
27cd3af7fb mavlink fix missing MavlinkStreamNavControllerOutput (#4538) 2016-05-14 00:39:17 +02:00
Daniel Agar
eae726e345 FW add mavlink NAV_CONTROLLER_OUTPUT 2016-05-13 12:56:04 +02:00
Julian Oes
afbdec1742 mavlink: whitespace 2016-05-12 08:16:36 +02:00
Jonathan Challinger
7ec37d5ffd mavlink: subscribe to and use cpuload message instead of vehicle_status 2016-05-12 08:16:36 +02:00
Lorenz Meier
165f75589b MAVLink app: Use proper C99 NaN define 2016-05-11 12:59:57 +02:00
Lorenz Meier
34baf01d7e Fix altitude estimate 2016-05-11 10:02:03 +02:00
sander
e0a8571254 Use filtered voltage and current values for mavlink sys message 2016-05-10 21:34:11 +02:00
Mark Whitehorn
1a5040b9d2 only call fsync in NUTTX builds 2016-04-25 21:51:09 +02:00
Mark Whitehorn
6f20b9e1df fix unused variable error 2016-04-25 21:51:09 +02:00
Mark Whitehorn
4cf427510e fix problem with log_file_path and add msg timestamps 2016-04-25 21:51:09 +02:00
Julian Oes
f454d74a51 mavlink: fix Snapdragon build 2016-04-25 15:35:22 +02:00
Lorenz Meier
14a20e3112 MAVLink streams: Better log file handling 2016-04-25 14:46:15 +02:00
Lorenz Meier
25f327c4ac Set RSSI to zero if we loose signal 2016-04-23 16:33:25 +02:00
Lorenz Meier
803880a9f8 MAVLink: Fix current reporting 2016-04-23 14:24:36 +02:00
Lorenz Meier
ff800a4c97 MAVLink app: Save stack for file name handliling, log only when armed 2016-04-22 10:28:13 +02:00
Lorenz Meier
b046f93173 Better MAVLink app error reporting 2016-04-22 09:34:02 +02:00
Lorenz Meier
cdeb7df43c MAVLink: More robust string operations 2016-04-17 20:03:48 +02:00
Lorenz Meier
a663aa68af Send out ADS-B reports to GCS 2016-04-17 18:19:32 +02:00
Daniel Agar
56dbfef378 remove duplicate bat_msg.id 2016-04-11 18:01:48 +02:00
Daniel Agar
c494e85095 fix sign compare to make travis-ci happy 2016-04-11 18:01:48 +02:00
Julian Oes
a11a986df8 mavlink: removed leftover debug printf 2016-04-11 18:01:48 +02:00
Julian Oes
1f44fb1efd commander: internalize system status bools
Most condition bools in the commander are not used anywhere but in the
commander. It therefore makes sense to move them to a different internal
struct and remove them from the vehicle_status message.

Also, the land_detected should be used by all the modules instead of
getting it through the commander and system_status.
2016-04-11 18:01:47 +02:00
Julian Oes
32c3135788 commander: move battery calculations to systemlib
The commander used to consume the battery_status topic and write the
contents after some calculations into the system state. Instead, the
calculations now happen in library calls in systemlib/battery.

This moves the battery fields out of the vehicle_status message into the
battery_status topic.

This brought quite some changes in all modules that need battery
information. The current state is compiling but untested.
2016-04-11 18:01:47 +02:00
Julian Oes
74072dbe74 vehicle_status.msg: delete unused mavlink stuff
The MAV_TYPE enum was not in sync with the mavlink specs anymore. It
makes therefore sense to remove the duplication and include the correct
mavlink header file where it is needed.
Also, error counts which are not populated, can be scrapped.
2016-04-11 18:01:47 +02:00
Jimmy Johnson
bbc8eaefd7 Adding new follow target navigation and main states. New follow target
topic added. New follow fsm added to the navigator
2016-03-27 12:10:57 +02:00
Lorenz Meier
391f366a03 MAVLink app: formatting 2016-03-24 14:21:49 +01:00
Julian Oes
d3f710dbb5 mavlink: don't use the file logging on Snapdragon 2016-03-24 13:10:02 +01:00
Julian Oes
de0e467150 mavlink: bring buffering for log messages back 2016-03-24 13:10:02 +01:00