Using the Non Linear Fitting method as provided by whuber in (Trilateration algorithm for n amount of points) I used Matlab to solve the problem.
P = [51.505348978413,-0.11270052661132;
51.4845086249581,-3.16947466601561;
55.9568033803799,-3.20266968478392];
R = [75.639168, 173.809152, 465.100416];
R = R*1000; %convert km to m
opts = statset('MaxIter',1000);
beta0 = [53.374, -1.394];
BETA=nlinfit(P,R,'myfun',beta0,opts)
- P are the 3 trilateration points (lat, lon)
- R are the ranges from my sample point to points in P distance-over-ground
- beta0 are the initial guesses for a position that meets the condition defined by P and R
myfun is in a separate file
function result = myfun(beta, X)
ellipsoid = [6378137, 8.1819190842622e-2];
result(1) = distance(51.505348978413, -0.11270052661132, beta(1), beta(2), ellipsoid);
result(2) = distance(51.4845086249581, -3.16947466601561, beta(1), beta(2), ellipsoid);
result(3) = distance(55.9568033803799, -3.20266968478392, beta(1), beta(2), ellipsoid);
I'm not sure what X does in this case, but myfun needs to have two inputs (beta & X). The initial guess returns three distances to my points P. result is compared to R until a maximum of 1000 iterations (or some error is reduced below a limit - not sure what this limit is or where to set it yet).
Once the values for beta have been found that results in the same values of R the final values are stored in BETA
The word localization is a new and, in my opinion, an annoying addition to geomatics. The question used to be: What is the difference between positioning and location? Two possible answers to which were:
- they're the same thing
- the difference depends on a specific context
One context was AVL (automatic vehicle location). In the late '80s, Hassan Karimi coined the term PLANS for "positioning, location and navigation systems". While it didn't catch on, it does relate closely to your question. In that context, positioning was determining coordinates (what the P in GPS stands for), location was finding that place on the map (or the nearest point on a road network to that position), and navigation was finding routes to other places on the network.
If that is correct, then you have your 1 and 2 in reverse order.
Now to the (IMO, ugly) word localization. I often see it used in the context of trilateration where position must be determined from multiple distance measurements to control points. In that case it is synonymous with positioning. However, I believe the more common use, especially in IT, of localization is "the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text." wikipedia
Best Answer
These two illustations are from the field of surveying but they should still apply.
Triangulation
As Martin has said, in triangulation, you work with angles as illustrated in the following figure.
The positions of the points of interest are computed based on measured angles and two know points. From those angles, the distances are computed which are in turn used to calculate coordinates for the target points.
Trilateration
In trilateration, you work with distances. From those distances, you compute the angles. Once computed, you can use them in conjunction with the distances to get the position of the target points.
A simpler example would the one at HowStuffWorks. It is quite similar to how GPS works except that this one's in 2D.
Given only one distance, you only know you are within a certain distance from Boise (which could be anywhere in that radius)
Given another distance from Minneapolis, you can now tell that you are at the intersection of two circle. Still gives you two positions though.
A position from a third location (Tucson), would narrow down your location to only one point.
That's pretty much how GPS works except that GPS is in 3D and you're dealing with spheres instead of circles. You'd also end up with two points instead of a single point with the third satellite but you can eliminate the other point as it's not on the surface of the earth as the illustration shows.
If you would look closely, their goal is the same. To get both distance and direction so that you can get the positions of the points you're interested in. Both of these techniques were invented before GPS and electronic measuring devices (EDM).
Before EDMs, triangulation was favored as it was very hard to measure long distances accurately while it was comparatively easy to measure angles. With the advent of electronic distance measurement tools (total stations and their ilk), trilateration also became popular as it was no longer hard to measure distances.
I hope that clarifies things for you.
Disclaimer: Images are from the ICSM site.