Commit Graph

668 Commits

Author SHA1 Message Date
Michael du Breuil 52ddaa3e72 DataFlash: POS.RelOriginAlt should be NaN if unknown 2017-07-18 21:21:17 +01:00
Peter Barker f6a09d0657 DataFlash: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Peter Barker c1264cf60a DataFlash: Use GCS_Dummy GCS singleton 2017-07-07 16:18:37 +01:00
Peter Barker 7b3db490be DataFlash: correct examples 2017-06-29 15:43:39 +01:00
Peter Barker 4dfdffde43 DataFlash: move should_log check of log bitmask into DataFlash 2017-06-29 15:26:27 +01:00
ebethon 526d5a4c44 DataFlash: Add SBP EXT_EVENT Message 2017-06-29 15:18:05 +01:00
ebethon 0b5dad33f2 DataFlash: Rename SBR1/SBR2 to SBRH/SBRM and change format
Add (sender_id, msg_len) in SBRM message
Add index/pages in SBRH/SBRM messages
Change format to integers to avoid GCS string parsing
Decrease data size in SBRH
2017-06-29 15:14:54 +01:00
Peter Barker ad17709390 DataFlash: handle knowledge of in_log_download in DataFlash 2017-06-27 03:10:43 +01:00
Peter Barker 305531952f DataFlash: move send-logs-via-mavlink code into DataFlash 2017-06-27 03:10:43 +01:00
Peter Barker cbbee995b6 GCS_MAVLink: move GCS_Logs into DataFlash directory 2017-06-27 03:10:43 +01:00
Peter Barker 5c19f09cd7 DataFlash: handle mavlink messages, not just remote-log-block-statuses 2017-06-17 15:07:48 +01:00
Peter Barker 6a03af8f3e DataFlash: make EnableWrites a frontend thing 2017-06-16 17:07:48 +01:00
Peter Barker 07e37281ef DataFlash: add a should_log method 2017-06-16 17:07:48 +01:00
Peter Barker 001d3a7118 DataFlash: correct consts on CardInserted 2017-06-16 17:07:48 +01:00
Peter Barker 244365767d DataFlash: remove DataFlash_Block and DataFlash_SITL 2017-06-16 13:52:45 +01:00
priseborough 798d5f85a2 DataFlash: Log EKF origin height 2017-06-14 12:44:41 +01:00
priseborough 4c08622a7c DataFlash: Add logging for EKF3 state variances 2017-06-14 12:44:41 +01:00
Pierre Kancir 914bc53100 Dataflash: fix shadowing of logstructure in SITL 2017-06-14 12:40:47 +01:00
Peter Barker af6eb4e41d DataFlash: remove unused NeedPrep function 2017-06-14 12:20:29 +01:00
Peter Barker 9fb4ac2143 DataFlash: update examples for init simplification 2017-06-14 12:20:29 +01:00
Peter Barker 91b62abfe5 DataFlash: simplify dataflash initialisation 2017-06-14 12:20:29 +01:00
Randy Mackay af7f4fef0a DataFlash: protect against large testRatio from EKF
This should be resolved in the EKF but for now this stops the floating point exception
2017-06-14 16:07:32 +09:00
Peter Barker b5029aad4f DataFlash: correct dataflash examples 2017-06-11 20:34:12 +01:00
Peter Barker cdd0397bbf DataFlash: check all backends for sensor health 2017-06-11 20:34:12 +01:00
Peter Barker 7221b0def2 DataFlash: StartUnstartedLogging replaces logging_started/start_logging 2017-06-11 20:34:12 +01:00
Peter Barker bd747006aa DataFlash: eliminate calls to manipulate _writes_enabled 2017-06-11 20:34:12 +01:00
Peter Barker 0be2e7962f DataFlash: create a WritesOK method for WritePrioritisedBlock 2017-06-11 20:34:12 +01:00
Randy Mackay 1409f0ca7e DataFlash: rename CURR/CUR2 to BAT/BAT2 2017-06-06 14:57:04 +09:00
Randy Mackay 26845cc66a DataFlash: add resting voltage and resistance to current logging
also log cell voltages in separate message
2017-06-06 14:57:04 +09:00
Peter Barker ac1484f60e DataFlash: clear format sent mask when backend starts new log 2017-05-01 19:16:47 +10:00
Andrew Tridgell 0a83281a29 DataFlash: added logging of actual sensor rates 2017-05-01 15:06:46 +10:00
priseborough 8ead9d6b19 DataFlash: Add logging of average EKF time step min/max 2017-04-29 11:03:44 +10:00
Andrew Tridgell 0ccb3a7688 DataFlash: added logging of timing statistics 2017-04-28 17:19:39 +10:00
Peter Barker 608d6d0a5f DataFlash: implement a printf-like Log_Write_MessageF method 2017-04-23 09:08:30 +10:00
karthik.desai 28a6ca7d75 Dataflash: add AP_Beacon logging 2017-04-22 10:54:59 +09:00
Michael du Breuil 3b6d348241 DataFlash: Log battery temperature and cell voltages 2017-04-19 14:17:24 +01:00
Eugene Shamaev a144e79a50 DataFlash: logging of AOA and SSA 2017-04-19 20:48:42 +10:00
Peter Barker 9324d8e251 Dataflash: emit io thread warnings much less frequently 2017-04-19 12:33:18 +09:00
Randy Mackay 0644314499 DataFlash: add visual odometry sensor logging 2017-04-19 11:04:40 +09:00
priseborough d2c89443df DataFlash: add logging for EKF body frame odometry fusion 2017-04-19 11:04:40 +09:00
Michael du Breuil 994790be0b Dataflash: Clamp GPS accuracy values 2017-04-17 11:37:22 +01:00
Andrew Tridgell e440d22003 DataFlash: log DCM and SITL quaternion too 2017-04-16 14:01:36 +10:00
Andrew Tridgell 732915d417 DataFlash: log quaternions for EKF
useful for tailsitters
2017-04-16 14:01:36 +10:00
Pierre Kancir 49c9e3c768 Dataflash: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Peter Barker 8bb051af44 DataFlash: DataFlash_MAVLink: add comment concerning locking 2017-04-12 13:42:46 +09:00
Peter Barker ac34405272 DataFlash: DataFlash_MAVLink: avoid races by taking semaphore 2017-04-12 13:42:46 +09:00
Peter Barker 9e436ec35c DataFlash: correct visibility 2017-04-12 13:42:46 +09:00
Peter Barker 25930e5bf3 DataFlash: remove unused DataFlash_MAVLink method 2017-04-12 13:42:46 +09:00
Peter Barker feb30b3b9b DataFlash: add mutex for WritePrioritisedBlock
Multiple threads attempt to write blocks; don't let
them interfere
2017-04-06 22:09:18 +10:00
Peter Barker 2fa97c9906 DataFlash: improve privacy aspects of instance variables 2017-04-06 22:09:18 +10:00
Peter Barker 3defe584e7 DataFlash: extract common labels and formats into defines 2017-04-05 19:16:21 +10:00
Peter Barker 510aa587ef DataFlash: add validation for logging structures 2017-04-04 20:03:33 +01:00
Peter Barker 2746edfd32 DataFlash: move Init from LogFile.cpp to Dataflash.cpp (NFC) 2017-04-04 20:03:33 +01:00
Peter Barker d3b442d8b6 DataFlash_MAVLink: remove dead comments 2017-03-31 15:02:14 +01:00
Peter Barker d8c475ad04 DataFlash: use override keyword on many methods 2017-03-31 15:02:14 +01:00
Andrew Tridgell 6c31a6982b DataFlash: added Log_Write_AttitudeView 2017-03-31 11:30:44 +11:00
Peter Barker 4cb43b1c27 DataFlash: correct repeated FMT logging bug 2017-03-30 20:19:15 +11:00
Francisco Ferreira ec5bbbd2d0
DataFlash: fix BAR2 and BAR3 message format after baro log struct changed 2017-03-30 00:42:10 +01:00
Michael du Breuil 16433cbf7a DataFlash: Log the ground temperature used for baro calculations 2017-03-28 11:25:46 +11:00
Randy Mackay 2f21e3b40c DataFlash: rename GPS3/GPA3 to GPSB/GPAB 2017-03-13 11:31:51 +11:00
priseborough a82b6929f1 DataFlash: Allow logging of blended GPS instance
Add GPS and GPA reporting for blended solution
Allow GPS library to manage reporting for the blended solution
2017-03-13 11:31:51 +11:00
Michael du Breuil ed359a5833 Dataflash: Add landing PID logging 2017-03-02 12:38:59 +11:00
Randy Mackay 2b43c6aeed DataFlash: log range finder orientation 2017-02-27 15:18:40 +09:00
Peter Barker 057819ccef DataFlash: zero-pad the number in the log filename
This helps with collating when reviewing log files

