Round off instead of round down for track recording distance

Andrew Heard shared this idea 2 months ago
Declined

If I have a track distance of 900m with a track recording profile of {dist} the file name will be 0, as in zero metres. This is because the distance is either rounded down or truncated to an integer. Not much of an issue for longer distances but for walking I think it is more useful to round off the track recording distance for the file name.

Replies (6)

photo
1

You're generally right, but rounding up can be just as nonsensical. I often record very short tracks (50–300 m) for OSM corrections or as markers for myself, and if these are always displayed as 1 km, it would be silly.


Ideally, at least one decimal place should be displayed for distances below 1 km. Otherwise, it's no big deal, as you can edit the track title.

This comment is in trash! Restore
photo
1

I think you are discussing rounding "up". I agree your example would be silly.


rounding off:

0..0.4 is rounded down to 0

0.5..0.9 is rounded up to 1

or "roughly" anyway

This comment is in trash! Restore
photo
1

Okay, a translation problem. In German, there are "aufrunden" (rounding up?), "abrunden" (rounding down?) and (kaufmännisch) runden (rounding?), what you suggest and would be the best here.


Currently, Locus always makes "abrunden". 🙂

This comment is in trash! Restore
photo
photo
1

Hi guys,

not so easy to solve. My internal formatter respects user-defined units (km, miles) and current solution simply ignore (not round down!) values below 1 km/mile. Values below 1 km/miles should be otherwise formatted as 900m etc.

To be true, I would rather let it me. Have you recorded 1 km? No 😊

This comment is in trash! Restore
photo
1

Hi Menion, as I wrote, I often record such short distances for specific purposes.

But since I don't necessarily need the distance in the title or can edit it if necessary, nothing needs to be changed as far as I'm concerned.

This comment is in trash! Restore
photo
photo
1

Am happy to let it be. I had a track of 950m & seemed silly the filename was 0 (km). I could modify the filename manually for the small # times it happens. Was just wondering.

This comment is in trash! Restore
photo
1

But a 2.8km track --> {dist}=3. Correct. A special case for {dist}<1?

This comment is in trash! Restore
photo
photo
1

@Andrew Heard: "Am happy to let it be"
@Graf Geo: "nothing needs to be changed"

That's all I need to read :).

For me, it would be somthing like
if unit.isImperial && distance < 1 mile ...
else if unit.isNautical && distance < 1 nMile ...
else ... 😥

This comment is in trash! Restore
photo
1

you'd think special & unnecessary exception handling code, more maintenance, issues like discussed, oh well, thanks anyway

This comment is in trash! Restore
Leave a Comment
 
Attach a file