Code Monkey home page Code Monkey logo

blackbox-log-viewer's Introduction

INAV Blackbox Explorer

Main explorer interface

This tool allows you to open logs recorded by INAV's Blackbox feature in your web browser. You can seek through the log to examine graphed values at each timestep. If you have a flight video, you can load that in as well and it'll be played behind the log. You can export the graphs as a WebM video to share with others.

Installation

INAV Blackbox Explorer is distributed as standalone application.

Windows

  1. Visit release page
  2. Download app for Windows platform (win32 or win64 if present)
  3. Extract ZIP archive
  4. Run app from unpacked folder
  5. App is not signed, so you have to allow Windows to run untrusted application. There might be a monit for it during first run

Mac

  1. Visit release page
  2. Download app for Mac platform
  3. Extract ZIP archive
  4. Run application
  5. App is not signed, so you have to allow Mac to run untrusted application. There might be a monit for it during first run

Usage

Click the "Open log file/video" button at the top right and select your logged ".TXT" file and your flight video (if you recorded one).

You can scroll through the log by clicking or dragging on the seek bar that appears underneath the main graph. The current time is represented by the vertical red bar in the center of the graph. You can also click and drag left and right on the graph area to scrub backwards and forwards.

Syncing your log to your flight video

The blackbox plays a short beep on the buzzer when arming, and this corresponds with the start of the logged data. You can sync your log against your flight video by pressing the "start log here" button when you hear the beep in the video. You can tune the alignment of the log manually by pressing the nudge left and nudge right buttons in the log sync section, or by editing the value in the "log sync" box. Positive values move the log toward the end of the video, negative values move it towards the beginning.

Customizing the graph display

Click the "Graph Setup" button on the right side of the display in order to choose which fields should be plotted on the graph. You may, for example, want to remove the default gyro plot and add separate gyro plots for each rotation axis. Or you may want to plot vbat against throttle to examine your battery's performance.

Native app build via NW.js

Development

  1. Install node.js
  2. Change to project folder and run npm install.
  3. Run npm start to start.
  4. Run npm debug to build & run the debug flavor (optional).

App build and release

The tasks are defined in gulpfile.js and can be run either via gulp <task-name> (if the command is in PATH or via ../node_modules/gulp/bin/gulp.js <task-name>:

  1. Optional, install gulp npm install --global gulp-cli.
  2. Run gulp <taskname> [[platform] [platform] ...].

List of possible values of <task-name>:

  • dist copies all the JS and CSS files in the ./dist folder.
  • apps builds the apps in the ./apps folder [1].
  • debug builds debug version of the apps in the ./debug folder [1].
  • release zips up the apps into individual archives in the ./release folder [1].

[1] Running this task on macOS or Linux requires Wine, since it's needed to set the icon for the Windows app (build for specific platform to avoid errors).

Build or release app for one specific platform

To build a specific release, use the command release --platform="win32" for example. Possible OS'es are: linux64, win32 and osx64
--installer argument can be added to build installers for particular OS. NOTE: MacOS Installer can be built with MacOS only.

macOS DMG installation background image

The release distribution for macOS uses a DMG file to install the application. The PSD source for the DMG backgound image can be found in the root (dmg-background.png). After changing the source, export the image to PNG format in folder ./images/.

Flight video won't load, or jumpy flight video upon export

Some flight video formats aren't supported by Chrome, so the viewer can't open them. You can fix this by re-encoding your video using the free tool Handbrake. Open your original video using Handbrake. In the output settings, choose MP4 as the format, and H.264 as the video codec.

Because of Google Bug #66631, Chrome is unable to accurately seek within H.264 videos that use B-frames. This is mostly fine when viewing the flight video inside Blackbox Explorer. However, if you use the "export video" feature, this bug will cause the flight video in the background of the exported video to occasionally jump backwards in time for a couple of frames, causing a very glitchy appearance.

To fix that issue, you need to tell Handbrake to render every frame as an intraframe, which will avoid any problematic B-frames. Do that by adding "keyint=1" into the Additional Options box:

Handbrake settings

Hit start to begin re-encoding your video. Once it finishes, you should be able to load the new video into the Blackbox Explorer.

License

This project is licensed under GPLv3.

blackbox-log-viewer's People

Contributors

adrianmiriuta avatar alexeystn avatar avsaase avatar basdelfos avatar borisbstyle avatar breadoven avatar capnbry avatar digitalentity avatar dusking1 avatar dzikuvx avatar fedorcomander avatar garykeeble avatar giacomo892 avatar hydra avatar johnnyruz avatar jrussellsmyth avatar koffeinflummi avatar martinbudden avatar mcgivergim avatar mikeller avatar mmosca avatar pawel-spychalski avatar rav-rav avatar rtlopez avatar spatzengr avatar stefanfeederle avatar steveamor avatar stronnag 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

Watchers

 avatar  avatar  avatar  avatar  avatar

blackbox-log-viewer's Issues

Cannot view logs from FC

iNAV 4.1.0
iNAV BlackboxExplorer 4.0.0 (do not see a newer version)
FC = Lumenier LUX-H7-HD
Logging works. Must remove SD card to retrieve logs. This happened last version and a minor version update to iNAV 4.1.0 or iNAV BlackboxExplorer fixed the issue.
Any additional data available upon request, happy to provide, just tell me what you looking for...
Regressed iNAV and Betaflight to see if was working in previous versions and it was. No hardware change, just new iNAV versions.

Can not check the noise

When I click "View / hide analyser"
There is nothing. No any response.

My log file is from onboard data flash chip.

PID_Sum not read from log

The attached LOG is sourced on Inav 3.0.2

On BBox 3.4.0 -> PID_Sum fields are populated correctly.
On BBox 4.0.0 -> PID_Sum fields are shown as (NaN).

LOG00062.TXT

Thanks

cutoff filters bugged

I set the yaw cutoff filter to 200hz but after BlackBox file check it's standing on 2hz

image

Cannot play any video on Linux

When trying to load any video, I get "could not play this video, try Chrome". While it's odd that a desktop app asks me to try Chrome, I think this is actually not a video issue (it happens with many formats), but a path issue, because of the following steps:

  1. I click "open video".
  2. I select "/tmp/myvideo.mp4".
  3. "Video could not be loaded, try Chrome".
  4. I click "open video" again.
  5. The dialog box says "_tmp_myvideo.mp4".

I think the explorer tries to sanitize the path and then can't find the video at the sanitized location, so it fails.

Yaw heading displaying over 360 degrees

I've got some strangeness going on with yaw heading readings in the log viewer:

Yaw heading reads up to about 430 degrees and then jumps to 70 degrees whilst rotating, so it appears to be displaying an offset of 70 degrees.

I have attached a 1/1 log of the issue, the log involves taking off, yawing 360 one way and then the other before landing.
I have been viewing it with mag and heading graphs.

blackbox_log_2017-10-14_104719.TXT

FrSky telemetry shows correct heading readings, OSD recording of test flight shows correct headings and iNav configurator shows correct headings: by correct I mean the compass moves smoothly through all normal (0-359) readings whilst rotating.
As far as I can tell the compass is calibrated:

INAV/SPRACINGF3 1.7.3 Oct 4 2017 / 18:19:22 (974440df)
align_mag = DEFAULT
mag_hardware = HMC5883
mag_declination = -30
magzero_x = 104
magzero_y = -191
magzero_z = -47
mag_calibration_time = 30

I have been debugging possible interference issues with the on-board compass and finding these readings in blackbox log viewer threw me a bit.

I wasn't sure where to post this but as the telemetry and MSP driven OSD seemed sane I thought that it might be a viewer issue or a case of bad calibration.
I have tried to re-calibrate the compass a few times but the issue has persisted.

Graph Setups Lost When BB Viewer Closed

When more than 1 graph is setup and a single graph selected to view, the other graph setups are lost if Blackbox is closed with the single graph view still selected. You have to close the single graph view and return to the all graph view before closing Blackbox in order to save all the graphs that have been setup so they are available the next time BB Viewer is run. Export Workspaces doesn't seem to work so it's not possible to save graph setups.

Would be good if this could be fixed to avoid having to setup graphs again if you forget to deselect single graph view.

Heading (yaw) is shown sometime randomic

Looking at logs, heading (yaw) values are randomic for some flight.
When ok, yaw heading shows a 70 (about) degrees offest added value to the range 0-360.
Many flights analyzed, always same behaviour.

Note (may help) : inav Mag configuration is not 0, it is cw 270 flip.
Setup:
FC mateksys F722-STD + magnetometer and gps
InavFlight 2.6.1
Inav log viewer 3.4 (bot Linux and Win32)

Any idea ?

Alfredo

Frequency axis on Analyzer view shows infinite frequency

The frequency axis in the analyzer view shows infinite frequency. I am using the latest release version of iNav7 and the Blackbox log viewer available at the time of posting. The data from iNav appears valid and I can do the FFT and plot in Octave, so this seems to be a problem with the blackbox log viewer.

image

Variable name mismatch

I think there might be a mismatch in some parameters' name, between INAV and "INAV - Blackbox Explorer".
For instance:

  • in inav source file blackbox.c there is this line

        BLACKBOX_PRINT_HEADER_LINE("min_throttle", "%d", motorConfig()->minthrottle)
    
  • while in the "INAV - Blackbox Explorer" flightlog_parser.js file one finds

      case "minthrottle":
              that.sysConfig.minthrottle = parseInt(fieldValue, 10);
    

In other words inav's blackbox writes "min_throttle" in the header, while the viewer expects "minthrottle".

There are other parameters with the same problem.

Show navPos[2] value

Could be neat is we can display the navPos[2] value in meters inside the brackets so it can be directly compared with baro.

image

Incorrect frequencies on analyser graph

When gyro task runs at different frequency than pid task, the frequencies on the analyser graph are shown incorrectly.

The following log was captured with 8k gyro loop and 4k pid loop. The oscillation period on gyro is ~7ms (~150Hz). The analyser shows peak at 4x lower freq (~38Hz):

LOG00008-gyro8k-pid4k.TXT

When using 8k gyro loop and 2k pid loop the peek was shown at 2x lower freq (~77Hz).

INAV Black Box 4.0 Analyzer Could not read valid Hz in its x Axis for INAV 5.0

Current Behavior

BB Spectrum Analizer fail to read INAV 5.0 bb txt file. And showed "infiniteHz" in its x axis.

DSC_0072

Steps to Reproduce

  1. Transfer log0001. txt file to pc
    2.open with INAV BB viewer 4.0
  2. Open Analyzer graph

Expected behavior

Valid x axis frequency reading

Suggested solution(s)

Improve INAV Bb for 5.0

Additional context


  • FC Board name and vendor: KakuteH7
  • INAV version string: 5.0 RC3

INAV blackbox-log-viewer runs but will not open log files

INAV blackbox-log-viewer downloaded today 28 Dec 2018 starts in Chrome browser, allows me to select a log file to open but does not open it, does nothing !, no error messages etc..
Log files tried are 2,857KB and 10,096KB recorded yesterday on SDcard using MATEK F722 STD running v2.0.1
CHROME says I'm running latest version, Version 71.0.3578.98 (Official Build) (64-bit), on Win7 PRO on Intel i5
Assistance most welcome :-)
Thanks Steve

image

Blackbox Explorer uses 32 bit value for timestamp, truncates after ~71 minutes of log

Long Blackbox log files seem to be recorded correctly in INAV. However, Blackbox Explorer (v3.4.0 tested) apparently uses a 32 bit value in an internal time representation, and apparently with 1uSec time quanta hits the limit of the 32 bit value and truncates the log at about 71 minutes. An older "Cleanflight" version does not show this issue. It is not yet clear if mwptools is OK.

BB Explorer should use 64 bit timestamps, that's gotta be good until we get much better batteries.

Attached is a sample log that in fact is about 140 min of runtime but shows up at ~71 min.
2021-04-03_140_min_decimated_200_blackbox_log_2021-04-03_204321.LOG

Note that this log file was recorded with blackbox_rate_denom=200 to drop the sample rate down to about 5Hz so that the log would fit into the small-ish FC dataflash.

save Workspace is a json filled with nulls

Is this function implemented? If so, what is its purpose?
Before I close a BB log session I save the workspace, hoping that it saves log to video offset but the file generates is a null json

{
"graphConfig": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
}

Missing field encoding header for field #0 'GPS_fixType'

Got confused and originally posted to the cleanflight repo even though I am using the INAV blackbox log viewer.. so I'm reposting to the appropriate repo.

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.

