calculator icon indicating copy to clipboard operation
calculator copied to clipboard

Speed conversion to miles per hour is inaccurate

Open gerardvanderland opened this issue 2 years ago • 5 comments

Describe the bug When using Speed conversion, you get an inaccurate result when converting to/from miles per hour.

This is caused by inaccurate cm/s value for miles per hour, 44.7 which appears in:

‎src/CalcViewModel/DataLoaders/UnitConverterDataLoader.cpp: { ViewMode::Speed, UnitConverterUnits::Speed_MilesPerHour, 44.7 },

as well as in ‎src/CalculatorUnitTests/Test.resw: 44.7

The accurate value is 44.704, which is (1.609344 / 3600) * 100000

Steps To Reproduce Use Length mode and convert 1 mile to km, answer = 1.609344 km Use Speed mode and convert 1 miles per hour to km/h, answer = 1.6092 km/h

Expected behavior In Speed mode 1 mile per hour should convert to 1.609344 km/h

Screenshots n/a

Device and Application Information

  • OS Build: 10.0.22631.0
  • Architecture: X64
  • Application Version: 11.2210.0.0
  • Region: nl-NL
  • Dev Version Installed: False

Additional context n/a

Requested Assignment I'm just reporting this problem. I don't want to fix it.

gerardvanderland avatar Jul 10 '23 01:07 gerardvanderland

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

MicrosoftIssueBot avatar Jul 10 '23 03:07 MicrosoftIssueBot

Hi @gerardvanderland, You are right about the value of 44.704.

So the expected behavior should be 1.609344 not 1,1609334. I guess you have a typo there.

sravanth-space avatar Jul 12 '23 18:07 sravanth-space

@sravanth299, you are right, there was a typo, but also in your comment, because I had 1.1609344, not 1.1609334. :-)

Corrected the values, also to use decimal dot instead of comma.

gerardvanderland avatar Jul 13 '23 21:07 gerardvanderland

Hey! I have tried to correct the issue, please check it once at #2033 Thanks!

SahilDahat avatar Jul 28 '23 18:07 SahilDahat

Is this issue still open? Can I try it ?

ayushd775 avatar Oct 05 '23 14:10 ayushd775