Code Monkey home page Code Monkey logo

blackbox-tools's Introduction

Cleanflight

Cleanflight

Build Status Build Status

Cleanflight is flight controller software for multi-rotor and fixed wings. The Cleanflight project, and related projects are used on the majority of flight controllers used around the world. There is no other software used on as many flight-controllers!

Features

Cleanflight has the following features:

  • Multi-color RGB LED strip support (each LED can be a different color using variable length WS2811 Addressable RGB strips - use for Orientation Indicators, Low Battery Warning, Flight Mode Status, Initialization Troubleshooting, etc)
  • DShot (150, 300, 600 and 1200), Multishot, and Oneshot (125 and 42) motor protocol support
  • Blackbox flight recorder logging (to onboard flash or external microSD card where equipped)
  • Support for targets that use the STM32 F7, F4 and F3 processors
  • PWM, PPM, and Serial (SBus, SumH, SumD, Spektrum 1024/2048, XBus, etc) RX connection with failsafe detection
  • Multiple telemetry protocols (CSRF, FrSky, HoTT smart-port, MSP, etc)
  • RSSI via ADC - Uses ADC to read PWM RSSI signals, tested with FrSky D4R-II, X8R, X4R-SB, & XSR
  • OSD support & configuration without needing third-party OSD software/firmware/comm devices
  • OLED Displays - Display information on: Battery voltage/current/mAh, profile, rate profile, mode, version, sensors, etc
  • In-flight manual PID tuning and rate adjustment
  • Rate profiles and in-flight selection of them
  • Configurable serial ports for Serial RX, Telemetry, ESC telemetry, MSP, GPS, OSD, Sonar, etc - Use most devices on any port, softserial included
  • VTX support for Unify Pro and IRC Tramp
  • and MUCH, MUCH more.

Installation & Documentation

Support

Your first place for support are the Cleanflight forums on RCGroups

The Github issue tracker is NOT for end-user support.

Support and Developers Channel

There's a dedicated Slack chat channel for cleanflight here:

http://cleanflight.com/slack/

Etiquette: Don't ask to ask and please wait around long enough for a reply - sometimes people are out flying, asleep or at work and can't answer immediately.

Videos

There is a dedicated Cleanflight YouTube channel which has progress update videos, flight demonstrations, instructions and other related videos.

https://www.youtube.com/playlist?list=PL6H1fAj_XUNVBEcp8vbMH2DrllZAGWkt8

Please subscribe and like the videos if you find them useful.

Configuration Tool

To configure Cleanflight you should use the Cleanflight-configurator GUI tool (Windows/OSX/Linux) which can be found here:

https://github.com/cleanflight/cleanflight-configurator/releases/latest

Contributing

Contributions are welcome and encouraged. You can contribute in many ways:

  • implement a new feature in the firmware or in configurator (see below);
  • documentation updates and corrections;
  • How-To guides - received help? Help others!
  • bug reporting & fixes;
  • new feature ideas & suggestions;
  • provide a new translation for configurator, or help us maintain the existing ones (see below).

The best place to start is the Cleanflight Slack (registration here). Next place is the github issue tracker:

https://github.com/cleanflight/cleanflight/issues https://github.com/cleanflight/cleanflight-configurator/issues

Before creating new issues please check to see if there is an existing one, search first otherwise you waste people's time when they could be coding instead!

If you want to contribute to our efforts financially, please consider making a donation to us through PayPal.

If you want to contribute financially on an ongoing basis, you should consider becoming a patron for us on Patreon.

Contribution of bugfixes and new features is encouraged. Please be aware that we have a thorough review process for pull requests, and be prepared to explain what you want to achieve with your pull request. Before starting to write code, please read our development guidelines and coding style definition.

TravisCI is used to run automatic builds

https://travis-ci.org/cleanflight/cleanflight

Build Status

Translators

We want to make Cleanflight accessible for pilots who are not fluent in English, and for this reason we are currently maintaining translations into 18 languages for Cleanflight Configurator: Català, Deutsch, Español, Euskera, Français, Galego, Hrvatski, Bahasa Indonesia, Italiano, 日本語, 한국어, Latviešu, Português, Português Brasileiro, polski, Русский язык, Svenska, 简体中文. We have got a team of volunteer translators who do this work, but additional translators are always welcome to share the workload, and we are keen to add additional languages. If you would like to help us with translations, you have got the following options:

  • if you help by suggesting some updates or improvements to translations in a language you are familiar with, head to crowdin and add your suggested translations there;
  • if you would like to start working on the translation for a new language, or take on responsibility for proof-reading the translation for a language you are very familiar with, please head to the Cleanflight Slack (registration here), and join the '#team_translation' channel - the people in there can help you to get a new language added, or set you up as a proof reader.

Releases

