Re: thank you
karenthestudent said:
That’s excellent, I can see what you mean, and I think that the maths should be ok for me understand. The GPS is to be used a person finder, where by it locates the second person from the first. It is therefore likely to be used on the same ground level, between 30-300 meters apart. From what you have all said it would be fare to ignore any curvature over these distances?
The coordinates will compared to each other at the same moment in time.
One thing I am not sure about is how the angle will be calculated from the Latitude longitude given as degrees and minutes (ddmm.mmmm).
:!:
The units of Latitude and Longitude are the same and will cancel out in the formula. Treat them as distances (they are in fact angular coordinates, but on a scale of 30-300 meters, we really don't care, given the scale of the earth, and assuming you aren't at a pole). You can then use the degrees as a compass bearing.
The GPS states what hemisphere the GPS is in, which for this example both devices are in the N W hemispheres.
If one person is standing at X and the other at Y, then what direction is Y from X.
This is the output from the two GPS devices.
Position X…5126.3711,N (latitude) and 00034.1171,W (longitude)
Position Y…5129.5040,N (latitude) and 00038.4633,W (longitude)
These might not be the best examples?
:?:
It's a fine example. One problem, side opposite is always opposite your reference point, side adjacent is always adjacent to your reference point, in my example I assumed a different orientation, so switch yours.
Lets work it out together. First off, it's probably worthwhile to recenter our axis about X for ease of calculations. So X is now at 0,0. Lets adjust Y accordingly to -3.1329, -4.3462. Side adjacent = 4.3462, Side opposite = 3.1329. We get the hypotenues from the distance formula: d = sqrt((x1 - x2)^2 + (y1 - y2)^2) = 5.3576.
A = arccos((3.1329^2 + 5.3576^2 - 4.3462^2) / (2 * 3.1329 * 5.3576))
A = .9462379659 RADIANS (NOT degrees)
To conver to degrees multiple by 180/pi
A = 54.22 degrees
H = 90 degrees
O = 180 - 90 - 54.22
O = 35.78 degrees
Since O is 35.78 degrees and they are in Quadrant IV, We add 90 degrees, and find that they are at 125.78 degrees (compass direction, that is 35.78 degrees south of east).
EDIT: Note if you want distance, the distance is in angular coordinates is given by the hypotenues. For our scale, we assume angular = cartesian for simplicity, and assuming your lattitude is roughly the same as mine (it may not be, so you may need a different number), there are roughly 70 miles per degree, and 60 minutes per degree. So using the hypotenues of 5.3576, we get roughly 6.21 miles.