Reading the SIN tables
Harprit
Posts: 539
I have a value in degrees. How do I read the SIN of this value
from the SIN tables in SPIN.
Harprit
from the SIN tables in SPIN.
Harprit
Comments
I need to show them how to read a value from the Log, SIN tables etc.
If I can read a memory location, I think I can do the rest.
I don't have a clue as to how one reads a memory location
I may be missing something.
But I do want to do it in SPIN, no PASM
Harprit
You can read any memory location with something like ... result := word[noparse][[/noparse]$E000]
The fine example tronsnavy posted is written entirely in SPIN ... surely you can translate that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Andy
A great big thanks to all.
I can demonstrate what I want in integer math now.
It remarkable how much easier thing are with some expert guidance
Now to convert it to a floating point result.
Regards
HSS
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Here is an example of using FP math to manipulate the sin table.· If you wish to display a FP value on PST, you must convert any FP value to a string.· Pay close attention to the "attached" objects (to see how the "objects" manipulate the sin table).· I simply modified the program that I sent you earlier (using "objects" from OBX)·.· Did not get a chance to add comments, but I'm sure you can figure it out.· Remember, the "Propeller Object Exchange" is your best friend.· No need to reinvent the wheel.· Good luck.
Best Regards,
Bob
Cheers,
Istvan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Intentionally Left Blank
Post Edited (cessnapilot) : 11/22/2009 7:41:39 PM GMT
Istvan,
Nice Object.· Got a chance to look at it last night.· I will certainly use it, from this point forward, for all future ·Math functions.· Have a good one.
By the way, I think oral hygiene is over rated.· What say you?
Those are propeller related (chopped) bugs and 100% bio, at least. Oral hygiene is important, that's why we need orally administered alcohol after the flight.
Cheers,
Istvan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Intentionally Left Blank
Washing "chopped-up" bugs down with alcohol (A high protein treat)... That's got to increase the "halitosis" effect.· A man after my own heart.· Cheers right back at ya.
Bob