https://github.com/cleanflight/cleanflight/releases

Open Source / Contributors

Cleanflight is software that is open source and is available free of charge without warranty to all users.

Cleanflight is forked from Baseflight, Cleanflight was forked by Betaflight, Cleanflight is again forked from Betaflight.

Cleanflight 4.x -> betaflight 4.x -> Cleanflight v2.x -> Betaflight 3.x -> Cleanflight v1.x -> Baseflight -> MultiWii

Origins:

  • Alexinparis (for MultiWii),
  • timecop (for Baseflight),

Project Founders:

  • Dominic Clifton (hydra)

Significant contributors:

  • Boris B (borisbstyle)
  • digitalentity
  • Martin Budden (martinbudden)
  • Jason Blackman (blckmn)
  • Alexinparis (for MultiWii),
  • timecop (for Baseflight),
  • Sambas
  • Bardwell, Joshua (joshuabardwell)
  • ctzsnooze
  • Höglund, Anders (andershoglund)
  • Ledvina, Petr (ledvinap)
  • kc10kevin
  • Keeble, Gary (MadmanK)
  • Keller, Michael (mikeller)
  • Kravcov, Albert (skaman82)
  • MJ666
  • Nathan (nathantsoi)
  • ravnav
  • sambas
  • savaga
  • Stålheim, Anton (KiteAnton)
  • prodrone
  • ctn

And many many others who haven't been mentioned....

blackbox-tools's People

Contributors

fedorcomander avatar frank-buss avatar j4y4r avatar jpemu avatar ledvinap avatar mikeller avatar nathantsoi avatar sbman avatar stylesuxx avatar thenickdude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blackbox-tools's Issues

Use blackbox_decode with a .csv file

The log file produce by my Taranis is already a .csv file but I still want to be able to produce a .gpx file with the tool for displaying gps data on google earth.

But I can't figure how to make it work as the tool requires a .txt file ...

Dashware

Nick,
Is there any tools available to convert the current blackbox log to something Dashware can read? I couldn't get the old tools to open.

This is from the FAQ on dashware.net
I want to make my own data file. How can I make it work with DashWare?
Here are some notes on making a DashWare-friendly CSV data file:

-It’s good to have a static line of text at the top declaring that it is your data format. Something like “Some Cool Logger Data File”. The DashWare Data Profile for your format can then be easily set up to automatically detect one of your data files.
-We require a CSV header line: A line of text containing the column headers/names.
-Then the raw data lines would follow after that.
-There should be a Time column (full timestamps work great, e.g. “2011/08/07 20:10:02.200”, or the total running time in seconds e.g. “1.1”)
-Latitude and Longitude should be in +/- decimal degrees
-Be consistent with your data units, or at least change the column name when you use different units. DashWare can be used to create calculated data columns for other units.

You will then need to make a Data Profile that understands your format. Bring up the Data Profile Editor (File Menu > Edit Data Profiles…) and press F1 for detailed help. Tips:
-The column mappings (bottom right area of dialog) are used to map your column names to known DashWare data types. Set up the mapping for your time column first, so you can use the “Test File / View Data…” button. It is very handy. “ / Data Running Time, Seconds” is the mapping you need.
-To get a map to show up, you need to use our “Degrees to Cartesian Converter” (calculators/converters are in the bottom left area of dialog) to create X and Y units in feet. You must map these new X and Y output columns to our “Positional \ Longitude / X Position (Feet)” and “Positional \ Latitude / Y Position (Feet)” data types.

Have a look at an existing data profile, such as the GPX one, as an example.

blackbox_render fps parameter ignores fraction part

if one does call blacckbox_render with for example --fps=49.3 or --fps49,3 the result is the same as with --fps=49

could this be fixed? without this I need to make my video editing software create additional frames (or drop some if I instead would generate the blackbox pngs with 50 fps) which reduces the smoothness of the flow of the frames..

Feature Request: Output Tuning Values to Text File from blackbox_decode

When decoding log files from blackbox_decode it would be great if the PID tuning values used during that log were output to a text file (rather than having to keep a manual log for optimising tuning). I think they're already decoded as part of blackbox_render but that makes it difficult to batch-analyse files

Generic event logging

@thenickdude : What do you think about adding event header to blackbox protocol? It should be possible to reuse code for I-Frame, maybe without predictor

H Event 20 ID:Gtune result
H Event 20 name:axis,gyroP,newP
H Event 20 signed:0,1,1
H Event 20 predictor:0,0,0
H Event 20 encoding:0,0,0

And either add new encoding or use VB for log events ...

compute PID error and RC rate

