Commit Graph

245 Commits

Author SHA1 Message Date
Lucas De Marchi f99d64e621 DataFlash: remove check for max INS instances
For all supported boards the maximum number of instances is 3.
2015-10-21 10:05:17 +11:00
Paul Riseborough 2d44441d6b DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough 1323db10e8 DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough 9e3d9d15fc DataFlash: Log vertical position derivative output 2015-10-20 15:21:35 +11:00
Gustavo Jose de Sousa 363f9cf82a DataFlash: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:07 +09:00
Paul Riseborough a82c8b241f DataFlash: Update NKF4 data logging
Add roll/pitch error metric
Reduce normalised magnetometer vector with a vector length
2015-10-10 21:22:57 +09:00
Paul Riseborough ba6387f206 DataFlash: Add logging of EKF GPS check status 2015-10-10 14:49:03 +09:00
Randy Mackay e9254ca1a9 DataFlash: log compass as milligauss 2015-10-07 21:35:19 +09:00
Peter Barker af4ad01f23 DataFlash: make CAM a critical message 2015-10-06 15:20:08 +11:00
Paul Riseborough 80e182f827 AP_NavEKF2: Update EKF2 data logging 2015-09-24 12:58:44 +10:00
Paul Riseborough 86ad1e6e66 DataFlash: Update EKF2 data logging 2015-09-24 12:58:44 +10:00
Andrew Tridgell ba8e63d8e7 DataFlash: handle unitialised EKF2 in logging 2015-09-23 18:54:46 +10:00
Andrew Tridgell ce9fa45b3a DataFlash: added logging of EKF2 2015-09-23 12:09:48 +10:00
Andrew Tridgell eabdee2b3c DataFlash: only log two rangefinders
this prevents a array index build error on PX4
2015-09-22 09:24:55 +10:00
Stewart Loving-Gibbard 4dcf6b8dc3 DataFlash: Adding Logging of RSSI data. 2015-09-16 16:41:31 +09:00
Andrew Tridgell 43ac3f86c5 DataFlash: added RNFD logging and 3 baros 2015-09-13 11:29:59 +10:00
Andrew Tridgell c5cd310818 DataFlash: added GPA and GPA2 messages for GPS accuracy
this reverts the GPS format to the old format, thus fixing log
analysers
2015-09-09 14:53:11 +10:00
Michael du Breuil a88e10d3a0 DataFlash: Log vDOP with GPS messages.
Due to the description string getting to long HDop was renamed as EPH with VDop as EPV (Which is the same terimnology  used to describe the MAVLink side). Status was shortened to stat as well.
2015-09-09 11:38:12 +10:00
Peter Barker 2b02911546 DataFlash: make mode and messages critical 2015-09-03 15:20:20 +10:00
Peter Barker 8f8493225c DataFlash: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 09:54:55 +10:00
Lucas De Marchi 327a3a4298 DataFlash: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Andrew Tridgell ab7e400a89 DataFlash: added RPM logging 2015-08-12 15:03:50 +10:00
Gustavo Jose de Sousa 709204c01d DataFlash: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Randy Mackay 5776620062 DataFlash: consolidate GPS, GPS2 messages
Remove unused dgps_numch, dgps_age from GPS2
Add U field (for use) to both GPS and GPS2
2015-08-05 15:46:46 +09:00
Peter Barker 1ee330ebb2 DataFlash: CLI log dumping - don't truncate lines that contain doubles
We currently print doubles out as if they were floats.  The ftoa_engine isn't something to replicate for doubles lightly!
2015-07-24 08:08:51 +10:00
Randy Mackay ad1f9c4829 DataFlash: add ORGN message 2015-07-06 12:11:49 +09:00
Peter Barker cabea266e7 DataFlash: pull out common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker d85b247706 DataFlash: Log_Write_SysInfo - pull out common logging startup messages 2015-06-30 16:23:34 +10:00
Peter Barker 723c37bcf7 DataFlash: backend/frontend split 2015-06-26 16:02:50 +10:00
Andrew Tridgell feb928dcd3 DataFlash: fixed build warnings 2015-06-17 13:10:26 +10:00
Randy Mackay 384755e271 Dataflash: add IMT messages 2015-06-17 12:46:54 +10:00
Randy Mackay 0d239d2746 DataFlash: disable vibration logging on APM2
Also remove unnecessary include
2015-06-12 21:36:59 +09:00
Randy Mackay f0f262eb04 DataFlash: add Log_Write_Vibration 2015-06-12 21:36:28 +09:00
Grant Morphett 7d1bf75aa8 DataFlash: Moving parameter logging to be after all systems have started
Moved Log_Write_Parameters to be public so we can call it from the
vehcile code at the end of the startup sequence.
We needed to do this because parameters like COMPASS_EXTERNAL are
modified by the startup code and if we log the parameters too early we
will be recording the wrong value.
2015-06-01 20:22:43 +09:00
Andrew Tridgell 73445fdae9 DataFlash: added error checking and fixed a warning 2015-05-30 22:16:22 +10:00
Andrew Tridgell 95ff71940c DataFlash: fixed rebase errors 2015-05-27 14:28:50 +10:00
Andrew Tridgell b45ab52015 DataFlash: added desired rate to PID logging 2015-05-27 14:28:48 +10:00
Robert Lefebvre 7ab628521e DataFlash: Add Acceleration Feedforward to PID_Info. 2015-05-27 14:28:47 +10:00
Robert Lefebvre 753be18c17 DataFlash: Add PID Logging Method 2015-05-27 14:28:44 +10:00
Andrew Tridgell 2a22ae5404 DataFlash: support 64 bit TimeUS log dumping 2015-05-27 11:54:18 +10:00
Peter Barker 617043f468 DataFlash: convert GPS and CAM dataflash messages to 64-bit timestamps
GPS structures remove 32-bit apm_time and replace with standard time_us
Significant change to GPS and GPS2 messages:
	    Add TimeUS as first field
	    Remove T field
	    Due to length restrictions on labels:
	    	Renamed TimeMS to GMS (Gps MilliSeconds)
		Renamed Week to GWk (Gps WeeK)
		Renamed RelAlt to RAlt
