Shop OBEX P1 Docs P2 Docs Learn Events
altimeter — Parallax Forums

altimeter

damiondamion Posts: 39
edited 2007-07-24 03:19 in General Discussion
Hello,

I'm trying to write a program for converting pressure to altitude using this equation: Z = --26216 x ln( P(kPa) / 101.304 ) where Z = altitude in feet. I'm using a uMFPUV2 to do the conversion but I'm having a hard time entering numbers bigger than 127 just in a basic division problem. I have managed to divide 127 by 10 with success but once I go above 127 the numbers get kind of funky. I've been reading a little about IEEE 754 and I see that this might relate somehow but I'm kind of lost. So for example how would I enter 26216 into register A so that I could divide it by 10?

Thanks,
Damion

Comments

  • damiondamion Posts: 39
    edited 2007-07-22 20:18
    I think I got it thanks.
  • FranklinFranklin Posts: 4,747
    edited 2007-07-24 03:19
    OK, so what did you do? Others (me) would like to know for future reference. Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.