blackbox_decode does not compute RC rate and PID error (for anyone interested in doing offline analyses on these). My current workaround is to load the log in explorer and save an csv file from there which contains these variables, so presumably they are computed in explorer. I am trying to do offline Matlab analyses on PID error, and it'd be less cumbersome, and easier to implement within Matlab scripts, if blackbox_decode did this.

Feature request: aircraft type

Change icon to different aircraft (at least the most common for inav: wing, plane) to match controls (1/2 motors and 2 to 4 servos)
It would be nice if naming will be changed on graph to, at least from motors to servos, even for motor channel

Wing icon as example with 1 motor and 2 servos. Servos should be not circles, but deflection up/down
image

feature request: Log start timestamp to output filename (logged by iNav 1.8+)

I have attempted here:
jelinj8@f2e005d
but that just prints the date to stderr.

suggestions:

  • Naming output files
  • fixed GPX output timestamps
  • optional timestamp column in output (e.g. for DashWare telemetry rendering)

My C++ is too rusty for that.

Header lines look like this:
H Firmware revision:INAV 1.9.1 (03a5c1922) MATEKF405
H Firmware date:Apr 21 2018 13:25:29
H Log start datetime:2018-05-04T18:17:08.376+00:00

Trouble is that the filenames (and files) are created before parsing the log. Probably renaming (replacing a placeholder) the files before memfreeing the filenames would be the simplest solution?

Increase max number of Logs in file

I use 'blackbox_decode' for retrieving GPS tracks from iNav logs.
Sometimes it happens that a single file contains more than 31 logs.
For this reason I increased constant FLIGHT_LOG_MAX_LOGS_IN_FILE.
Is there any reason why is it limited now? Could it be increased in next release?

#define FLIGHT_LOG_MAX_LOGS_IN_FILE 31

Thank you!

correct gpx time by absolute time of blackbox start

In gpx decoding the file only contains the relative timestamp from the beginning of logging. When there was a GPS Fix on Arm there is an absolute timestamp in the log in the ASCII Part (At least with inav)

Use that timestamp to correct gpx timestamps to be able to use the gpx to correlate with camera images with "gpxcorrelate".

Header of blackbox log file:

[...]
H Field S encoding:1,1,7,7,7,1
H Firmware type:Cleanflight
H Firmware revision:INAV 1.9.1 (03a5c1922) OMNIBUSF4PRO_LEDSTRIPM5
H Firmware date:Apr 21 2018 13:15:03
H Log start datetime:2018-06-16T13:10:49.264+00:00
H Craft name:
H P interval:1/1
[ ... ]

Only relative timestamps in gpx file:

<trk><name>Blackbox flight log</name><trkseg>
  <trkpt lat="52.3008762" lon="8.5960688"><ele>57</ele><time>2000-01-01T00:02:02.389080Z</time>

Bus error: 10

i got this error on 2 different logs, the decode had no errors.
other index on the same log worked.
why do i get it and how i prevent it in the future?

(i use a mac-mini with osx 10.10.4 and the tools 0.4.1)

Feature request: customisable graphs

Select graphs to draw by name. Group it. ((Name, data_name, data_name), (Name, data_name, data_name), (Name, data_name, data_name))

