Giter Club home page Giter Club logo

wegre's Introduction

weg_re-code

uav analysis requirements

conda create -n uav-analysis-env
conda activate uav-analysis-env
conda install ipython numpy pandas seaborn matplotlib
pip install pyulog

deltaquad drone data conversion

The raw log data from the deltaquad UAV comes in ehe .ulg format (https://dev.px4.io/v1.9.0_noredirect/en/log/ulog_file_format.html)

Deltaquad recommended FlightPlot https://github.com/PX4/FlightPlot/releases/download/0.3.2/flightplot.jar.zip to to convert to .kml format, but this does not work. Also displaying does not seem to work

pyFlightAnalysis (https://github.com/Marxlp/pyFlightAnalysis) works for displaying.

installing pyFlightAnalysis

at least on ubuntu,the steps in the repo are not sufficient (dependency problems)

conda create -n deltaquad-env
conda activate deltaquad-env
conda install -y ipython
pip install pyqtgraph==0.10.0
pip install  pyOpenGL pyulog matplotlib numpy
pip install PyQt5
pip install simplekml
git clone https://github.com/Marxlp/pyFlightAnalysis.git
python setup.py install

then start the tool with typing

analysis

pyulog

https://github.com/PX4/pyulog/blob/master/README.md pyulog is a command line tool for inspecting and converting .ulg files. Installation: follow installation of pyFlightAnalysis, then it is automatically installed.

most important commands

ulog2csv ifile -o outdir

converts to (multiple) .csv files

ulog2kml ifile -o ofile

converts to kml file

Command Line Scripts

below info from the README of pyulog.

All scripts are installed as system-wide applications (i.e. they be called on the command line without specifying Python or a system path), and support the -h flag for getting usage instructions.

The sections below show the usage syntax and sample output (from test/sample.ulg):

Display information from an ULog file (ulog_info)

Usage:

usage: ulog_info [-h] [-v] file.ulg

Display information from an ULog file

positional arguments:
  file.ulg       ULog input file

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Verbose output

Example output:

$ ulog_info sample.ulg
Logging start time: 0:01:52, duration: 0:01:08
Dropouts: count: 4, total duration: 0.1 s, max: 62 ms, mean: 29 ms
Info Messages:
 sys_name: PX4
 time_ref_utc: 0
 ver_hw: AUAV_X21
 ver_sw: fd483321a5cf50ead91164356d15aa474643aa73

Name (multi id, message size in bytes)    number of data points, total bytes
 actuator_controls_0 (0, 48)                 3269     156912
 actuator_outputs (0, 76)                    1311      99636
 commander_state (0, 9)                       678       6102
 control_state (0, 122)                      3268     398696
 cpuload (0, 16)                               69       1104
 ekf2_innovations (0, 140)                   3271     457940
 estimator_status (0, 309)                   1311     405099
 sensor_combined (0, 72)                    17070    1229040
 sensor_preflight (0, 16)                   17072     273152
 telemetry_status (0, 36)                      70       2520
 vehicle_attitude (0, 36)                    6461     232596
 vehicle_attitude_setpoint (0, 55)           3272     179960
 vehicle_local_position (0, 123)              678      83394
 vehicle_rates_setpoint (0, 24)              6448     154752
 vehicle_status (0, 45)                       294      13230

Display logged messages from an ULog file (ulog_messages)

Usage:

usage: ulog_messages [-h] file.ulg

Display logged messages from an ULog file

positional arguments:
  file.ulg    ULog input file

optional arguments:
  -h, --help  show this help message and exit

Example output:

ubuntu@ubuntu:~/github/pyulog/test$ ulog_messages sample.ulg
0:02:38 ERROR: [sensors] no barometer found on /dev/baro0 (2)
0:02:42 ERROR: [sensors] no barometer found on /dev/baro0 (2)
0:02:51 ERROR: [sensors] no barometer found on /dev/baro0 (2)
0:02:56 ERROR: [sensors] no barometer found on /dev/baro0 (2)

Extract parameters from an ULog file (ulog_params)

Usage:

usage: ulog_params [-h] [-d DELIMITER] [-i] [-o] file.ulg [params.txt]

Extract parameters from an ULog file

positional arguments:
  file.ulg              ULog input file
  params.txt            Output filename (default=stdout)

optional arguments:
  -h, --help            show this help message and exit
  -d DELIMITER, --delimiter DELIMITER
                        Use delimiter in CSV (default is ',')
  -i, --initial         Only extract initial parameters
  -o, --octave          Use Octave format

Example output (to console):

ubuntu@ubuntu:~/github/pyulog/test$ ulog_params sample.ulg
ATT_ACC_COMP,1
ATT_BIAS_MAX,0.0500000007451
ATT_EXT_HDG_M,0
...
VT_OPT_RECOV_EN,0
VT_TYPE,0
VT_WV_LND_EN,0
VT_WV_LTR_EN,0
VT_WV_YAWR_SCL,0.15000000596

Convert ULog to CSV files (ulog2csv)

Usage:

usage: ulog2csv [-h] [-m MESSAGES] [-d DELIMITER] [-o DIR] file.ulg

Convert ULog to CSV

positional arguments:
  file.ulg              ULog input file

optional arguments:
  -h, --help            show this help message and exit
  -m MESSAGES, --messages MESSAGES
                        Only consider given messages. Must be a comma-
                        separated list of names, like
                        'sensor_combined,vehicle_gps_position'
  -d DELIMITER, --delimiter DELIMITER
                        Use delimiter in CSV (default is ',')
  -o DIR, --output DIR  Output directory (default is same as input file)

Convert ULog to KML files (ulog2kml)

Note The simplekml module must be installed on your computer. If not already present, you can install it with:

pip install simplekml

Usage:

usage: ulog2kml [-h] [-o OUTPUT_FILENAME] [--topic TOPIC_NAME]
                [--camera-trigger CAMERA_TRIGGER]
                file.ulg

Convert ULog to KML

positional arguments:
  file.ulg              ULog input file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_FILENAME, --output OUTPUT_FILENAME
                        output filename
  --topic TOPIC_NAME    topic name with position data
                        (default=vehicle_gps_position)
  --camera-trigger CAMERA_TRIGGER
                        Camera trigger topic name (e.g. camera_capture)

Convert ULog to rosbag files (ulog2rosbag)

Note You need a ROS environment with px4_msgs built and sourced.

Usage:

usage: ulog2rosbag [-h] [-m MESSAGES] file.ulg result.bag

Convert ULog to rosbag

positional arguments:
  file.ulg              ULog input file
  result.ulg            rosbag output file

optional arguments:
  -h, --help            show this help message and exit
  -m MESSAGES, --messages MESSAGES
                        Only consider given messages. Must be a comma-
                        separated list of names, like
                        'sensor_combined,vehicle_gps_position'

mavic drone flight data conversion

more info here: https://mavicpilots.com/threads/mavic-flight-log-retrieval-and-analysis-guide.78627/

(part of) the mavic drone data (internal sensors etc) are logged on the phone that was used as a controller. It is stored as .dat files, and can be converted and displayed with this tool: https://datfile.net/CsvView/downloads.html runs as java application on linux and mac, and as binary on windows. when the DJI pilot app is used, the data is on the phone under /Phone/DJI/com.dji.industry.pilot/MCDatFlightRecords/

there are also .txt files under /Phone/Android/data/com.dji.industry.pilot/files/DJI/com.dji.industry.pilot/FlightRecord$ , but they seem to be encrypted

mavic drone android apps

the app that is probably best for is is the DJI Pilot app. It is, however, buggy. on my private phone it did not work from the playstore, and I had to install it manually from the dji website. on my KC-phone I could install it, but the map would not display at first. However, after entering manual flight mode once, the map also showed in Mission Flight mode. With this app one can plan flights ahead, but it seems relatively limited. another potential alternative would be Litchi https://flylitchi.com/

wegre's People

Contributors

sipposip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.