RP6conrad / ESP-GPS-Logger

GPS logger for Speedsurfing, based on ESP32 & Ublox M8N hardware.
MIT License
28 stars 16 forks source link

Distance screen improvements #17

Open prichterich opened 1 year ago

prichterich commented 1 year ago

I'm thinking about perhaps doing distance so I checked the distance screen for the first time. Several improvements are desirable:

  1. Always show distance in km (not meters). A precision of 0.1 is sufficient. In the test drive I did, the distance was shown in meters. After 10 km, the last digit overlaps with the "R" (for run distance).
  2. Replace run distance with battery percentage. Run distance rarely, if ever, makes sense when going for distance. But battery charge can be an issue when doing 10+ hour sessions. Seeing that battery gets low can be a reminder to take a break and charge the battery. Even a half hour charge at 0.5 A for 30 minutes can add a couple of hours of battery life. This is an issue for units with smaller batteries, but can also become an issue with large batteries when they get older. Here on Lake George, someone posts a 200+ km session almost every day.
  3. Consider a better layout, for example 2 lines with the same height, one for current speed and one for distance. Battery charge could be shown as an icon, like in older firmware versions, on the side. When doing distance, seeing total distance is just as important as current speed, and glasses or sunglasses may be quite dirty after a few hours on the water, making it hard to read smaller numbers.
Freezer-SD commented 1 year ago

Having a configurable active- and stat-screen with row/column definitions including sizes (discrete steps S/M/L) and a way to identify what text/graph/logo would go where would help everyone. It probably would need a separate screen config to be controlled from a HTML page that will show how the screen would look like.

The number of fonts and sizes are limited. Not sure how much space they are taking.

There is not yet a check, if the number of digits increases, it will be printed on the next line. It would be better to reduce the digits to prevent it from happening. Same is true for logos/icons, they have a fixed size, but a check to make it fit, once it is configurable, is needed.

Maximizing font size, reducing empty/white space will help most of us.

We could start to check the existing screen permutations and define what flexibility would be required to define these.

For some they will swap speed with distance, or alphas or nautical miles, whatever it is that you're trying to improve and will stimulate to push a bit more, longer...

Verzonden vanaf mijn Galaxy

-------- Oorspronkelijk bericht -------- Van: prichterich @.> Datum: 10-02-2023 06:55 (GMT+01:00) Aan: RP6conrad/ESP-GPS-Logger @.> Cc: Subscribed @.***> Onderwerp: [RP6conrad/ESP-GPS-Logger] Distance screen improvements (Issue #17)

I'm thinking about perhaps doing distance so I checked the distance screen for the first time. Several improvements are desirable:

  1. Always show distance in km (not meters). A precision of 0.1 is sufficient. In the test drive I did, the distance was shown in meters. After 10 km, the last digit overlaps with the "R" (for run distance).
  2. Replace run distance with battery percentage. Run distance rarely, if ever, makes sense when going for distance. But battery charge can be an issue when doing 10+ hour sessions. Seeing that battery gets low can be a reminder to take a break and charge the battery. Even a half hour charge at 0.5 A for 30 minutes can add a couple of hours of battery life. This is an issue for units with smaller batteries, but can also become an issue with large batteries when they get older. Here on Lake George, someone posts a 200+ km session almost every day.
  3. Consider a better layout, for example 2 lines with the same height, one for current speed and one for distance. Battery charge could be shown as an icon, like in older firmware versions, on the side. When doing distance, seeing total distance is just as important as current speed, and glasses or sunglasses may be quite dirty after a few hours on the water, making it hard to read smaller numbers.

— Reply to this email directly, view it on GitHubhttps://github.com/RP6conrad/ESP-GPS-Logger/issues/17, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXUAXPZOIBHLVNHFPUOCIIDWWXJ4ZANCNFSM6AAAAAAUXM3E2Y. You are receiving this because you are subscribed to this thread.Message ID: @.***>

prichterich commented 1 year ago

I noticed a bug in E_paper.cpp: if(Ublox.total_distance/1000,0<9999) Seems the line should read if(Ublox.total_distance/1000.0<9999) C always uses periods for the decimal point, not commas. Good example for mistakes that permissive languages like C or Perl allow that would be caught by the compiler in languages like Java, where using a comma here would be a syntax error.

prichterich commented 1 year ago

I modified the distance code to show total distance and time. Here is what my code now looks like:

       if(field==5){
            display.setFont(&FreeSansBold12pt7b);
            display.print("D ");
            display.setFont(&FreeSansBold18pt7b);
            if(Ublox.total_distance/1000.0 < 999)
            display.print(Ublox.total_distance/1000,0);//Total distance in meter, als test run_distance
            else
            display.print(Ublox.total_distance/1000000,1);//Total distance in km, als test run_distance
            display.setCursor(offset+130,24);
            display.setFont(&FreeSansBold12pt7b);
            display.print(" ");
            display.setFont(&FreeSansBold18pt7b);
            display.print(time_now);
            }
         if(field==6){

There's enough space to show 4 digits before the comma.

prichterich commented 1 year ago

The one thing that I'd like to see that's still missing for distance is a battery level indicator.

RP6conrad commented 1 year ago

This will be in the next update. I noticed that there was a bug in this comparison, but I did not know why. The bat indicator will be on the top right.

RP6conrad commented 1 year ago

Distance + bat level is now in SW 5.73