On Friday, October 19, 2012 1:32:23 PM UTC+2, Karl Kristian Markman wrote:
>
> Sorry for the TAB usage but I just copy/past from eclipse..
>
> I have one more problem here. The conversion sort of works but I miss the 
> target by about 200 meters West. I have figured it out to bee this line 
> that screws everything up.:
>
> nu = a/(Math.pow((1-(e*e* Math.sin(lat)*Math.sin(lat))), (1/2)); 
>
> As it is written in plain language:
>
> nu = a/(1-e^2sin(lat)^2)^1/2
>
> When I enter this in to excel I get 6394567 and from my app I get 6378922. 
> This follows through on every calculation done after. 
>
>
> I saw one place (in Java code though) where they used 
> Math.pow(Math.sin(lat),(1/2.0)) for setting odd powers.
>

To answer my own question. IT works, hallelujah. 

For some reason (currently unknown to me) the java.lang.math needs to 
have decimal point   in order to "understand" fractional powers.

Someone will probably tell me why in a sarcastic way. B) 

>  
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to