Pixhawk的飞行日志由固件中的sd2log模块记录在SD卡的log文件中,目前版本的格式为*.px4log(曾经是*.bin),根据sd2log的设置不同,包含飞行日志的文件夹的名字可能是sess***或者具体日期时间。
sd2log:
sd2log在pixhawk固件中是标准启动的,如果需要单独启动,可在sd卡的中建立一个etc文件夹,并在里面建立一个extras.txt文件,然后通过以下不同的设置对sd2log记录的方式进行修改。
Sdlog2的基本用法:
sdlog2 {start|stop|status|on|off} [-r ] [-b ] -e -a -t -x
-r Log rate in Hz, 0 means unlimited rate
设置记录的频率,0为不限,最好不要用,会占据很多cpu时间
-b Log buffer size in KiB, default is 8
设置缓存大小,默认为8KB,
-e Enable logging by default (if not, can be started by command)
开机自动开始记录,如果没有自动开始记录,仍然可以通过命令开始
-a Log only when armed (can be still overriden by command)
只有arm后才开始记录,可以通过命令更改。
-t Use date/time for naming log directories and files
用日期和时间命名日志文件夹和文件
-x Extended logging
拓展记录,可以记录更多的数据
例1:如果想在arm后以16KB缓存100Hz速率记录数据,并以时间命名文件和文件夹,则可以在extras.txt中添加以下命令:
sdlog2 stop
sdlog2 start -r 100 -b 16 -t -a
例2:如果想在开机后以8KB缓存50Hz速率记录拓展数据,则可以在extras.txt中添加以下命令:
sdlog2 stop
sdlog2 start -r 50 -e -x
支持的日志类型:
To open a log just drop file to FlightPlot window or use the toolbar button Open Log or menu item File→Open Log…. APM and PX4 log formats are almost compatible, FlightPlot will autodetect format and handle it as needed.
FlightPlot's plot area can contain multiple graphs. To make plotting more flexible, raw data from the log can be processed before plotting. Processors can filter or combine various data, e.g. calculate ground speed as speed = sqrt(GPS.VelN^2 + GPS.VelE^2). For now, you can choose one of the existing processors. Future versions will add an interface for custom processors.
To add a processor click the Add button in Plot section and select the title and type of processor. (See below for descriptions of currently available processors). Each processor has some parameters, e.g. Fields to select fields to display and Scale to scale output.
A list of available fields can be opened by clicking the Field List button on the toolbar. Processor for selected fields can be added quickly with Add button.
The current set of plots with their parameters can be saved to a preset. To add a preset just write a name for it into the Preset combo box and press Enter. When changing a preset, it's name in the combo box becomes gray. Select the combo box and press Enter again to save your changes.
Presets can be imported and exported using the menu item File→Import Preset…/File→Export Preset…. Preset files contain data in JSON format and can be edited by hand.
Note that presets are independent from source files, i.e. if you open another file, all presets and current set of plots will remain.
ZoomingInteresting parts of the plot can be zoomed in by dragging a rectangle from top-left to bottom-right using the mouse. Drawing a rectangle in another direction will reset the zoom to fit all data. The mouse wheel can be also used for zooming.
ProcessorsThe following processors are currently available:
FlightPlot lets you export your flight as tracks in the following formats:
Split track by flight mode
Outcome depends on the export format:
Further options
欢迎光临 5iMX.com 我爱模型 玩家论坛 ——专业遥控模型和无人机玩家论坛(玩模型就上我爱模型,创始于2003年) (http://bbs.5imx.com/) | Powered by Discuz! X3.3 |