Meshtastic-Android icon indicating copy to clipboard operation
Meshtastic-Android copied to clipboard

[Feature Request]: intelligent prefixes for large values in Environment Metrics

Open bergie opened this issue 3 months ago • 11 comments

Contact Details

No response

Tell us your idea.

Right now environment metrics always uses "small" units (mm for distance, mA for current). If these values are larger (say, distance over 1000mm, or current over 1000mA), it would make sense to go to the base units themselves (so, 1m, 1A).

This occurs for instance when getting boat telemetry from signalk-meshtastic. Here's what I currently see from my boat node for instance:

Image

Here it would make much more sense to say:

  • Current 18.2A
  • Distance 32.1m

Unrelated to this issue (more to #2611) km/h is also not commonly used for wind speed. Most European weather forecasts would use m/s, or for marine or aviation weather, knots).

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

bergie avatar Sep 02 '25 17:09 bergie

This is broken out to #3028

Government of Canada weather app. ![Image](https://github.com/user-attachments/assets/bcca9d83-1fb1-413b-b101-6d4bc6290763)

I believe hPa was chosen as it doesn't require the addition of a decimal point for every reading but still conveys the same data as kPa.

b8b8 avatar Sep 02 '25 18:09 b8b8

hPa was likely used as it uses same values as the old millibars. I have to admit never seeing kPa in a weather forecast! But in the end that's still the same unit, just with a different prefix.

Here's a typical Finnish forecast using m/s

![Image](https://github.com/user-attachments/assets/aa012988-e10a-4b68-bc27-45ec4f28eceb)

BBC seems to default to mph (of all things!)

![Image](https://github.com/user-attachments/assets/acac82d3-e824-42a3-a3c8-8b553c195837)

However, the wind speed issue isn't really what I'm talking about here, but instead the usage of the wrong metric prefixes for large values. Maybe we should have a separate ticket for making wind units configurable? Here's the relevant settings in the Orca CoPilot marine navigation app

![Image](https://github.com/user-attachments/assets/47a7dd09-2b9f-4e7e-adb6-10c6d64b736a)

bergie avatar Sep 02 '25 19:09 bergie

@NeimadTL This might be something for you to look at if you think you can handle it. Most of the other tickets in here at the moment are pretty deep, or have the potential to be unfortunately

DaneEvans avatar Sep 08 '25 23:09 DaneEvans

@DaneEvans , thank you, appreciate it a lot. If you could give a little hint about where to look at (e.i, the file(s) to change), that will be great!

NeimadTL avatar Sep 09 '25 11:09 NeimadTL

@DaneEvans , thank you, appreciate it a lot. If you could give a little hint about where to look at (e.i, the file(s) to change), that will be great!

@NeimadTL, all the necessary information is available. If you are genuinely interested and capable of contributing, please proceed. The developers here are busy donating their time to development and are not available for one-on-one assistance.

jamesarich avatar Sep 09 '25 11:09 jamesarich

So, the Screen is the NodeDetails screen, The "Environment" heading can probably be found by a string of that name.

But, what you really should do is add a function to the utils file, where our other conversions (toFarenheit etc) are, Which can handle SI prefixes and return a sensible string or prefix.

Probably means passing in the current prefix value (-3 for m ) and the value, and then doing the prefix conversion. But see what you come up with.

Also read the readmes, and contributor files to help you get through the linters etc.

DaneEvans avatar Sep 09 '25 12:09 DaneEvans

@DaneEvans , thank you, appreciate it a lot. If you could give a little hint about where to look at (e.i, the file(s) to change), that will be great!

@NeimadTL, all the necessary information is available. If you are genuinely interested and capable of contributing, please proceed. The developers here are busy donating their time to development and are not available for one-on-one assistance.

Totally fair and understood.

NeimadTL avatar Sep 09 '25 12:09 NeimadTL

So, the Screen is the NodeDetails screen, The "Environment" heading can probably be found by a string of that name.

But, what you really should do is add a function to the utils file, where our other conversions (toFarenheit etc) are, Which can handle SI prefixes and return a sensible string or prefix.

Probably means passing in the current prefix value (-3 for m ) and the value, and then doing the prefix conversion. But see what you come up with.

Also read the readmes, and contributor files to help you get through the linters etc.

Appreciate it, thanks.

NeimadTL avatar Sep 09 '25 12:09 NeimadTL

Haven't forgot it @DaneEvans, I'm just a Kotlin/Android newbie and trying to juggle a lot. I'd appreciate it if you leave it for me please. Thanks.

NeimadTL avatar Oct 28 '25 13:10 NeimadTL

@NeimadTL Perfect. I was just reopening it to make sure it didn't get lost.

Theres' a few other tickets that might be suitable for you - #3287 , #3396 look small on scope, and fairly easy. Although they may not be if you get in and have a look.

I know this one is going to be a bit tricky, although it's definitely well defined and contained.

DaneEvans avatar Oct 28 '25 13:10 DaneEvans

Perfect 🤩, appreciate that a lot, thanks.

NeimadTL avatar Oct 28 '25 14:10 NeimadTL