Is there someone who is good at calculation here?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
kennethnilsen69
Posts: 101
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Is there someone who is good at calculation here?

Post by kennethnilsen69 »

jaja you do not have to be good. just a little better than me and it does not take much to be :-)

I have a calculation I can not figure it out.
RPM1 125 (byte)
RPM2 15 (byte)
RPM (Int)

RPM = ((RPM1 * 160) + (RPM2 / 1.6)) - 20009
RPM is then 0 (0,375)

How can I do this in reverse?
if RPM is 0 how do I find RPM1 and RPM2?


Thanks :-)

Kenneth

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Is there someone who is good at calculation here?

Post by medelec35 »

Hi Kenneth,

RPM1 = RPM/160 - RPM2/256+20009/160

RPM2 = 8 * RPM/5 - 256 * RPM1 +32014.4

Martin
Martin

kennethnilsen69
Posts: 101
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: Is there someone who is good at calculation here?

Post by kennethnilsen69 »

Hi Martin sorry for some sent replies and I thank you for your suggestion. But this only works if you know RPM2.
I found a different way to solve it so my question is no longer relevant But thanks anyway :-)


Kenneth

Post Reply