Something like (("Attitude", "atttitude[0], "attitude[1]"), ("RC Input", "RC Command [roll]", "RC Command [pitch]"))
In this case we will have two graphs (Attitude and RC Input). On first one w will have two lines ('atttitude[0]' and 'attitude[1]'), on second one two lines too (RC Command [roll], RC Command [pitch])

With such option we can draw any kind of graph we need for any king of aircraft

Deadlock while reading modern betaflight 3.2.2 file

Hi,

I have just upgraded my setup to betaflight 3.2.2, and now the blackbox-tools all seem to deadlock on my blackbox logs.
These logs were created on the SD card in an SPRacing F3 NEO board, used to work nicely with cleanflight in the past.

Even with the raw and debug-parameters the software just deadlocks and uses 100% CPU.
blackbox_render, blackbox_decode and the Chromium-webapp all show this behaviour.

https://screenshot.tbspace.de/xawdoshiczy.png
https://tbspace.de/content/downloads/LOG00008.BFL

Any ideas on what could be wrong with the new files? (i have 8 of these here, happens with all of them).

Thanks,
Tobias

(Enhancement)

I'm having trouble syncing HD Video to the BlackBox File. Is there any way to simplify this? I wish there was a way to movie the video separately and the BlackBox Log File separately so I can just sync them that way.

Feature request: acceleration output in Earth coordinate system

In blackbox_decode the acceleration out in done in controller coordinate system. It would be useful to have possibility to output accelerations in the Earth coordinate system, with gravity removed (az-1g).
It is done in what way in blackbox_render, so it should be quite simply.
All functions already exists in the code blackbox_render.
It is just a matter of output these values to .csv file by blackbox_decode.

Proposed command line switch for blackbox_decode:
--acceleration-csys acceleration output coordinate system (controller|Earth), default is controller

not able to run program

When i click on the application, the window pops up but then goes away, not sure what going on here

Units of angle in converted csv file

While converting *.BFL file to *.csv in the headers there are units of barometer (cm), rotational velocity in ex. (deg/s) and acceleration (m/s/s) if the units were selected by command line switches. But there in no command line switch to select units of attitude provided when --simulate-imu is activated.

The orientation angles are not raw values,, are in (deg). To have consistent file, the units of angle should be added to roll, pitch and yaw in headers

It is now:
accSmooth[0] (m/s/s) accSmooth[1] (m/s/s) accSmooth[2] (m/s/s) roll pitch heading

It should be:
accSmooth[0] (m/s/s) accSmooth[1] (m/s/s) accSmooth[2] (m/s/s) roll(deg) pitch(deg) heading(deg)

Converting CSV data to actual readings

Hi all, I am trying convert the decoded blackbox CSV data into actual conventional sensor readings that we are viewing on Blackbox explorer for my own analysis. Would like to ask if there are any guidelines on how I can do this?

Thanks in advance!

blackbox_render issue with large timestamps

I just tried the luxfloat PID controller and the blackbox-log of that flight can be decoded just fine, but the rendering shows a unchanging PID table, unchanging command inputs and missing all the lines of motor outputs and gyro.

blackbox_decode works just fine and produces a csv document that looks all right.

kaefert@mint ~/Downloads/quadcopter_stuff/blackbox-log/2015-08-09_1110 try luxfloat PID $ ~/Downloads/quadcopter_stuff/blackbox-log/blackbox-tools/obj/black
box_decode LOG00138.TXT 
Decoding log 'LOG00138.TXT' to 'LOG00138.01.csv'...

Log 1 of 1, start 43:28.366, end 45:53.195, duration 02:24.828

Statistics
Looptime           3504 avg           28.3 std dev (0.8%)
I frames    1292   51.2 bytes avg    66199 bytes total
P frames   40029   29.4 bytes avg  1175762 bytes total
H frames      12   11.0 bytes avg      132 bytes total
G frames     915   11.5 bytes avg    10523 bytes total
E frames       2    9.5 bytes avg       19 bytes total
Frames     41321   30.1 bytes avg  1241961 bytes total
Data rate  285Hz   8659 bytes/s      86600 baud

1 frames failed to decode, rendering 4 loop iterations unreadable. 6 iterations are missing in total (21ms, 0.01%)

kaefert@mint ~/Downloads/quadcopter_stuff/blackbox-log/2015-08-09_1110 try luxfloat PID $ ~/Downloads/quadcopter_stuff/blackbox-log/blackbox-tools/obj/black
box_render LOG00138.TXT 
4355 frames to be rendered at 30 FPS [2:26]

Rendered 500 frames (11.5%)...
Rendered 1000 frames (23.0%)...
Rendered 1500 frames (34.4%)...
Rendered 2000 frames (45.9%)...
Rendered 2500 frames (57.4%)...
Rendered 3000 frames (68.9%)...
Rendered 3500 frames (80.4%)...
Rendered 4000 frames (91.8%)...
Rendered 4355 frames (100.0%).

Missing field encoding header for field #0 'GPS_fixType'

Hi all, I am running a Lumenier F7 dual gyro f7 controller with the Matek F422SE firmware on INAV. I recorded a flight using the blackbox logger with a Beitian 880 GPS and compass module and tried to view the log. The explorer is unable to parse the data and returns the following error:
Missing field encoding header for field #0 'GPS_fixType'

WIth Blackbox decode tools I was able to get three files out, but they are very short and do not contain the logs.

Poor performance on Rpi3 ubuntu server

Hi,

I'm developing a bot that uses blackbox decode and the performance is really poor under this system. I understand that the HW used is not the best for this task, and using best hw will improve the way it works.

As i see on htop, the software is just using one core to perform the actions, I don't know if it will be possible to do something to improve runtime:

here is a capture of the htop command showing the cpu usage:

image

And the task itself:

image

as you can see, PID task 10052 is been running now for almost half an hour, when on a windows 10 system (it takes about 1 or 2 minutes top).

Is anything I can do? I've downloaded and compiled the code on the raspberry pi 3. Log file:

This is de log that i'm using to test it:

btfl_004.zip

Thanks.

blackbox-render: More options

A few more options would be nice:

  • Hide "Batt. cell" (bottom left corner)
  • Hide "Acceleration" (bottom left corner)
  • Change colors

New feature, 3 Axis G meter

It would be neat to have a 3 axis G meter. A peak hold indicator would be nice also. The most I have hit was 2.8 G's with KK2.0, F330. Thanks guys, BB is great!

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.