Closes #2212
2017-02-15 07:23:49 +11:00
Peter Barker 58d74230d5 DataFlash: correct error detection for asprintf 2017-02-15 07:23:49 +11:00
Michael du Breuil 31f1545223 DataFlash: Update for AHRS NED changes
Report both origin and home NED altitudes to the log file
2017-02-13 09:23:14 +11:00
Lucas De Marchi dd1646aefc DataFlash: remove dangling semicolon 2017-02-12 01:22:35 +00:00
priseborough a02a84560f DataFlash: log 3-state range beacon estimator states for EKF3 2017-01-27 16:57:42 +09:00
murata 1b2ea27a68 DataFlash: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell 0e14992b34 DataFlash: hide direct EK2/EK3 logging
should call Log_Write_EKF and let it choose the types
2016-12-19 08:07:14 +11:00
Andrew Tridgell b00ec26957 DataFlash: Add EKF3 and remove EKF1 2016-12-19 08:07:09 +11:00
priseborough fd8916ef38 DataFlash: fix Baro 3 labels 2016-12-18 10:28:04 +11:00
Randy Mackay d41467424b DataFlash: fix to suppressing comment for case fall through
no functional change
eclipse stops complaining if no-break is used in place of fall-through
2016-12-14 13:25:15 +09:00
priseborough 431a74e0b4 DataFlash: log range beacon fusion data 2016-11-30 17:56:53 +09:00
priseborough bbdf3982c6 DataFlash: remove Log_Write_EKF 2016-11-30 17:56:52 +09:00
Peter Barker bc45ab5409 DataFlash: add a heartbeat for the io thread in DataFlash_File 2016-11-29 15:14:09 -08:00
Peter Barker e11c276b35 DataFlash_File: stop trying to stuff a uint64_t into a uint32_t 2016-11-29 15:14:09 -08:00
Peter Barker 2c8a0a9123 DataFlash: rotate files when vehicle is disarmed 2016-11-28 09:42:09 -08:00
Peter Barker fc79fb4ab4 DataFlash: know about armed state of vehicle 2016-11-28 09:42:09 -08:00
murata ae927e1775 DataFlash: Adjust the return value to the type of the method.
DataFlash: Adjust the return value to the type of the method.
2016-11-22 10:07:16 -08:00
Lucas De Marchi c9eff28c44 DataFlash: add O_CLOEXEC in places missing it
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03:00
Lucas De Marchi 3ff965a0c0 DataFlash: remove infinite loop from loop() method
Remove the while() loop inside loop() method so the new signal handlers
correctly notify the mainloop to exit.

