Results 1 to 7 of 7

Math Help - Find point given lati/long offset, heading and distance

  1. #1
    Newbie
    Joined
    Aug 2009
    Posts
    8

    Find point given lati/long offset, heading and distance

    Hi all,

    Given a start point (in latitude/longitude), initial heading (0 - 360 degrees), and distance (in meters), I am trying to find a second point, B. I've tried several solutions, amongst the closest being:
    Code:
    lat = asin(sin(lat1)*cos(distance)+cos(lat1)*sin(distance)*cos(heading))
    IF (cos(lat)=0)
        lon=lon1     
    ELSE
        lon=(lon1-asin(sin(heading)*sin(distance)/cos(lat))+pi % (2*pi))-pi
    ENDIF
    (obtained from Aviation Formulary V1.45)

    The above didn't work, returning a wrong co-ordinate (e.g. if point B is due north, it would appear NW or NE etc)

    After googling extensively, I managed to piece together the following (again without avail):
    Code:
     heading = toRadians(heading);
             lat = toRadians(lat);
             lon =toRadians(lon);
             angularDistance = distance / WGS84_EARTH_RADIUS;
    
             newLat = asin(
                    sin(lat) * cos(angularDistance)
                    + cos(lat) * sin(angularDistance) * cos(heading));
    
             dlon = atan2(
                    sin(bearing) * sin(angularDistance) * cos(lat),
                    cos(angularDistance) - sin(lat) * sin(newLat));
    
             newLong = ((lon + dlon + PI) % (PI * 2)) - PI;
    I'm sure that the problem is a simple one, however given how long it has been since I last did geometry....
    Any suggestions?

    Thanks for your time :-)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2009
    Posts
    8
    Anybody? :s
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Nov 2007
    From
    Trumbull Ct
    Posts
    914
    Thanks
    27
    Hi suntzu,
    Why don't you give lat and long + distance in km and heading.


    bjh
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Aug 2009
    Posts
    8
    Hi bjh,

    Thanks for your reply.

    Sorry, I'm confused. Could you clarify what you meant by "Why don't you give lat and long + distance in km and heading."? Do you mean why I don't give the distance in KM? The heading is an angular measurement, so I can only give that in 0 - 360 degrees...sorry, I don't quite understand what you meant by this...
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    Joined
    Nov 2007
    From
    Trumbull Ct
    Posts
    914
    Thanks
    27
    Hi suntzu,

    Latitude = ? Longitude =? Heading like 60 degrees true=? Distance traveled in km or m =?

    Unconfused ?


    bjh
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Aug 2009
    Posts
    8
    I probably sound very stupid now, but: you want me to post a sample result?

    Much more confused...sorry
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Super Member
    Joined
    Nov 2007
    From
    Trumbull Ct
    Posts
    914
    Thanks
    27
    Hi again suntzu,
    If you are looking for a general equation in spherical trigonometry I think you are in the wrong forum.There is another method using a Mercator Chart for a limited area on which you would plot a straight line from P to Q at a designated heading and distance and quickly determine a new lat ,long position


    bjh
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Find distance from given point to xy-plane?
    Posted in the Calculus Forum
    Replies: 3
    Last Post: September 24th 2011, 02:59 PM
  2. Replies: 1
    Last Post: April 6th 2011, 06:44 AM
  3. Replies: 1
    Last Post: January 17th 2011, 10:33 AM
  4. find the distance of a point from a line?
    Posted in the Pre-Calculus Forum
    Replies: 7
    Last Post: December 11th 2009, 03:50 PM
  5. Find the distance of the point
    Posted in the Pre-Calculus Forum
    Replies: 5
    Last Post: January 28th 2009, 05:05 PM

Search Tags


/mathhelpforum @mathhelpforum