[gradsusr] convert world coordinate distance to real distance (km)

wendi harjupa wendiharjupa at gmail.com
Sat Nov 5 02:41:19 EDT 2016


Dear Mr Phil

I am very sorry I have to come to you with another question.
I have tried the equation that written at the web that you shared.

Since I just need short distance, then I use this equation

"A mathematically equivalent formula, which is less subject to rounding
error for short distances is:

d=2*asin(sqrt((sin((lat1-lat2)/2))^2 +

                 cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))

But, when I tried to make calculation by using the equation, the result was
wrong.

Do you have any idea? am I wring in choosing equation.

Thank you very much.

Best regards
wendi


On Tue, Nov 1, 2016 at 11:32 PM, HARVEY, PHILIP O NH-03 USAF AFMC 412
OSS/OSW <philip.harvey.1 at us.af.mil> wrote:

> See Ed Williams' Aviation Formulary at http://williams.best.vwh.net/
> avform.htm for great circle distance, etc formulas.  The formula you
> desire is only requires 1 line and can easily be written into a function.
>
> Phil
>
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org]
> On Behalf Of wendi harjupa
> Sent: Tuesday, November 01, 2016 2:01 AM
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Subject: [gradsusr] convert world coordinate distance to real distance (km)
>
> Dear every one
>
> I have problem with converting distance in world coordinate to distance,
>
> I have map with
> lon = 135  135.5
> lat = 34.5   35
>
> I want to set lon =135, as 0 km, and lat=34.5 as 0 km.
> as we know that 1 deg is about 110 km.
>
> Is there any function in grads that can directly convert the world
> coordinat distance to real distance (km)?
>
> Please, any help would be very appreciate.
>
> thank you
> regards,
> wendi
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161105/1dc7fb09/attachment-0001.html 


More information about the gradsusr mailing list