We help IT Professionals succeed at work.
Troubleshooting Question

# Determining Latitude and Longitude

on
44 Views
I have a small project I am doing.

I am given the distance I am from an item. The distance goes as small as < 1 mile.

I would like to determine the latitude and longitude of this item. I give coordinates and it gives me a distance in miles.

Comment
Watch Question

## View Solution Only

CERTIFIED EXPERT

Commented:
You need more information.  There is a full circle of points that are a specific distance away from you.  You need something, such as the angle from north to the destination, to get the specific location.
Simple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
First we need the coordinates of the start location, the direction of travel and the distance. with this information we can compute the x and y values
CERTIFIED EXPERT

Commented:
Not sure what the input and outputs of your desired function are. It would help if you would write down a function showing the input args (and their units), and the return value (and their units, and range).

Here are two interpretations of your question:
>> I am given the distance I am from an item.
``````Input:
-- startingPoint (lat/lon)
-- distance (units?)
-- angle (degrees, -180..+179.999), where -180 --> heading south, and 0 --> heading north
Output:
-- endingPoint (lat/lon)
``````

>> I give coordinates and it gives me a distance in miles.
``````Input:
-- startingPoint (lat/lon)
-- endingPoint (lat/lon)
Output:
-- distance (units?)
``````
CERTIFIED EXPERT
Most Valuable Expert 2013

Commented:
Don't see why you would need direction as part of the input
This is simply the difference between two discreet points. Not about navigation.
Then assume Earth is a sphere of known radius in Miles and off you go.
https://blog.batchgeo.com/manipulating-coordinates-in-excel/
CERTIFIED EXPERT

Commented:
Enter the other location for the corodinates of that place.

https://www.latlong.net/

From the above tool you get the coordinates of both places (you and the one under a miles from you).
--------------------------------------

How do you calculate distance using latitude and longitude?

For this divide the values of longitude and latitude of both the points by 180/pi. The value of pi is 22/7. The value of 180/pi is approximately 57.29577951. If we want to calculate the distance between two places in miles, use the value 3, 963, which is the radius of Earth.

So that gives you a formula for calculating distance using coordinates

https://www.geeksforgeeks.org/program-distance-two-points-earth/

Example:

Input : Latitude 1: 53.32055555555556
Latitude 2: 53.31861111111111
Longitude 1: -1.7297222222222221
Longitude 2: -1.6997222222222223

Output: Distance is: 2.0043678382716137 Kilometers

Commented:
The function would be like this

```Input:
-- Starting point (Latitude longitude)
-- Distance to end point

Output
-- End point (Latitude longitude)

```
I can plug in latitude and longitude repeatedly to get the endpoint closer. The lowest distance of the endpoint is < 1 mile.
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

###### Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

Deciding to stick with EE.

Mohamed Asif

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
###### Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE