You don't have to be a smart ass. Why don't you just multiply you km value by 6213/1000? it seems easy to me. maybe I am missing something.
Thank you for that revelation. What do you think the result of (1006/1619) is?
You don't have to be a smart ass. Why don't you just multiply you km value by 6213/1000? it seems easy to me. maybe I am missing something.
Thank you for that revelation. What do you think the result of (1006/1619) is?
Regards
CharlieM
Using PBP3
MCSPX
I made my comment because of yours:You don't have to be a smart ass.It's as if you said, "I spent 30 seconds on Google and found out that 1 kmh is equal to .6213. You couldn't have tried to research this problem at all."doing a google search I have found that 1 kmh is equal to .6213 mph.
In response to your current question, ofYes, you are missing something. Did you read my first post?Why don't you just multiply you km value by 6213/1000? it seems easy to me. maybe I am missing something.
Did you ever try to do 98 X 256 X 6.213 on an 18F4550?I can do it the other way where it's 6.21.....Then if the speed is over 65 MPH, it rolls over due to a word sized variable.
what is the range of the km and mp you need?
If up to 105 Km is OK with you then a word size variable can do it I think.
105(km)*621=65205. Scaling by 100 gives 65.205 Miles.
Or 65205/621 gives back Km. Also if the Miles are scaled up by a factor of 100.
Ioannis
Mackrackit's solution may work. I hope to try it today.
Didn't you need the reverse?
Ioannis
No.
Like a champ! It's .13 MPH off at 100 MPH and .09 MPH off at 1 MPH. I'm guessing because of the additional numbers needed for a true KM to MPH conversion? Who cares, I don't need it to be that accurate anyway. Thanks again for the help!miles = km */ 159
Should work.
Hi,
You said you don't need it but you could try miles=km**40718, it should get you a little bit closer still.
/Henrik.
Bookmarks