CorradoMotta / ASV_interface

Repository to store progress on the ASV interface development
0 stars 0 forks source link

Bathymetry #31

Closed CorradoMotta closed 2 years ago

CorradoMotta commented 2 years ago

Issue:

Having the possibility to display the bathymetry while the vehicle is moving. It should be possible to set a range (e.g. 0-10 meters). Then the colors from light blue to dark blue will be displayed according to it. Values above 10 meters will take the highest possible value.

CorradoMotta commented 2 years ago

To dynamically change the color we use hsva representation from Qt with the following values:

For more color combinations refer to this guide The hue value is then passed as a role in the model representation of the circles on the map. Such value should be related to the depth value from the sensor.

Next steps:

CorradoMotta commented 2 years ago

We decided to add a graph as well to show the bathymetry in that way as well. Still have to make the steps outlined in the previous comment. Set Depth range should also set the chart range accordingly.

CorradoMotta commented 2 years ago

The formula for conversions are:

if combined and considering MIN_DEPTH always equal to zero: finalValue = newValue / MAX_DEPTH * (hueMax - hueMin) + hueMin

with MIN_DEPTH: finalValue = ((newValue - MIN_DEPTH) / (MAX_DEPTH -MIN_DEPTH)) * (hueMax - hueMin) + hueMin

CorradoMotta commented 2 years ago

Steps:

  1. Convert to minus values
  2. Move abstractlistmodel to C++
  3. Add the possibility to adapt min and math depth range during runtime
CorradoMotta commented 2 years ago

All steps are done.

What is missing:

CorradoMotta commented 2 years ago

Also adding play stop cancel and save icons

CorradoMotta commented 2 years ago

All done.

The next commit is used solely for Viareggio and should be tested there.

CorradoMotta commented 2 years ago

Errors found during fieldwork:

CorradoMotta commented 2 years ago

Rebasing to main and fixing issues reported above..

CorradoMotta commented 2 years ago

All done. Closing issue.