# Fractional LWM Altitude ?

## Recommended Posts

Does anyone know how to format fractional LWM altitude into the source.asm file? I only know of the whole meters way and I may, depending on the format, want to add this feature to LWMDraw so users can adjust to more detailed ground elevations if they wish.Thanks for any help!! :)Ken

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

Hi Ken.LWMPoly2 4, 0, 0, 100, 64Will display the water at 100 + 64/128 meters ( 100.5m ).It's a fractional thing.LWMPoly2 4, 0, 0, 100, 192Will display the water at 100 - 64/128 meters ( 99.5m ). ( I think! ):)Dick

##### Share on other sites

Thanks DickThat information went straight over my head and it's still going through the room bouncing off the walls. Now I'm having to duck my head now and then to avoid getting knocked out. :-xxrotflmao I don't see how a fraction 192 equates to a minus value and I'm missing some math skills in this area. At least for now I think I'll stick with whole meter values like we've been using. It's much easier that way and users wanting more detailed elevations can just as easily edit the source file.Thanks for you help bro! Ken :-outta

##### Share on other sites

Hi Ken.It's a signed 8-bit integer. Anything over 127 becomes a minus number... just keep the numbers below 128. So your range is from 0-127, divided by 128. 32 is 32/128, or 0.25 meters. 64 = 0.5 meters. 96 = 0.75 meters. 127 = 0.9921875 meters ( 127 / 128 )Dick

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!