This makes SIGTERM/SIGINT work again.
2016-11-02 16:28:20 -02:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Murilo Belluzzo a91da2e803 DataFlash: Change ::bufferspace_available return type
from 'uint16_t' to 'uint32_t' to avoid overflow (possible in at least
two implementations: Block and File).
2016-10-27 14:24:11 +11:00
Murilo Belluzzo c112e1c889 DataFlash: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:24:10 +11:00
Francisco Ferreira 5a7f9a38fe DataFlash: fix RCIN and RCOU structure types 2016-10-26 10:10:19 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Peter Barker 64154feaef DataFlash: remove unused semaphore variables 2016-10-24 08:57:56 -02:00
Peter Barker 5dad8745d5 DataFlash: remove bogus function declaration 2016-10-24 08:57:55 -02:00
Randy Mackay 9722c3a1c3 DataFlash: fix logging of ekf core 2016-10-13 15:22:59 +09:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Peter Barker a10cde35f5 DataFlash: stop logging before filling SD card on PX4
Filling the SD card causes NuttX to have conniptions, including
data loss and failure to boot
2016-09-26 14:02:58 -07:00
Jonathan Challinger 25bee93fcc DataFlash: fix EKF5 message 2016-09-26 13:42:00 -07:00
Peter Barker 8f376944aa DataFlash: immediately restart logging after erasing logs 2016-09-19 17:57:59 +09:00
Peter Barker fce798bc7a DataFlash: avoid integer underflow
Thanks to mbelluzzo: f44b1b3556
2016-09-13 13:32:09 +09:00
Peter Barker 95d4475d45 DataFlash: avoid time going backwards in logs
WriteBlockCheckStartupMessages returned true if finished writing out
all startup messages.  However, that may have allowed the caller to
then write out their message - but the timestamp on that message would
almost certainly be lower than the messages we've just written out.
2016-09-13 13:32:06 +09:00
Peter Barker fd87a4f180 DataFlash: fix unused result warning 2016-08-25 15:53:47 +10:00
Peter Barker 8d253dec8e DataFlash: support for mavlink SENSOR message 2016-08-11 17:48:44 -03:00
Murilo Belluzzo e17fdb2aa9 DataFlash: Avoid null pointer dereference
Confirms that the loop successfully found a log structure before using it.

