## Documentation Center |

Cross-fix positions from bearings and ranges

`[newlat,newlon] = crossfix(lat,long,az)[newlat,newlon] = crossfix(lat,long,az_range,case)[newlat,newlon] = crossfix(lat,long,az_range,case,drlat,drlong)[newlat,newlon] = crossfix(lat,long,az,`

`[newlat,newlon] = crossfix(lat,long,az)` returns
the intersection points of all pairs of great circles passing through
the points given by the column vectors `lat` and `long` that
have azimuths `az` at those points. The outputs are
two-column matrices `newlat` and `newlon` in
which each row represents the two intersections of a possible pairing
of the input great circles. If there are *n* input
objects, there will be *n choose 2* pairings.

`[newlat,newlon] = crossfix(lat,long,az_range,case)` allows
the input `az_range` to specify either azimuths or
ranges. Where the vector `case` equals 1, the corresponding
element of `az_range` is an azimuth; where `case` is
0, `az_range` is a range. The default value of `case` is
a vector of ones (azimuths).

`[newlat,newlon] = crossfix(lat,long,az_range,case,drlat,drlong)` resolves
the ambiguities when there is more than one intersection between two
objects. The scalar-valued `drlat` and `drlong` provide
the location of an estimated (dead reckoned) position. The outputs `newlat` and `newlong` are
column vectors in this case, returning only the intersection closest
to the estimated point. When this option is employed, if any pair
of objects fails to intersect, no output is returned and the warning `No
Fix` is displayed.

`[newlat,newlon] = crossfix(lat,long,az,units)`,

`mat = crossfix(...)` returns
the output in a two- or four-column matrix `mat`.

This function calculates the points of intersection between
a set of objects taken in pairs. Given great circle azimuths and/or
ranges from input points, the locations of the possible intersections
are returned. This is different from the navigational function `navfix` in
that `crossfix` uses great circle measurement, while `navfix` uses
rhumb line azimuths and nautical mile distances.

Where do the small circles defined as all points 8º in distance from the points (0º,0º), (5ºN,5ºE), and (0º,10ºE)" intersect?

figure('color','w'); ha = axesm('mapproj','mercator', ... 'maplatlim',[-10 15],'maplonlim',[-10 20],... 'MLineLocation',2,'PLineLocation',2); axis off, gridm on, framem on; mlabel on, plabel on; latpts = [0;5;0]; % Define latitudes of three arbitrary points lonpts = [0;5;10]; % Define longitudes of three arbitrary points radii = [8;8;8]; % Define three radii, all 8 degrees % Obtain intersections of imagined small circles around these points [newlat,newlon] = crossfix(latpts,lonpts,radii,[0;0;0]) % Draw red circle markers at the given points geoshow(latpts,lonpts,'DisplayType','point',... 'markeredgecolor','r','markerfacecolor','r','marker','o') % Draw magenta diamond markers at intersection points just found geoshow(reshape(newlat,6,1),reshape(newlon,6,1),'DisplayType','point',... 'markeredgecolor','m','markerfacecolor','m','marker','d') % Generate a small circle 8 deg radius for each original point [latc1,lonc1] = scircle1(latpts(1),lonpts(1),radii(1)); [latc2,lonc2] = scircle1(latpts(2),lonpts(2),radii(2)); [latc3,lonc3] = scircle1(latpts(3),lonpts(3),radii(3)); % Plot the small circles to show the intersections are as determined geoshow(latc1,lonc1,'DisplayType','line',... 'color','b','linestyle','-') geoshow(latc2,lonc2,'DisplayType','line',... 'color','b','linestyle','-') geoshow(latc3,lonc3,'DisplayType','line',... 'color','b','linestyle','-')

The diagram shows why there are six intersections:

If a dead reckoning position is provided, say (0º,5ºE), then one from each pair is returned (the closest one):

[newlat,newlong] = crossfix([0 5 0]',[0 5 10]',... [8 8 8]',[0 0 0]',0,5) newlat = -2.5744 6.2529 -2.5744 newlong = 7.5770 5.0000 2.4230

Was this topic helpful?