Code Monkey home page Code Monkey logo

bbl2kml's Introduction

flightlog2x

Overview

A suite of tools to generate beautiful annotated, animated KML/KMZ files (and other data) from inav blackbox logs, OpenTX log files (inav S.Port telemetry, some support for OpenTX logs from Ardupilot), BulletGCSS and Aurduplot .bin logs. Also supports MW XML mission files and geospatial elements from CLI diffs (safehome, fwapproach and future geozone).

INAV Fight Mode layer

FlightModes

RSSI layer

RSSI

Efficiency layer

Efficiency

Point Annotation

Annotation

Statistics

$ bbsummary /t/inav-contrib/LOG00031.TXT
Log      : LOG00031.TXT / 1
Flight   :  on 2021-05-24 14:07:28
Firmware : INAV 2.6.1 (5510259e) OMNIBUSF4PRO of May  7 2021 14:19:33
Size     : 29.48 MB
Altitude : 113.0 m at 10:34
Speed    : 20.8 m/s at 07:24
Range    : 4461 m at 08:08
Current  : 7.4 A at 00:05
Distance : 12170 m
Duration : 14:05
Disarm   : Switch

Documentation

User Guide & Installation Instructions

Graphical User Interface

There is a graphical user interface for flightlog2kml. Binaries are provided for Linux (.deb). There may also be a Windows installer.

Other tools

The project includes the following:

  • flightlog2kml : Generate KML/Z from log files
  • fl2mqtt : Generate Bullet GCCS MQTT messages
  • fl2ltm : Generate (INAV) LTM (Lightweight Telemetry) messages
  • fl2sitl : Replay BBL via the INAV SITL (documentation). : fl2sitl can also provide a minimal simulator (no BBL needed) to enable the full use of the INAV SITL in the INAV configurator.
  • log2mission : Generate an INAV mission file from a flight log
  • mission2kml : General KML/Z from an INAV mission file (and optional CLI diff containing Safehome / FW Land data / (geozones))

For details in the User Guide & Installation Instructions.

bbl2kml's People

Contributors

stronnag avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

bbl2kml's Issues

Provide the capability to generate a mission from a flight log

Attached is a experimental log2mission that will take a supported flight log (Blackbox, OpenTX log, BulletGCSS log) and generate an inav mission file (MWXML). The generated log may then be edited in an inav mission planner (mwp, inav-Configurator, drone-helper etc.) and/or uploaded to the inav FC.

At the moment the whole log is considered (see below for some possible filter options) and the number of points generated is controlled by the opaque epsilon value. The default value seems to work for the very few logs tested to date. It may be that the default value gives to many or too few points. Decrease the value to increase the number of mission points.

Some ideas for future filters include:

  • Time offsets, start - end (where end can be from the end of log), e.g 1 minute from start to 30 seconds from end
  • Flight mode includes (e.g. 3D Cruise)
  • And an 'AND' combination of the above.

Suggestions for (a) filters and feedback (especially on outrageously different epsilon, i.e. outside of say (0.01 - 0.02)) and samples of logs where it fails to give any sort of sane result will be appreciated.

$ log2mission --help
Usage of log2mission [options] file...
  -epsilon float
    	Epsilon (default 0.015)
  -index int
    	Log index
  -interval int
    	Sampling Interval (ms) (default 1000)
  -rebase string
    	rebase all positions on lat,lon[,alt]
  -split-time int
    	[OTX] Time(s) determining log split, 0 disables (default 120)

log2mission 0.98-rc2, commit: 988f039/2021-04-07

The mission file is created in the current directory, name derived from the source file and flight index, e,g, a BBL file LOG00666.TXT with a single flight would generate LOG00666.1.mission

The archive below contains Linux x86_64 and Win32 binaries for log2mission.
fl2kml_0.98-rc2.tar.gz

kml has visibility off for every point

I've dumped a blackbox log to a kmz file and it worked great. However, the non-default Folder has every one of its points visibility set to false. This means when I load it up in earth.google.com/web/ it can't easily be toggled on and off. With just the default options, Flight Mode is visible, and RSSI has the no-eye (not visible) icon. Clicking the visible icon, nothing appears. If -rssi is added, then the flight mode exhibits this behavior but RSSI works. If -efficiency is added, then it matches the visibility of rssi (all disabled if Flight Mode is the default view, and usable if RSSI is the default view).
image

Looking at the code, it sets all the points visibility to the parent's visibility. Is there an issue that prevents it from being kml.Visibility(defviz)) but then addPoints(..., true) so that all the points are visible=true, but the Folder has the visibility set as it is now? Google Earth Web slows to a crawl if you try to enable each individual point, but works great just toggling the folder visibility.

Add option to extrude points to ground

Updated with better styling and proper style merging, so you can have f/s icon and extrude lines.

Not sure if I don't like this better than without the lines, OTOH, can always use BBL2KML_OPTS=--extrude

Damn, I now know more about KML than I ever thought I'd need to.

Originally posted by @stronnag in #10 (comment)

Mac, Linux, Windows binaries with this comment ... *-x3 includes --extrude in bbl2kml as well

bbl2kml-0.8.1-x3-macos.zip
bbl2kml-0.8.1-x3-linux-ia32.tar.gz
bbl2kml-0.8.1-x3-linux-x86_64.tar.gz
bbl2kml-0.8.1-x3-win32.zip

Decode ArduPilot OpenTX logs