Significant change to CAM messages:
	    Removed GPSTime (uin32_t), added TimeUS (uint64_t)
2015-05-27 11:54:15 +10:00
Peter Barker 769982b8f2 DataFlash: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:14 +10:00
Andrew Tridgell b5d930be61 DataFlash: support member functions for rover 2015-05-21 07:48:47 +10:00
Andy Piper c600c1a746 DataFlash: log Gyro and Accel Health for IMUs.
Log the health of the various IMUs under GyHlt and AcHlt.
(Names are shortened to get inside the string array limit).
2015-05-19 13:13:35 +09:00
Andrew Tridgell 74485c5754 DataFlash: added Log_Write_POS() call
write AHRS position to DF log
2015-05-15 14:28:08 +10:00
Tom Pittenger 98ca790cb9 AP_DataFlash: compiler warnings: float to double 2015-05-05 13:26:54 +10:00
Tom Pittenger f700f76923 DataFlash: fix compile warnings re float constants 2015-04-24 14:04:12 +09:00
Andy Piper b0937154f5 DataFlash: log compass health
This patch simply logs the health of each compass for easy diagnosis.
2015-04-21 13:18:24 +09:00
Andrew Tridgell ecd2a6f515 DataFlash: log temperature of IMUs
this is the first step towards supporting temperature calibration of
IMUs
2015-03-17 13:33:26 +11:00
Andrew Tridgell af5f84f4e4 DataFlash: fixed example builds 2015-02-09 13:09:16 +11:00
Holger Steinhaus 8911dfd791 DataFlash: fix out-of-bounds read when logging
Checked in my rmackay9
2015-01-31 13:24:34 +09:00
Randy Mackay 09e3dcd821 DataFlash: pass ahrs, batt, targets by reference 2015-01-21 14:38:01 +09:00
Robert Lefebvre 80929c389e DataFlash: Handle multiple compass instances natively inside the Library. 2015-01-21 14:37:50 +09:00
Robert Lefebvre 5b70550b73 DataFlash: Fix potentially uninitialized variable compiler warning. 2015-01-21 14:37:27 +09:00
Robert Lefebvre be803f4f39 DataFlash: Minor whitespace changes/cleanup. No effect. 2015-01-21 14:37:25 +09:00
Robert Lefebvre 2657610373 DataFlash: Add common-vehicle Mode logging method.
Conflicts:
	libraries/DataFlash/DataFlash.h
