Latitude and Longitude

roshandilrukroshandilruk Member Posts: 51
edited 2006-01-12 in Navision Attain
Hii,

Can somebody tell ,
How to calculate the distance between two places on earth, given latitude and longitude of the given places in Navision.

Roshan

Comments

  • Timo_LässerTimo_Lässer Member Posts: 481
    This could be something for you: MapPoint 2004 Automation v2.01
    [...]
    Version 2.01:
    Add a way to calculate route between multiple addresses
    [...]
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • jreynoldsjreynolds Member Posts: 175
    edited 2006-01-10
    Convert latitude and longitude to Cartesian coordinates. Use the Pythagorean theorem to find the straight line distance (through the earth) between the two points. You now know the lengths of all three sides of the triangle formed by the radii to the two points and the line segment joining the points (since the radius of the earth is a known constant - I’m assuming here that the earth is a perfect sphere, which is not quite accurate). Knowing these three lengths you can use the law of cosines to solve for the angle formed by the two radii. This is the angle of arc on the great circle between your two points. This angle (in radians) times the radius of the earth gives your distance.
  • kinekine Member Posts: 12,562
    .3. Calculating Distances in Latitude and Longitude

    * Calculating distance on a sphere based on latitude and longitude is a complicated task.
    o The calulation of the distance between two points on a plane surface is a relatively simple task and has promoted the use of two-dimensional maps throughout history.
    o When calculating distances over large areas, the authalic sphere can be used as a reference surface.
    + The shortest distance between two points on a sphere is the arc on the surface directly above the true straight line.
    + The arc is based on a great circle.
    + Table 3 - Great Circle Distance Calculation
    + See the Web References section for online examples.
    o The difference betwen the sphere and ellipsoid is important when working with large areas.
    + At a scale of 1:40,000,000, a 23 kilometer error in distance would equal a pen line (0.5 mm) on paper.
    o Complex geodetic models based on ellipsoids are necessary for precise meaurement.
    + Long range radio navigation requires precise distances.
    + Loran-C requires range computations with better than 10 meter accuracy over 2,000 kilometers.
    + Geodetic measurements using satellites requires very accurate range computations.
    + Table 4 - Ellipsoidal Distance Calculation


    Copied from http://www.ncgia.ucsb.edu/giscc/units/u014/u014.html
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • roshandilrukroshandilruk Member Posts: 51
    Thanx for the replies.

    See, I know the formula that hw to calculate , let me explain what we have done. We have created a DLL in VB to calculate the values, basically the formula is in DLL, then I integreted that with navision, but I need to know , is there any other way that I can handle this within navision rather than going for third party DLL's???/.. :-k

    Plz guide me!
    Roshan
  • kinekine Member Posts: 12,562
    You can, but you need function for calculating cos and sin functions...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.