Greetings,
I have two coordinates:
(52.4412396, -6.563223)
and
(52.8912397, -6.683669)
The delta is:
(-0.4499999, 0.120446)
The distance moved is:
sqrt((-0.4499999)^2+(0.120446)^2)
=.465840261
How do I convert this to meters?!
I hope someone can help.
Many thanks in advance,
You have mistakenly done the sum of squares on spherical coordinates. Each difference has to be converted to its longitudinal and latitudinal distance before getting the hypotenuse. While latitude converts directly to distance, (each degree is equal to 60 nautical miles) the longitude will only do that at the equator) That means that you have to multiply the above by the cosine of the latitude. Then you can move on to a simple hypotenuse calculation before converting to meters.
Related
I am using VB.NET and want to calculate the Longitude and Latitude of a point directly EAST of a given point when given a distance of kilometers.
In this example, Point 1 has the longitude of -118.243683 and Latitude of 34.052235. I know that the distance between these two points are exactly 30 kilometers. How do I find the exact Longitude and Latitude of the second point? I know that is is possible to find the distance between two points but I do not know how to find the longitude and latitude of a second point when given a first point and a relative distance (in kilometers) away is 30.
Assuming that the angle is zero degrees between the two points, how do I find the point (in Longitude and Latitude) of the second point?
I have to implement kalman filtering to filter latitude longitude(from a gps sensor) to get precise position information.
i would be getting distance traveled from a wheel sensor and angle from magnetometer or i can also use gps course from gps sensor. I have latitude longitude in degrees or radians and distance in meters.
So before applying the kalman filtering i need to convert this lat/lon to meters, correct?
With this information i think i can predict using the following equation
x=x+dt*xVelocity;
y=y+dt*yVelocity;
I can calculate velocity using the following formula
xVelocity=distance*cos(angle);
yvelocity=distance*sin(angle);
So the problem here is the conversion. i tried to convert the above lat/lon to UTM and then performed the above calculation and just for testing converted it back to lat and lon to give the desired location but the results seemed wrong
For example-
double latitude=24.55662435;
double longitude=55.3525234;
double north,east;
latLonToUTM(latitude,longitude,&north,&east);
int distance=5;//5 meters
int course=200
double xVel=distance*cos(course);
double yVel=distance*sin(course);
north+=yVel;
east+=xVel;
double nxtLat,nxtLon;
UTMtoLatLon(north,east,&nxtLat,&nxtLon);
double distance=calculateDistace2LatLon(latitude,longitude,nxtLat,nxtLon);// Used online tool to get this distance
double bearing=calculateAnglebetween2LatLon(latitude,longitude,nxtLat,nxtLon);//used online tool to get angle also
here the obtained distance is not 5m and angle is 200..
Since this basic test itself is failing i am yet to go to kalman filtering.
First this conversion should be precise to even go further.
Can someone guide me to which method to use to convert this lat/lon to meters to apply velocity to get nxt meter or location?
Also if there is no need to convert then how can we add the distance travelled which is in meters to this lat lon?
I have a set of GPS coordinates 12.9611159,77.6362214. What exactly do these mean? How can I convert them to degrees of longitude and latitude? What formula should I use to get accurate distance between two sets of coordinates when the order of distance is 10km.
Most likely 12.9611159 is the latitude in degrees, 77.6362214 the longitude. In that case, the coordinate is in India. If latitude and longitude are reversed, you end up in the Greenland Sea.
You can easily check this by entering the coordinate pair in the Google maps search box. Google expects latitude first.
For the distance, in python you can easily use the haversine package:
from haversine import haversine
my_coord = (12.9611159,77.6362214)
other_coord = (12.9, 77.6)
distance = haversine(my_coord, other_coord)
This will give you the distance in km.
Path image
I need to calculate distance from subscriber position to Position B in the image. I have the GPS co-ordinate of the subscriber and the "B" position. How can I calculate the distance?
Simple case: Express lat and long values in decimal form and use the standard geometry distance formula if subscriber is less than 100 miles from position B. distance = sqrt((lat1-lat2)^2 - (long1-long2)^2).
More general case: Use the haversine formulas using a great circle to calculate distances from points on a sphere for more accurate measurements if position B might be a continent or two away from the subscriber. Let's call the subscriber position A and say and say he is at lat[a], long[a] and the fixed point B is at lat[b], long[b]. Let r represent the radius of the earth (about 3961 miles).
distance = 2*r*arcsin(sqrt(sin^2((lat[b]-lat[a])/2) + cos(lat[a])*cos(lat[b])*sin^2((long[b]-long[a])/2)))
If you specify r in miles, your answer will come out in miles. If you use kilometers use 6373 for a good number for the earth's radius, and of course the answer will come out in kilometers.
Exact case: The haversine formula will not provide a perfect answer because the earth is not a perfect sphere. Even apart from the mountains and the canyons, the earth has a larger radius at the equator than it does at the poles. The radius at the equator is the equator is about 3963 miles, and at the poles it is about 3950 miles. So you really need to devise your own lookup table (or borrow one from google maps) if you are measuring distances halfway around the globe and you have to be exact.
The haversine formula will be accurate to less than half of a percentage point. In 1000 miles your answer will be accurate to within 5 miles.
Haversine formula: https://en.wikipedia.org/wiki/Haversine_formula
Radius of the earth: https://en.wikipedia.org/wiki/Earth_radius
as topic, the Coordinates value (Latitude and Longitude) is known , these Coordinates will compose as polygonal area , my question is how to calculate the area of the polygonal that is base the geography ?
thanks for your help .
First you would need to know whether the curvature of the surface would be significant. If it is a relatively small then you can get a good approximation by projecting the coordinates onto a plane.
Determine units of measure per degree of latitude (eg. meters per degree)
Determine units of meature per degree of longitude at a given latitude (the conversion factor varies as you go North or South)
Convert latitude and longitude pairs to (x,y) pairs in the plane
Use an algorithm to compute area of a polygon. See StackOverflow 451425 or Paul Bourke
If you are calculating a large area then spherical techniques must be used.
If I understand your question correctly - triangulation should help you. Basically you break the polygonal to triangles in such a way that they don't overlap and sum their areas.