2015-01-21 14:37:18 +09:00
Robert Lefebvre 12c3593bc3 DataFlash: Add common-vehicle Compass logging method. 2015-01-21 14:37:14 +09:00
Robert Lefebvre 392e5257cc DataFlash: Add voltage2 data to Current log, to be used by plane. 2015-01-21 14:37:07 +09:00
Robert Lefebvre 50b5376945 DataFlash: Add common-vehicle Current logging message. 2015-01-21 14:37:01 +09:00
Robert Lefebvre db1a066f43 DataFlash: Add common-vehicle Attitude logging message. 2015-01-21 14:36:56 +09:00
Andrew Tridgell 5d83124675 DataFlash: moved airspeed msg to DataFlash
so it can be used by Replay
2015-01-20 09:10:33 +11:00
Andrew Tridgell e8b1fc72e0 DataFlash: fixed build warning 2015-01-09 12:43:15 +11:00
Andrew Tridgell b85001bf4a DataFlash: added logging of 2nd baro 2015-01-09 11:51:51 +11:00
Randy Mackay 3896dadc77 DataFlash: EKF logs filter status as uint16 2015-01-09 10:51:23 +11:00
Randy Mackay 54cff29fc2 DataFlash: EKF logging uses nav_filter_status 2015-01-09 10:51:23 +11:00
priseborough d470d55234 DataFlash: Update EKF optical flow debug logging 2015-01-09 10:51:21 +11:00
priseborough a9eec29e45 DataFlash: Update EKF optical flow data logging 2015-01-03 14:09:15 +11:00
priseborough b99b3c7b9d DataFlash: Don't log EKF optical flow data if not required 2014-12-31 13:16:09 +09:00
priseborough 685fa383e4 DataFlash: Log EKF solution status message
This message is a bitmasked integer that will be used by control software to determine what data is available from the EKF and decide what control modes are available.
Duplicate static mode message removed. Static mode is now contained in the bitmasked solution status message
2014-12-31 13:13:33 +09:00
Andrew Tridgell e0943851d6 DataFlash: log gyro and accel error counts 2014-12-30 12:16:02 +11:00
Andrew Tridgell abd1ece6e3 DataFlash: don't write out parameters if log open fails 2014-12-21 14:50:42 +11:00
priseborough 7d27a22f77 DataFlash : Fix EKF optical flow logging bug 2014-12-06 18:16:48 +11:00
priseborough 2baa1e56ed Dataflash : Fix bug in EKF opt flow logging 2014-12-06 18:16:48 +11:00
priseborough cc8e6dbfad DataFlash : Add EKF additional fault and timeout logging 2014-12-06 18:16:47 +11:00
priseborough 4616721b0d DataFlash : Update EKF debug logging 2014-12-06 18:16:47 +11:00
priseborough f358d5e20f DataFlash : Add range measurement to EKF debug message 2014-12-06 18:16:45 +11:00
priseborough a07e402ebf DataFlash : Update names in EKF optical flow logging 2014-12-06 18:16:45 +11:00
priseborough bc74abcd00 DataFlash : EKF optical flow fusion support preliminary changes 2014-12-06 18:16:44 +11:00
Andrew Tridgell d0087c91e9 DataFlash: prevent build errors on non-PX4 targets 2014-11-26 11:14:44 +11:00
Andrew Tridgell 1d0122e6c2 DataFlash: log each ESC separately
this saves log space for ESCs that are not initialised (eg. only 3rd
ESC on fixed wing) and is a bit easier to deal with as a user
2014-11-26 11:14:44 +11:00
Holger Steinhaus 294d944cbd DataFlash: added logging of ESC feedback (currently only available with UAVCAN ESCs) 2014-11-26 11:14:44 +11:00
Andrew Tridgell 09547c40cb DataFlash: added staticmode to EKF4 message
useful when diagnosing logs
2014-11-22 18:27:51 +11:00
priseborough d57c99f1cc DataFlash: Fix bug in logging of EKF IMU1 Z accel bias 2014-11-18 13:39:42 +11:00
Jonathan Challinger 84da5d2d98 DataFlash: use new interface functions for EKF IMU weighting and accel biases 2014-10-30 18:17:38 +11:00
Jonathan Challinger ac2e5f644c DataFlash: fix bug in ekf gyro bias logging 2014-10-30 18:17:37 +11:00
priseborough aca78d321f DataFlash : Remove unused numerical divergence metric 2014-10-30 18:17:37 +11:00
priseborough 638d63aa90 DataFlash : Change to more descriptive EKF logging names 2014-10-30 18:17:37 +11:00
Randy Mackay 04eb1073e8 DataFlash: log baro climbrate 2014-10-22 17:29:27 +09:00
Emile Castelnuovo bbb9925c47 DataFlash: Added four more channels for logging 2014-08-16 20:28:46 +10:00
Andrew Tridgell 3fa30f91db DataFlash: avoid CLI functions on APM2 for copter 2014-08-01 15:57:15 +10:00
Andrew Tridgell fd87f28a07 DataFlash: save some flash space on APM2
don't include log message headers that are not used on APM2
2014-06-30 07:58:42 +10:00
Andrew Tridgell e6d8e329d5 DataFlash: allow logging of 3 accels/gyros 2014-06-30 07:58:30 +10:00
Randy Mackay 11e08e1492 DataFlash: common Log_Write_Camera
pair programmed with Craig Elder
2014-06-17 14:11:36 +10:00
priseborough f01cc78d37 DataFlash: Add EKF fault status logging 2014-05-15 21:14:21 +10:00
Andrew Tridgell 95304e27c9 DataFlash: added separate logging of each GPS 2014-04-10 10:29:30 +10:00
priseborough 09c5ba1aed Dataflash : Improved logging of EKF sensor health checks
This changes the definition sof the messages in the EKF4 message to make it more useful
The values shown now relate directly to how much margin there is before a measurement
is rejected, enabling better tuning of error trap parameters
2014-04-01 21:27:07 +11:00
Andrew Tridgell 31d3b6555f DataFlash: convert to new GPS API 2014-04-01 06:38:23 +11:00
Andrew Tridgell 6bf2b5033e DataFlash: support logging up to 14 RC input channels 2014-03-25 16:39:19 +11:00
Andrew Tridgell 1b1a92251f DataFlash: allow drivers to setup their own logging formats
this allows drivers to ask the dataflash driver to add new log formats
2014-03-24 12:03:31 +11:00
Michael Day 68dbfd6315 DataFlash: Add Log_Write_Radio to store RSSI and noise on board. 2014-03-20 09:56:37 +11:00
Randy Mackay 869f325c66 DataFlash: Log_Write_MavCmd replaces Log_Write_Cmd 2014-03-19 12:12:43 +09:00
Randy Mackay 150faafaf4 Dataflash: add Log_Write_Cmd method 2014-03-19 12:12:07 +09:00
Andrew Tridgell e410733682 DataFlash: added GPS2 logging 2014-02-26 09:19:00 +11:00
Paul Riseborough 17e24521e8 DataFlash : Added logging of NavEKF innovations and variances 2014-02-15 05:48:21 +11:00
Andrew Tridgell 45177df354 DataFlash: moved EKF logging to common code 2014-02-15 05:48:16 +11:00
Andrew Tridgell d0a25b53f2 DataFlash: added logging of AHRS2 2014-02-15 05:48:09 +11:00
Andrew Tridgell ce43e674fe DataFlash: added power status logging 2014-02-15 05:00:09 +11:00
Andrew Tridgell fc3ed61e67 DataFlash: added baro dataflash logging 2014-01-28 10:35:18 +11:00
Randy Mackay a53d1075ec DataFlash: add EnableWrites method
This method allows temporarily suspending writes to the dataflash which
will be used in ArduCopter to ensure no messages are written while the
copter is disarmed
2014-01-07 22:43:44 +09:00
Andrew Tridgell a37a6d68f3 DataFlash: zero-fill FMT packet before logging
this prevents uninitialised data appearing at the end of strings in
logs
2013-12-21 13:56:54 +11:00
Andrew Tridgell 599edeeafb DataFlash: removed debug code for creating logs with no headers 2013-12-17 12:15:41 +11:00
Andrew Tridgell e6bafa2d8f DataFlash: added structures to Init() of dataflash
this will allow the get_log_data() call to add FMT headers if a log
has wrapped
2013-12-17 11:51:36 +11:00
Andrew Tridgell 5d53b780ba DataFlash: added functions for load download support 2013-12-17 11:51:35 +11:00
Andrew Tridgell 513f4074ce DataFlash: fixed dual sensor dataflash logging 2013-12-10 15:32:11 +11:00
Andrew Tridgell 08658909ad DataFlash: log both IMU packets at once 2013-12-09 17:34:07 +11:00
Andrew Tridgell a6b3d4217c DataFlash: fixes for INS API change 2013-12-09 17:34:06 +11:00
Andrew Tridgell eb883fbb0c DataFlash: added Log_Write_IMU2() for logging 2nd INS sensors 2013-12-09 17:34:06 +11:00
Randy Mackay ef2597a626 DataFlash: rename Log_Write_SERVO to Log_Write_RCOU 2013-11-27 20:17:41 +09:00
Andrew Tridgell 825b360fb0 DataFlash: added RCIN and SRVO log methods 2013-11-26 09:04:43 +11:00
Andrew Tridgell 3262022195 DataFlash: print FMT messages for wrapped logs
this ensures we have FMT messages in every log, even if the log was
wrapped and the FMT messages were overwritten
2013-11-09 11:09:42 +11:00
Andrew Tridgell 1fb636d57f DataFlash: added APM time and GPS velz to logged GPS messages 2013-11-04 21:37:10 +11:00
Andrew Tridgell 5e915fbde3 DataFlash: added timestamp to IMU and VelZ to GPS logging
both are very useful for analysis
2013-11-04 21:21:42 +11:00
Andrew Tridgell 4e82a8e1d4 DataFlash: use const ins reference
save some pointer dereferences
2013-11-04 21:21:42 +11:00
Andrew Tridgell d7a9888e26 DataFlash: updates for new GPS API 2013-10-24 14:22:47 +11:00
Andrew Tridgell 99a8ba4634 DataFlash: fixed display of last page of flash logs 2013-10-03 12:21:08 +10:00
Andrew Tridgell 89f121ea77 DataFlash: wait for blocks to finish writing to flash on log read 2013-10-03 12:21:08 +10:00
Andrew Tridgell 7de47931a8 DataFlash: use %f not %.6f 2013-09-21 15:48:39 +10:00
Randy Mackay 4b18c670e3 DataFlash: explicitly print floats to 6 dec places
C++ default is to print 6 decimal places but nuttx displays none by
default
2013-09-20 22:13:02 +09:00
Andrew Tridgell 469736e6bc DataFlash: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell 411e940342 DataFlash: prevent the dataflash erase problem
only allow writes to dataflash block devices once StartNewLog() has
been called
2013-05-14 16:31:45 +10:00
Andrew Tridgell 0242d50ad4 DataFlash: added Log_Write_Message()
useful for logging general messages
2013-05-03 09:18:14 +10:00
Andrew Tridgell 709a277c7f DataFlash: chamged FMT message to include labels
this makes it easier for MP to parse and display
2013-04-23 19:46:22 +10:00
Andrew Tridgell 844e1b9ef9 DataFlash: added support for printing flight mode as a string
makes analysing logs easier.

