Jump to content
Sign in to follow this  
rhumbaflappy

Fractional LWM Altitude ?

Recommended Posts

Guest

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 this post


Link to post
Share on other sites

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 this post


Link to post
Share on other sites
Guest

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 this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • 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!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...