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. 


On Friday, October 12, 2012 11:50:48 PM UTC+2, Lew wrote:
>
> Karl Kristian Markman wrote:
>
>> Lew is this more what you are looking for?? 
>>
>
> Nope. I was talking about the conversion of 'int' to 'double', which does 
> not involve any formulas.
>  
>
>>   public final double a = 6378137;   //Equatorial radius in meters
>>
> (Do not use TAB characters to indent code in your posts. Use 2 to 4 spaces 
> per level.)
>
> Java conveniently does the conversion for you. However, you should be 
> aware of it.
>
> -- 
> Lew
>
>

-- 
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