rcCommand mapped to dps

rcCommand is mapped to dps, while should stay unitless. This creates confusion. Either map rcCommand to dps or remove unit

navPos[0], navPos[1], tgtNavPos[0], tgtNavPos[1] always 0

Looking at logs, gps latitude and longitude are not shown, cannot find any value representing horizontal position.
Many flights analyzed, always same behaviour.

Setup:
FC mateksys F722-STD + magnetometer and gps
InavFlight 2.6.1
Inav log viewer 3.4 (bot Linux and Win32)

Any idea ?

Alfredo

Unable to open spectrum analyser

I'm using the latest blackbox explorer (9333f41).

When I open a log file everything is fine, however the "View/hide analyser display" doesn't seem to work at all. When clicked, the window is not shown and the icon doesn't turn yellow.

Did it change? It used to work for me some time ago...
I'm on mac (if it matters), latest chrome.

Unable to open log file

I downloaded the latest version and tried to open a file. Nothing happens, there is no message. I've tried several other log files.
I can open the file with the Cleanflight/Blackbox-log-viewer just fine.

Altitude should be on the same Y scale (i.e. navPos[2](m) and baro (m))

current state:
Debugging altitude issues is quite hard as the navPos[2] seems to be on a different Y-scale as the baro(m).

Here for example the readings are almost identical, but the lines are not close to eachother
Bildschirmfoto 2020-06-17 um 14 08 08

A few seconds later, barometer reads 56m, so I would expect the green line higher than the red navPos[2].
Bildschirmfoto 2020-06-17 um 13 58 56


expected behaviour:

It should more look like this (data exported and graphed), the red bar marks the same second/altitude as in the BBE above:
Bildschirmfoto 2020-06-17 um 13 59 10


version:

  • iNav 2.4
  • BBE 3.4.0

Can’t launch the app on macOS BigSur

I was trying to launch the latest release of the app on macOS BigSur. Unfortunately, the app is not opening. I can see the app menu in the top bar but when trying to open a file app closes. I was opening the app considering that it was not signed.

Export video doesn't honor the graph zoom scale

Explorer 5
Telemetry data from inav 5.1

I have tried exporting a graph over video and it seems that the graph data is NOT zoomed or un-zoomed according to the display setting.

This results in a video where the graph data moves too quickly, losing some of its overall impact. It would be nice if it was more what you see on the display is what gets rendered in a video.

blackbox-explorer 3.2.0 linux64 filechooser crash

Application crashes while trying to load a logfile with following message:
ERROR:render_process_host_impl.cc(4723)] Terminating render process for bad Mojo message: Received bad user message: FileChooser: The default file name should not be an absolute path ERROR:bad_message.cc(27)] Terminating renderer for bad IPC message, reason 123

It happens only on the second file you try to load within blackbox explorer

No "start log here" button in Blackbox Explorer

I am trying to sync my video with the blackbox data stream and the instructions in the Syncing your log to your flight video section refer to a "start log here" button for which there is none.

Feature Request:Please add time and date entry as shown in the attached picture.

If possible,please add time and date to the multiple entries inside a log file.For example i have a one log file that i copied from my internal flash which contains multiple entries from different flying sessions from different days.It would be nice if the entries can reflect the actual date and time when Flight controller added that entry to the log file.Thanks
log2

"Error opening log"

Blackbox problem: "Error opening log: No logs in this file could be parsed successfully"
INAV Blackbox Explorer version v3.3.0
FC - Matek F405ctr
Changing the recording speed modes: 100/88/80/75/67/50 /% ... etc., as well as replacing the SD card and reformatting it, did not solve the problem.
Replacing the flight controller with a similar one did not solve the problem.
Plasmatree / PID-Analyzer - crash when trying to open a log file.
Your cakes are inedible gentlemen! It's time to start cooking normal food)))
LOG00001.TXT

Inflight adjustments shown wrong in blackbox explorer

Hi,

Blackbox done with Inav 3.0.1 shows the wrong inflight adjustment. The value is right but the name of the setting is wrong. See attached image.

I was tuning pitch P, roll P, roll D, pitch D and got: Yaw I, Pitch I, rate profile, roll rate

image

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.