Error when switching units (in swimming) from 'yards' to 'meters'

Error when switching units from ‘yards’ to ‘meters’ in swimming.

When I enter a number for distance and then change the units from ‘yards’ to ‘meters’ it changes the number from what was entered to an astronomical number. I did an experiment, and in particular

100 → 160934, so it is interpreting it as the number of meters assuming the number refers to number of MILES.

(100 miles = 160934 meters, or 1 mile = 1609.34 meters).

Ideally the number should not be changed at all…

Thanks for your attention to this. (I didn’t notice this the first time I entered a swimming number and I thought “WOW, that’s a lot of meters I swam!”) :wink:

I will try to keep you posted on what errors I find, although if you’re getting aggravated please let me know, as that is not the objective, and I don’t want to swamp you.

Aggravated? Never!! You are correct, that’s the system making a mistake with miles to meters to yards.

As you pointed out on the other thread, the log uses all metric and does conversions from there based on units. I’m aware of a few places where it uses the original units instead of the user’s desired ones, which is something I’m going to go through and harmonize.

For this glitch, it looks like it’s ignoring the input when the units are switched, but only at the very first. I think I must just be missing a setup step in the javascript. I’ll fix this early next week when I get back from my weekend trip. :slight_smile:

Sharp eyes, sir, thank you!

-Eric

Aggravated? Never!! You are correct, that’s the system making a mistake with miles to meters to yards.

As you pointed out on the other thread, the log uses all metric and does conversions from there based on units. I’m aware of a few places where it uses the original units instead of the user’s desired ones, which is something I’m going to go through and harmonize.

For this glitch, it looks like it’s ignoring the input when the units are switched, but only at the very first. I think I must just be missing a setup step in the javascript. I’ll fix this early next week when I get back from my weekend trip. :slight_smile:

Sharp eyes, sir, thank you!

-Eric

Thanks for the complement about sharp eyes, but it’s not deserved. I only caught it when it said I had done over 1,000,000 meters for my workout after posting. I thought, “Man, I’m GOOD!”, but then realized something was out of whack. :wink:

OK, Mike, I think I’ve got this one squashed. If not, I’ll need some very detailed steps to reproduce. I could before and I can’t get it to fail now. :slight_smile:

Thanks!

-Eric

OK, Mike, I think I’ve got this one squashed. If not, I’ll need some very detailed steps to reproduce. I could before and I can’t get it to fail now. :slight_smile:

Thanks!

-Eric

Do the following steps:

(1) Choose swimming (it is showing “Yards”, but I’m pretty sure you’re converting from the usual “Miles”)
(2) Put ‘1’ in the Distance field
(3) Change “Yards” to “Meters” (you will see 1609.34 is the new distance)
(4) Change to “Miles” (you will see 1 is the new distance) (this is fun, like running Google Translate through a bunch of languages, just not as much adventure!)
(5) Change back to the original “Yards” (you will see 1760)

I just found a shorter way:
Do steps (1) and (2) as above
(3) Change “Yards” to “Miles” and the distance stays 1

Hope this helps,

Mike

So, when I do this, I don’t get the same results. Can you share a few details with me, please?

  • Which browser and operating system?
  • When you turn on the javascript console, are there any errors?
  • Are you defaulted to metric or imperial units?
  • What is your default activity type?
  • Does this also happen when changing the activity type on an existing activity? (it doesn’t for me)

Thanks, we’re through the easy stuff and into the tricky. :slight_smile:

Cheers,

-Eric

Answers within the quote
So, when I do this, I don’t get the same results. Can you share a few details with me, please?

  • Which browser and operating system? Brave browser with Windows 10 and Ubuntu 16.04
  • When you turn on the javascript console, are there any errors? Haven’t checked
  • Are you defaulted to metric or imperial units? Imperial
  • What is your default activity type? Treadmill
  • Does this also happen when changing the activity type on an existing activity? (it doesn’t for me)
    Starts on Treadmill and miles; when I switch to swimming it automatically switches to Yards; I enter the number 1; then if I switch the unit to Meters it changes to 1609.34, but if I switch to Miles it stays 1

Thanks, we’re through the easy stuff and into the tricky. :slight_smile:

Cheers,

-Eric

I just noted today, also, that there is an anomoly on the weight chart. I started recording my data this year, but I recorded no information between the recorded dates of 3/9 and 3/18. (This is correctly noted on the recorded data.) On the graph, however, the dates from 3/18-3/28 are on the left of the graph, followed by the data starting from 1/1 and going steadily to 3/9, followed by a jump in date to 3/29, and then continuation from there. Note that, visually, the distance from 3/8 to 3/9 is the same as that from 3/9 to 3/29. Note, also, that the dates for the legend on the bottom (excluding the ‘2021’ common for all) are, in sequence,
3/18, 1/6, 1/22, 2/14, 3/2, 4/6, 4/22, 5/6, 5/20, 6/3
All separations are 16 days except 3/18-1/6 and 3/2-4/6 (35 days, not even a multiple of 16?!)
Another possible indicator of where the bug may be is that, in the main part of the graph where the dates run properly, the separation of the dots for the measurements is the same, even if the consecutive weighings are separated by 1 or 2 days. (I.e., if weight was recorded 5/3, 5/4, and 5/6 (but not 5/5) the dots for 5/3, 5/4, and 5/6 would all be separated by the same distance.)
This is on Brave using Ubuntu 16.04.

I’ll see what it’s like for other browsers if you like; I just have a lot of crap open right now and if I open another browser I’ll have to spend an eon waiting for swapping.

Fixed that. It was in whatever order you had entered it in the database (because I threw it together really fast when I wrote that original chart). No reason to leave it that way for the proper one!

-Eric

OK I took a crack at this one, too, and I think I’ve got it working properly. When your distance was 0 it was not properly recalculating and storing the meters per your distance type. It should do so now. Thanks for helping with the reproduction steps!

Best,

-Eric

Good info
.