blackbox-log-viewer icon indicating copy to clipboard operation
blackbox-log-viewer copied to clipboard

Debug field graphs display with seemingly random scaling and position

Open etracer65 opened this issue 6 years ago • 7 comments

When comparing some debug fields to other normal fields in logs it's common that the scaling or position of the debug data seems to be chosen at random. Take this example:

screen shot 2018-06-03 at 5 06 26 pm

In this case the data in debug[0] is exactly the same scale and range as the data in rcCommand[roll]. The graph setup for this display is:

screen shot 2018-06-03 at 5 06 41 pm

In fact, even the data elements at the highlighted point are identical:

screen shot 2018-06-03 at 5 07 27 pm

But clearly in this case the scaling is different.

Additionally, it seems if there are multiple logs in the file it causes not only the scale to be incorrect but also offsets the debug values:

screen shot 2018-06-03 at 5 08 10 pm

I've also observed (but don't have repeatable steps) cases where adding or removing additional fields to the graph causing the debug values to change scaling or position. In some cases quitting and reopening the same log (with unchanged settings) will also change the display.

etracer65 avatar Jun 03 '18 21:06 etracer65

The Debug values must be added, one by one by each debug mode. If not, the blackbox explorer ignores what this debug value contains, so it shows the raw value but ignores the max or min, offset, etc.

To any debug mode, the "names" for the fields can be added in flightlog_fields_presenter.js and the scale, etc. in graph_config.js.

Take a look to it, or if you prefer, please give here the information for the debug mode (name, name of each debug field, units, value that contains) in an easy way that I can understand, attach one log file, and I will add it ;)

McGiverGim avatar Jun 04 '18 09:06 McGiverGim

I can do that, but perhaps we need a fallback for unknown debug_mode values? I run into this all the time when testing new code and add a debug_mode to see what's going on. Being able to able to align the data to other fields (even between debug 0 and debug 1 for example). In the end these fields may not ever make it into a PR.

etracer65 avatar Jun 04 '18 12:06 etracer65

Or maybe an option in the graph setup to "match" the offset/scaling of some other known field - just an idea. So if I know that I want to compare debug[0] to rcCommand[roll] I can match the scaling/offset because I know they have the same raw values.

etracer65 avatar Jun 04 '18 12:06 etracer65

What about creating a general "match function" that you can use to visually match scale of any two fields? Match the min and max value using the full length data of the two fields. Maybe this can also be extended to matching expo? Sure, you may match completely unrelated signals, but I just guess you'll have to use it with care.

wolkesson avatar Jun 15 '18 21:06 wolkesson

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

stale[bot] avatar Jul 15 '18 22:07 stale[bot]

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

stale[bot] avatar Aug 14 '18 23:08 stale[bot]

@etracer65: Marked as 'bug' to keep it open.

mikeller avatar Aug 15 '18 01:08 mikeller