Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ANGTOS Accuracy Problem

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
265 Views, 1 Reply

ANGTOS Accuracy Problem

I work with ANGTOS and ANGTOF quite a bit.  I'm working with latitude and longitude conversions in MAP 3D for an application where accuracy is top priority.  Most of the time ANGTOS (and RTOS, for that matter) return an accurate result for the number if decimal places requested, but then I run into a situation like this:

 

Command:

(angtos (angtof "120.0") 1 16)

"119d59'59.999999999949\""

 

I got it to return properly by specifying only 13 decimal places, but the result makes conversion between coordinate systems inaccurate.

 

Is there a technique to remedy this problem?  I know its been around for quite a while.  Somebody must have solved it by now.

 

Thank you,

 

J Leavitt

1 REPLY 1
Message 2 of 2
Lee_Mac
in reply to: Anonymous

Since AutoLISP stores the 'Real' data type as Doubles, there is a accuracy limit of 53 bits, equivalent to approximately 16 decimal places. As a result of this precision limitation, infinitesimal errors will accumulate across calculations.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost