math - Calculate second point knowing the starting point and distance -


Using the latitude and longitude value (point A)

I'm trying to calculate another point B, X Display distances from 0 radians point A to point B latitude and longitude values.

Example (pseudo-code):

  PointA_Lat = x.xxxx; PointA_Lng = x.xxxx; Distance = 3; // meter bearing = 0; // radian new_PointB = point-gap;  

I was able to calculate the distance between the two points, but what I have to find is the second point to know the distance and effect.

Preferably in PHP or Javascript. It seems that you are going to measure the distance (r) in meters (m), you

  dx = r * cos (direct); Due to theta, the tail was measured counter-clockwise by the former DI = R * sin (theta); Factors such as DX, D. R.  

If theta is measured clockwise from the north (for example, compass bearings), the calculation for DX and D is slightly different:

  dx = r * sin (theta); Theta was measured by clockwise clockwise DI = R * cos (theta); In either case, the degree changes in latitude and latitude:  
  delta_longitude = dx / (dx), the same units as R  

111,320 * cos (latitude)); Delta_Latituid = DI / 110540 in DX, DI Meter; The result in the degree in longitude / latitude

The difference between the constants 110,540 and 111,320 is due to the oblateness of the Earth (polar and Mediterranean perimeters are different).

There is a work here, for example, by using the standards after the question of yours.

Given that a starting point is longitude -87.62788 degrees, latitude 41.885 9 2 degrees, the distance of 500 meters from the starting point is the coordinates of Northwest

If we If we measure the angles of the counter-clockwise from east, then the "northwest" corresponds to theta = 135 degrees. R is 500 meters away.

  dx = R * cos (theta) = 500 * because (135 degrees) = -353.55 meters DY = R * sin (theta) = 500 * sin (135 degree) = 353.55 meters delta_longitude = Dx / (111,320 * because (latitude)) = -353,55 / (111320 * cos (41.885 92 degrees)) = -0.004266 degree (approx. -15.36 total arcmin) delta_latitude = DC / 110,540 = 353.55 / 110,540 = 0.0031 9 8 degrees (approx 11.51 arcmin) Last longitude = start_longitude + delta_longitude = -87.62788 - 0.004266 = -87.632146 Last latitude = start_latitude + delta_latitude = 41.885 9 2 + 0.0031 9 = 41.8 , 98, 118  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -