geodist                 package:gmt                 R Documentation

_D_i_s_t_a_n_c_e _B_e_t_w_e_e_n _G_e_o_g_r_a_p_h_i_c _C_o_o_r_d_i_n_a_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate surface distance between geographic coordinates.

_U_s_a_g_e:

     geodist(Nfrom, Efrom, Nto, Eto, units="km")

_A_r_g_u_m_e_n_t_s:

   Nfrom: latitude of origin.

   Efrom: longitude of origin.

     Nto: latitude of destination.

     Eto: longitude of destination.

   units: how distance is measured: '"km"' for kilometres, '"nm"' for
          nautical miles.

_D_e_t_a_i_l_s:

     Latitude and longitude are passed as decimal numbers, e.g. 66.5
     for 6630'N. Vectors of coordinates are supported.

_V_a_l_u_e:

     Vector of distances.

_N_o_t_e:

     The surface distance between geographic coordinates is:

       D = acos( sin(N1)*sin(N2) + cos(N1)*cos(N2)*cos(E1-E2) )

     where distance and coordinates are expressed in radians. N1 and N2
     is the latitude of origin and destination, and E1 and E2 is
     longitude. The calculations assume a perfect sphere and elevation
     differences are ignored. The SI definition of a nautical mile is
     exactly 1.852 km.

_A_u_t_h_o_r(_s):

     Arni Magnusson arnima@u.washington.edu.

_S_e_e _A_l_s_o:

     'diff', 'Trig'.

     'gmt-package' gives an overview of the package.

_E_x_a_m_p_l_e_s:

     geodist(55.75,37.62, 39.9,116.4)  # Moscow - Beijing
     geodist(90,0, -90,0, "nm")        # from pole to pole

