Difference between revisions of "Data Logger"

From PaparazziUAV
Jump to navigation Jump to search
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=Introduction=
=Introduction=


This page describes various onboard external devices called a "Data logger", that can be connected to the Paparazzi autopilot.  
This page describes various '''onboard''' external devices called a "Data logger", that can be connected to the Paparazzi autopilot.  


Such a Data Logger device can be used to store telemetry data to a storage medium on board the aircraft. Such a storage medium can be an SD card or a Flash chip.  For now logging is '''not''' done directly by the autopilot itself as the usage of a file system as well as possible lag you might get with a SD storage speed does not fit well with the real-time nature of Autopilots.
Such a Data Logger device can be used to store telemetry data to a storage medium on board the aircraft. Such a storage medium can be an SD card or a Flash chip.  Logging can eventually be done by the autopilot itself if it is using a (RT)OS and can eventually handle a file system without interfering with the control and navigation tasks.


Note that not all loggers accept SD HighCapacity(SDHC) cards as storage
Note that not all loggers accept SD HighCapacity(SDHC) cards as storage
Line 11: Line 11:
One would naturally first ask; why on on-board logger when we have data over the air?
One would naturally first ask; why on on-board logger when we have data over the air?


The answer to this is multi-fold; Sometimes it is not possible to log everything over the air because of speed, lag and datavolume limitations of data send wireless over the air. Or one needs to log when there is no telemetry at all in long distance flight. Or one want to log all the RAW IMU data to debug specific scenarios.
The answer to this is multi-fold; Sometimes it is not possible to log everything over the air because of speed, lag and volume limitations of data send wireless over the air. Or one needs to log when there is no telemetry at all in long distance flight. Or one want to log all the RAW IMU data to debug specific scenarios.


To solve this issue, there are various loggers that can be connected to your Paparazzi Autopilot board. A short overview can be found on this page.
To solve this issue, there are various loggers that can be connected to your Paparazzi Autopilot board.


=Available Data logger options=
=Available Data logger options=


==[[twoga-Logga|TWOGA-Logga]]==
There are numerous logging solutions, both with their pro's and con's; here the options:
==[[twoglogdedicated|An dedicated TWOG board for logging]]==
==[[Openlog|Openlog]]==


There is also direct support for the Sparkfun [http://www.sparkfun.com/products/10216 Logomatic V2.6] board,
==* [[SDLogger_SPI_Direct|SD Logger SPI Direct]]==
==* [[Micro_logger|Micro Logger]]==
==* [[file_logger|File Logger (Parrot Drones)]]==
==* [[Apogee/v1.00#On-board_Data_Logging|On-board data logger for Apogee autopilot]]==
==* [[Openlog|Openlog]]==
==* [[twoga-Logga|TWOGA-Logga]]==
==* [[twoglogdedicated|An dedicated TWOG board for logging]]==


==Software==
=Storage format=


Just use
A more unified method of storing data on the logger, [[Messages_Format#Telemetry_storage_format_for_data_logger|info available here]]
 
conf/airframes/logomatic.xml
 
Currently autopilot data must be collected on UART0 for [[Data_Logger#Decoding|sd2log]] to work [20:40, 9 August 2012 (UTC)]
 
= Option 4: OpenLog =
If you don't want to add a complete TWOG or full-blown LPC-Board to you setup you can also use the Sparkfun [http://www.sparkfun.com/products/9530 OpenLog] board.
Take a look at .
 
== UART Connection ==
The two serial inputs LPC_RXD0 (J7) and RXD1 (J2) are used to receive data. The received data is not forwarded to TX0/1 by software (the UART TX pins are deactivated). If the logger is put in between Tiny and the modem the connection should be done with a wire so that a logger failure does not cause any data link issue.
 
== I2C Connection ==
tbd
 
== SPI Connection ==
tbd
 
== Configuration ==
The logger is defined just like an aircraft. Take the
 
conf/airframes/logger_sd.xml
 
as example. You can enable one or both UARTs for logging and have to set the serial speed
 
<configure name="UART0_BAUD" value="B9600" />
<configure name="UART1_BAUD" value="B9600" />
 
The message type can be switched between the PPRZ and the XBEE format
 
<configure name="LOG_MSG_FMT" value="LOG_PPRZ"/>
''or''
<configure name="LOG_MSG_FMT" value="LOG_XBEE"/>
 
The SD card can either be connected to SPI0 or SPI1
 
<configure name="SPI_CHANNEL" value="0" />
''or''
<configure name="SPI_CHANNEL" value="1" />
 
Now create a new A/C with the logger airframe. Although they will not be used, you still need to supply dummy files for Flight Plan, Settings, Radio and Telemetry.
 
== Decoding ==
The telemetry is written in the Paparazzi .tlm [[Messages_Format|format]] that adds a timestamp to each message. The logger starts with 00000000.TLM in the main folder of the SD and increases the number with each log session. Already used numbers will not be overwritten. This data can be converted back to the Paparazzi .log and .data format using sd2log (make sure [[Installation#Environment_Variables|environment variables]] are set before running pprz programs from the commandline)
 
me@home:~/media/usbstick$ ~/paparazzi3/sw/logalizer/sd2log 00000002.TLM
Renaming produced file ...
09_08_13__20_55_03_SD.data file produced
09_08_13__20_55_03_SD.log file produced
09_08_13__20_55_03_SD.tlm file saved
 
It creates timestamps from the .tlm and changes the filename to the take-off time if a GPS message with correct time was available in the file or the current local PC time if no GPS was available. The .log file will be re-created either from the current configuration (if still in existence) or the MD5-labeled files that are stored in var/conf each time you build an aircraft. All resulting files are stored in var/logs with an _SD extension.
 
= Option 5: [SDLogger_SPI_Direct|SD Logger SPI Direct]=
= Option 6: [Micro_logger|Micro Logger]=
 
https://wiki.paparazziuav.org/wiki/Messages_Format#Telemetry_storage_format_for_data_logger


[[Category:Hardware]] [[Category:Software]] [[Category:User_Documentation]]
[[Category:Hardware]] [[Category:Software]] [[Category:User_Documentation]]

Latest revision as of 03:48, 25 January 2018

Introduction

This page describes various onboard external devices called a "Data logger", that can be connected to the Paparazzi autopilot.

Such a Data Logger device can be used to store telemetry data to a storage medium on board the aircraft. Such a storage medium can be an SD card or a Flash chip. Logging can eventually be done by the autopilot itself if it is using a (RT)OS and can eventually handle a file system without interfering with the control and navigation tasks.

Note that not all loggers accept SD HighCapacity(SDHC) cards as storage

Why Onboard

One would naturally first ask; why on on-board logger when we have data over the air?

The answer to this is multi-fold; Sometimes it is not possible to log everything over the air because of speed, lag and volume limitations of data send wireless over the air. Or one needs to log when there is no telemetry at all in long distance flight. Or one want to log all the RAW IMU data to debug specific scenarios.

To solve this issue, there are various loggers that can be connected to your Paparazzi Autopilot board.

Available Data logger options

There are numerous logging solutions, both with their pro's and con's; here the options:

* SD Logger SPI Direct

* Micro Logger

* File Logger (Parrot Drones)

* On-board data logger for Apogee autopilot

* Openlog

* TWOGA-Logga

* An dedicated TWOG board for logging

Storage format

A more unified method of storing data on the logger, info available here