# RE: [OpenMap Users] Calculate a Lat/Lon Pair given a starting Lat/Lon pair, a distance, and an angle?

From: Rick Lane <lane_richard_b_at_bah.com>
Date: Mon, 28 Mar 2005 10:07:07 -0500

Erich,

I'm not sure if OpenMap has this built-in (I would imagine it does though,
considering it would be a similar function to how GREAT_CIRCLE lines and
polys are drawn.

Below is a snippet of code that I use, and it seems to work well, though it
*does* take the great circle calculations into consideration.

Hope this helps (and let me know if you find an OpenMap version of this).

public static double[] getNewLatLon(double currentLat, double currentLon,
double distInNM, double dirDeg){
double newLat,newLon;
double[] latLonArray = new double[2];

+

latLonArray[0] = newLat;
latLonArray[1] = newLon;

return latLonArray;
}

-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com] On
Behalf Of Klaus, Erich P.
Sent: Monday, March 28, 2005 9:50 AM
To: OpenMap Users
Subject: [OpenMap Users] Calculate a Lat/Lon Pair given a starting Lat/Lon
pair, a distance, and an angle?

Hello everyone,

Does anyone know if an API is included with OpenMap for doing a
calculation to get a Lat/Lon
pair given a starting Lat/Lon pair, a distance, and an angle? I've been
looking at ArcCalc and GreatCircle.

The distance would be less than 5km and so probably not effected by
curvature of the earth much.

Thanks,

Erich Klaus
erich.klaus_at_REMOVE SPAM HEREzai.com
```--