Pair-Programmed-With: Randy
2013-04-20 15:17:49 +10:00
Andrew Tridgell 62f190ed15 DataFlash: simplify code now that copter is converted
no longer need as many public functions
2013-04-20 13:52:37 +10:00
Andrew Tridgell cf0c8331c2 DataFlash: use print_latlon() 2013-04-20 13:52:36 +10:00
Andrew Tridgell c29d870497 DataFlash: dump the format of logs at the start of the log 2013-04-20 13:52:36 +10:00
Andrew Tridgell 916e8d0992 DataFlash: new dataflash logging system
this allows us to remove the display functions in the vehicle code,
and also allows us to store the format of a log file in the log. It
also stores the parameters used in a flight, rather than the
parameters set at the time the log is dumped
2013-04-20 13:52:36 +10:00
Andrew Tridgell da5a5ea368 DataFlash: added file based 'dataflash' logging 2013-04-17 21:32:53 +10:00
Andrew Tridgell a7541e9ad3 DataFlash: report log number when starting a new log
helps with test sketch
2013-03-15 07:30:23 +11:00
Andrew Tridgell 7b524d15fa DataFlash: added log_num to dump interface
this will be used by the file oriented logging code
2013-03-01 07:18:25 +11:00
Andrew Tridgell c52ef80f06 DataFlash: added Block layer in classes
this will allow the addition of a DataFlash_File implementation of the
DataFlash API which will store logs in a traditional filesystem. That
will align better with the PX4 design, and be more useful for fast
transfer of logs to a host computer
2013-03-01 07:18:25 +11:00
Andrew Tridgell 0ffcffa81c DataFlash: fixed signed/unsigned errors in API 2013-03-01 07:18:25 +11:00
Andrew Tridgell 9b551f162c DataFlash: make the public interface much narrower
make many variables private, to simplify interface ready for PX4
2013-03-01 07:18:25 +11:00
Andrew Tridgell 20825cc903 DataFlash: removed the byte and word based interfaces
simplifing ready for PX4 flash logging
2013-03-01 07:18:25 +11:00
Andrew Tridgell c6b006cf5f DataFlash: move log reading logic into common library 2013-01-15 14:03:51 +11:00