Beating a dead horse :) decimal math..
This has been asked a million times ive searched it all but still am lost. First off is there a· beginners faq/ tut/ guide to·math with the prop? Ive·got all my navigation stuff working with float math but need to double buffer the video so i dont have enough memory for the float32 stuff...
Say im using the gps object.. first lets just say we want to work with heading.. (I know the decimal isnt that important but for use as an example)
x := gps.heading······ gets a string of say 352.5
First. I think im supposed to just treat that as just 3525 but i dont even know how to "treat" that as 3525 in spin.·Ie convert it from the string.
Then what about BIG numbers like a latitude
so easy with teh float objects[noparse]:)[/noparse]
thanks for some tips
embarrassed
Jesse
Say im using the gps object.. first lets just say we want to work with heading.. (I know the decimal isnt that important but for use as an example)
x := gps.heading······ gets a string of say 352.5
First. I think im supposed to just treat that as just 3525 but i dont even know how to "treat" that as 3525 in spin.·Ie convert it from the string.
Then what about BIG numbers like a latitude
so easy with teh float objects[noparse]:)[/noparse]
thanks for some tips
embarrassed
Jesse
Comments
Try that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit my site -> [url=Http://www.rawcircuits.com]www.rawcircuits.com[/url]
It is all assembler, though
Ale
In fact ive got my whole gps/waypoint navigation and wayppoint indicators all fully working with stringtofloat, float32 stuff and all the math all working...
I'm tryign to rewrite it all without using any floats and truly learn what im doing rather than just using other peoples objects blindly [noparse]:)[/noparse]
·
here are some routines to do Fixed point math. Its set up for 2 decimal places, but this can be changed with 2 constants:
And here an Example how to use it:
Hope this help...
Andy
yes thanks this is perfectly what i need.
Extremely helpful! Easy to see whats going on thanks I learned alot from this example
Jesse
·