Floating Point Operations
skatj
Posts: 88
I'm working on a model aircraft autopilot and I need to calculate the angle of an output vector using the inverse tangent function. I was wondering if there was any way I could do this with a Basic Stamp 2 Module?
I've been told that I'm screwed but I was wondering what my options were. I've already purchased the Stamp 2 so I don't know what I should do know.
I've been told that I'm screwed but I was wondering what my options were. I've already purchased the Stamp 2 so I don't know what I should do know.
Comments
or
A lookup table
Depending on how accurate you need to know the angle you may need external eeprom
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Could you elaborate please? A google on floating point coprocessor didn't yield much. I've heard of it before but I'm not exactly sure how it works.
If you're speaking of the ARCTANGENT function it IS available on all PBASIC Stamps starting with the Model 2 (BS-2). The function is ATN and details can be found in the PBASIC Help file, or in the PBASIC Reference Manual.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
P.S. These are integer functions, not floating point. Is there some reason you need floating point?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com