View previous topic :: View next topic |
Author |
Message |
AdamkT1
Joined: 21 Apr 2007 Posts: 44
|
Problem with CORDIC 32 bits code in the code library. |
Posted: Mon Aug 27, 2007 11:31 am |
|
|
Hi,
Posted this query in the code library forum also...
Seems problem with the code sent.
I think it is in every for loop:
Quote:
for (i=0;i<30>=0) {dx=X >>i;} else { dx=-X >> i;dx=-dx;}
I think it is missing if condition. Please correct me if I am wrong. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Aug 27, 2007 11:44 am |
|
|
The problem is caused by posting code with HTML enabled.
To fix the problem, the person who posted the code has to delete
the existing code, paste in a fresh copy from their editor, and this
time select the tickbox to "Disable HTML in this post", before pressing
the Submit button. |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Tue Aug 28, 2007 5:37 am |
|
|
Should now be fixed. |
|
|
AdamkT1
Joined: 21 Apr 2007 Posts: 44
|
|
Posted: Wed Sep 05, 2007 10:51 am |
|
|
Although, I got trignometric values, of more than 3 digits accuracy, using cordic but still I have not been able to resolve the problem of calculating the distance between two points on the globe.
The problem now is that no matter if I use Haversine formula or other I cross the limits of int32.
Can anybody suggest any solution.
or Should I switch to 32bit microcontrollers.
Another question:
What may be the best choice for 32 bit microcontrollers which are cheap requiring the least like the compiler, the development and simulation boards and are easy to master.
Request suggestions in this regards too...
Adam |
|
|
|