For the benefit of pilots who can't remember which firmware they're flying, it would be convenient if the flightlog2kml could also decode OpenTX logs from ArduPilot.

cannont process datalog

image

get run time error index out of range on whatever inav log file tried

(using european win setting - comma is delimiter for decimals, can cause issues ?)

Any hints ?

Provide the capability to generate KML/Z view from a BulletGCSS log

It would be useful to have KML/Z generated from a BulletGCSS log (created either by the BulletGCSS webUI or mqttcap ) as a means of easily and visually identifying areas of poor GPRS coverage.

Not sure how well this will work in practice, as we can get rogue positions when the location and 3D fix are not in sync (particularly in areas of bad coverage, unfortunately); however is some logic to try and mitigate this.

If the log contains mission information, that is also added to the generated KML/Z.

Experimental Linux x86_64 and Win32 binaries in the archive attached to this issue (dev branch commit c563583)
fl2kml_0.98-rc1.tar.gz

altitude visualization

Hi Jonathan,

Great piece of software again. Works beautifully.
Hope you don't mind me some nitpicking....

I fly in pretty flat surroundings (NL), but still happend to notice some strange behaviour.
I flew a WP mission, with long stretches of same altitude, but when plotting the mission, I noticed the track seemed to follow the landscape elevation below.
Although the actual landscape is flat, the reported elevation in google earth seems to pick up treetop hights occasionally, so it shows some 'hill', while there is actually nothing below (just a small wooded area).

The mission was flown at mostly 75 meter, and in the dot description, it is reported as precisely 75 meters, but still the dot's are drawn slightly higher / lower, following the ground elevation below.

iNav reported highed is relative to launch elevation, but somehow, google earth shows if following the landscape elevation while in fact it flew constant elevation.

If I plot the same flight, from the OTx log, and show it in google earth (using openTx companion logviewer), it shows a nice even elevation, but consistantly below the BBL/kmz file.

elevation

I'm guessing, google earth plots the points relative to ground level ?
Perhaps we'll have to plot them absolute, and recalculate each point elevation, to the ground elevation at the arming point (not current position) ?
Also, use the arming elevation, not the (safe)home point (which, btw, is shown correctly)

the -elev options didn't seem to make any difference.

Using windows 10, iNav 2.5.1 (older flightlog), MatekF722

BTW, it would be nice if you could add a (grey) ground track below.

Anyway, a very nice tools.... especially for flight outside of radio range (i.e. without OTx log).

attached, the 'offending' BBL file
LOG00074.TXT

[Feature Request] Wouldn't it be nice to have a GUI ...

Cross-platform GUIs are a pain in rear; cross-compiled more so. However:

  • GTK is available on Linux, MacOS, Windows (the latter two a bit flaky but doable)
  • Fyne is a cross-platform GUI pretty much where ever there is a Go compiler. Non-native, slightly ugly UIs but cross-compilable (which is important to me).
  • The codebase is sufficiently abstracted that maintaining three UIs (CLI, 2xGUI frameworks) is not difficult; and I'd prefer the to do the work if it means I get a nicer / native UI on open source platforms.

So the plan is:

  • The code base will support GTK and Fyne on Linux, MacOS and Windows
  • Binary releases will be GTK for Linux, Fyne for everyone else
  • If you want to build the GTK version for other platforms, you can. Instructions will be provided for MacOS and Windows.

GTK (Linux)

Screenshot-20210111172826-646x519

Fyne (on Linux, but same everywhere)

Work in Progress ... test data, needs to be wired up to the KML generator)
Screenshot-20210111174856-613x456

cannot process datalog (.TXT) w10 - Inav 6.1.1

Hello! I am trying to process the .txt running with flightlog2kml.exe and the pop-up window to process is not activated.
I have tried only with the blackbox decoder and I got the 4 files to see in googlemaps, but I can't process the TXT to get the KMZ.
I clarify that the .json file was edited with the // indicating the corresponding path.
I have even deactivated the antivirus in case that would be generating a problem, but on the other hand the other files could be generated by the decode.
windows 10 64 bit operating system
Inav 6.1.1
Thank you very much if you can help me
Screenshot_27
Screenshot_28

Decode raw smartport CRSF telemetry

Hi! I'm using opentx on a flysky i6x, which doesn't have SD card support, so there are no CSV files available. But we have telemetry mirror being output on the smartport, which in turn goes to the CrazyDude's Android app through bluetooth (HC-05).

Finally that app generates a .log binary file with the raw CRSF telemetry from ExpressLRS.

I couldn't find support for this decoding, how far do you think bbl2kml is from doing this?

Here's a feature request for basically the same: CrazyDude1994/android-taranis-smartport-telemetry#76

I may be able to help with this, but would have to check if it's easier here or in the Android app.

Thanks in advance!

[Feature Request] bbl2kml should offer an option to embed WP mission files

It would be nice if the mission file could be embedded in the KML for visualisation of WP missions, thusly:

Screenshot-20210101115621-601x198

All the parts exist:

  • mwptools' mission2kml.rb
  • impload Golang mission file processing and conversion

The only problem is that misison files are relative to home altitude rather than above the terrain at the way point, however mwptools' Mission Elevation / Terrain Analysis tool already has some techniques solve this.

So it should be just an integration / porting exercise. In progress.

[Feature Request] Generate ground track

In addition to the elevated flight points, it would be useful to have an (optional) ground track. Single colour (grey). As suggested in #8, separate issue so it's not forgotten.

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.