CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem with CORDIC 32 bits code in the code library.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
AdamkT1



Joined: 21 Apr 2007
Posts: 44

View user's profile Send private message

Problem with CORDIC 32 bits code in the code library.
PostPosted: Mon Aug 27, 2007 11:31 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 27, 2007 11:44 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Tue Aug 28, 2007 5:37 am     Reply with quote

Should now be fixed.
AdamkT1



Joined: 21 Apr 2007
Posts: 44

View user's profile Send private message

PostPosted: Wed Sep 05, 2007 10:51 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group