Thanks Terry.

I'm not 100% sure, but with this approach I'd need my easting/northing
to be in the same units as the distance.
Is this correct?

My lat/long is WGS84 and my distance is in meters.

Kind regards

Tim Smith



-----Original Message-----
From: Terry McDonnell [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2004 16:27
To: Tim Smith
Subject: RE: MI-L New lat/long from distance/bearing


Tim,

I don't know MapX and would need repriming on C, and I'm not sure if
there is a ready-made function to do this, but I would use trig to do
this

 N
 !
 !  w   target
-!-----o
 !    /
n!   /
 !b / L
 ! /
 !/ 90-b
-o-----!-------- W
    w
 Start point

You have bearing, angle b, and distance, length L
Sin( b) = Opp/Hyp

So Sin( b) = w / L
So w = Sin( b) * L, giving you your distance West

Tan( b) = Opp/Adj

So Tan( b) = w / n
So n = Tan( b) * w, giving you your distance North

This works for bearings of < 90 deg so will need to be rethought for >
180, > 270 etc. but I'm sure you get the drift.  As to whether MapX has
functions to get the lat/long, given the distances N and W, I don't
know, but I hope this helps

Terry


-----Original Message-----
From: Tim Smith [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2004 15:56
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: MI-L New lat/long from distance/bearing

Hi,
Thanks for people who have helped so far with this,

I want to draw a line in MapX between two points. The function in MapX
to do this takes two WGS-84 lat/long points. I don't have two lat/long
points. I have one lat/long, an angle in degrees and a length in meters.
I need to calculate the second lat/long (unless there is a MapX function
that can draw a line - given a position, angle and distance).

A C++ algorithm to do it would be fine. I can't believe MapX doesn't
support such a calculation.

Tim


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12428

Reply via email to