Should fix CID 126742
2016-08-03 00:02:19 -03:00
priseborough a8cd037f56 DataFlash: update to match revised EKF1 and EKF2 interface
Uses separate horz/vert position interfaces
2016-07-19 12:16:49 +10:00
Andrew Tridgell 6776f8ac76 DataFlash: fixed GPS2 log format 2016-07-18 09:19:05 +10:00
priseborough cc7caa27bc DataFlash: Use a unique struct for EKF2 logging 2016-07-09 15:57:35 +10:00
priseborough 772c719df3 DataFlash: log tracking error for active instance of EKF2 2016-07-09 15:57:35 +10:00
priseborough 00b66ddc07 DataFlash: Log EKF2 output predictor tracking data 2016-07-09 15:57:35 +10:00
Lucas De Marchi efb6b4c57e DataFlash: ifdef both __APPLE__ and __MACH__
This is how we do in other places and should mean that we are targetting
MacOS, not other apple products or other OSes using a mach kernel.
2016-07-07 12:41:51 -03:00
Randy Mackay 4bedc57cbe DataFlash: rename SBFE's Long field to Lng
This naming is consistent with the other GPS messages
2016-07-04 11:17:14 +09:00
Randy Mackay 032e834849 Dataflash: log rally points 2016-07-04 11:17:09 +09:00
Andrew Tridgell 4dcff15603 DataFlash: fixed typo 2016-07-01 15:35:45 +10:00
Leonard Hall a5bb3c206e Dataflash: Log rate to degrees 2016-06-24 17:17:16 +09:00
Andrew Tridgell a06e46a84c DataFlash: log 14 output channels in RCOU
unfortunately this means we need to shorten the column headers, but at
least this makes us consistent with RCIN
2016-06-06 15:14:28 +10:00
Tom Pittenger 3ed2fafefa DataFlash: Log new CUR2 entry for battery2 data 2016-06-02 16:59:16 -07:00
Tom Pittenger 43c7b4d518 DataFlash: do not log CURR.Throttle because it's already logged elsewhere 2016-06-02 16:59:07 -07:00
Tom Pittenger 7a397475af DataFlash: log POWR.vcc and Vservo as float in volts instead of int16 mV 2016-06-02 16:59:05 -07:00
Andrew Tridgell 38965f4617 DataFlash: fixed example build 2016-05-31 08:36:07 +10:00
Andrew Tridgell f02c8f732c DataFlash: fixed BAR2 format for drift offset 2016-05-28 15:08:46 +10:00
Andrew Tridgell d90a2f7deb DataFlash: added get_structures() API
used in Replay
2016-05-25 20:46:00 +10:00
Andrew Tridgell 1fd4cbffb2 DataFlash: update for changed AP_Airspeed API 2016-05-24 17:00:56 +10:00
Andrew Tridgell fde0652d81 DataFlash: use HAVE_PAYLOAD_SPACE() 2016-05-21 15:25:17 +10:00
Paul Riseborough 54213ad871 DataFlash: Improve reporting of normalised ekf2 magnetometer innovations
Report the maximum of the x,y,z axis
2016-05-21 15:13:52 +10:00
Paul Riseborough fcee82f9b2 DataFlash: extend ekf fault status reporting coverage 2016-05-21 15:13:51 +10:00
Tom Pittenger 32d51e346d DataFlash: optimize logging climbrate - call function one and reuse result 2016-05-17 18:59:14 -07:00
Rustom Jehangir 39fc17f384 DataFlash: Fix parameter description for param_parse.py 2016-05-16 11:09:31 +10:00
Tom Pittenger 38b7d7e1c6 DataFlash: log baro drift offset 2016-05-13 17:22:12 -07:00
Tom Pittenger d900988a23 DataFlash: Log airspeed.Use 2016-05-13 17:22:02 -07:00
Ricardo de Almeida Gonzaga dc7acdf03f DataFlash: Fix typos 2016-05-13 19:20:05 -03:00
Andrew Tridgell 202eb3af35 DataFlash: added imu_mask to Log_Write_IMUDT 2016-05-09 12:26:30 +10:00
Andrew Tridgell 8ca6ed54c5 DataFlash: added LOG_REPLAY and LOG_DISARMED parameters 2016-05-09 12:00:55 +10:00
Andrew Tridgell 5398283c9b DataFlash: fixed BAR2 and BAR3 log formats 2016-05-09 11:09:44 +10:00
Andrew Tridgell 2f4f38b85f DataFlash: log the last message sample time for GPS 2016-05-07 18:27:23 +10:00
Andrew Tridgell 679b43efc9 DataFlash: make timestamps in EKF messages all match 2016-05-07 18:27:22 +10:00
Andrew Tridgell 35c3adb1ad DataFlash: use caller supplied timestamps for sensor logging
used to support EK2_LOGGING=1
2016-05-07 18:27:22 +10:00
Andrew Tridgell 6aa02f06a9 DataFlash: use INS_USE to prevent logging of unused IMUs 2016-05-07 18:27:22 +10:00
Andrew Tridgell 9300092840 DataFlash: changed GPS ground course to float and add VV for GPA
more accurate replay
2016-05-07 18:27:21 +10:00
Andrew Tridgell 1bf057be45 DataFlash: log last update time in BARO msg 2016-05-07 18:27:21 +10:00
Andrew Tridgell d61ba14037 DataFlash: switched to float for GPS ground speed
same size and more precision
2016-05-07 18:27:21 +10:00
Andrew Tridgell d97074dc9d DataFlash: round baro temp to nearest centi-degree
makes replay logs a tiny bit closer
2016-05-07 18:27:20 +10:00
Andrew Tridgell 61da827c16 DataFlash: added sample timestamp to mag messages
allows for exact mag timings in replay
2016-05-07 18:27:19 +10:00
Andrew Tridgell 7ab1367ec4 DataFlash: removed logging of relative alt in GPS messages
not related to GPS and makes it impossible to do bit-identical replay
2016-05-07 18:27:18 +10:00
Andrew Tridgell 46f257fd9b DataFlash: convert Log_Write() to use a linked list
this saves some memory and means we don't need to know how many we
will need in advance
2016-05-07 07:21:16 +10:00
Andrew Tridgell 9a1cbff850 DataFlash: allow access to DataFlash instance as a static singleton 2016-05-07 07:21:16 +10:00
Peter Barker 11dd254498 DataFlash: Log_Write optimisations 2016-05-07 07:21:16 +10:00
Peter Barker cf15bb5f6e DataFlash: AllTypes example also covers Log_Write 2016-05-07 07:21:16 +10:00
Peter Barker b273514cf9 DataFlash: create example outputting all field types 2016-05-07 07:21:16 +10:00
Peter Barker 518fabe035 DataFlash: StopLogging method, virtual stop_logging on backends 2016-05-07 07:21:16 +10:00
Peter Barker 77dd170e03 DataFlash: Log_Write support
A generic logging method to avoid the need to set up a format and structures etc
2016-05-07 07:21:16 +10:00
Peter Barker 334af1ecd7 DataFlash: base class method for resetting state on log open 2016-05-07 07:21:16 +10:00
Peter Barker eea2d5dcb5 DataFlash_File: avoid integer wrap when checking minimum time 2016-05-07 07:21:15 +10:00
Lucas De Marchi fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Andrew Tridgell bcefb45e0a DataFlash: added DelaT to delta-angle logs 2016-04-26 15:50:29 +10:00
Randy Mackay 39560f9af8 DataFlash: remove unused num_format_types and _structures
resolves compiler warning
2016-04-23 23:06:26 -07:00