Documentation |
Small circles from center, range, and azimuth
[lat,lon] = scircle1(lat0,lon0,rad)
[lat,lon] = scircle1(lat0,lon0,rad,az)
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid)
[lat,lon] = scircle1(lat0,lon0,rad,units)
[lat,lon] = scircle1(lat0,lon0,rad,az,units)
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid,units)
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid,units,npts)
[lat,lon] = scircle1(track,...)
[lat,lon] = scircle1(lat0,lon0,rad) computes small circles (on a sphere) with a center at the point lat0,lon0 and radius rad. The inputs can be scalar or column vectors. The input radius is in degrees of arc length on a sphere.
[lat,lon] = scircle1(lat0,lon0,rad,az) uses the input az to define the small circle arcs computed. The arc azimuths are measured clockwise from due north. If az is a column vector, then the arc length is computed from due north. If az is a two-column matrix, then the small circle arcs are computed starting at the azimuth in the first column and ending at the azimuth in the second column. If az = [], then a complete small circle is computed.
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid) computes small circles on the ellipsoid defined by the input ellipsoid, rather than by assuming a sphere. ellipsoid is a referenceSphere, referenceEllipsoid, or oblateSpheroid object, or a vector of the form [semimajor_axis eccentricity]. If the semimajor axis is non-zero, rad is assumed to be in distance units matching the units of the semimajor axis. However, if ellipsoid = [], or if the semimajor axis is zero, then rad is interpreted as an angle and the small circles are computed on a sphere as in the preceding syntax.
[lat,lon] = scircle1(lat0,lon0,rad,units),
[lat,lon] = scircle1(lat0,lon0,rad,az,units),
and
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid,units)
are all valid calling forms, which use the input string units to
define the angle units of the inputs and outputs. If the units string
is omitted, 'degrees' is assumed.
[lat,lon] = scircle1(lat0,lon0,rad,az,ellipsoid,units,npts) uses the scalar input npts to determine the number of points per small circle computed. The default value of npts is 100.
[lat,lon] = scircle1(track,...) uses the track string to define either a great circle or rhumb line radius. If track = 'gc', then small circles are computed. If track = 'rh', then the circles with radii of constant rhumb line distance are computed. If the track string is omitted, 'gc' is assumed.
mat = scircle1(...) returns a single output argument where mat = [lat lon]. This is useful if a single small circle is computed.
Multiple circles can be defined from a single starting point by providing scalar lat0,lon0 inputs and column vectors for rad and az if desired.
A small circle is the locus of all points an equal surface distance from a given center. For true small circles, this distance is always calculated in a great circle sense; however, the scircle1 function allows a locus to be calculated using distances in a rhumb line sense as well. An example of a small circle is all points exactly 100 miles from the Washington Monument. Parallels on the globe are all small circles. Great circles are a subset of small circles, specifically those with a radius of 90º or its angular equivalent, so all meridians on the globe are small circles as well.
Small circle notation consists of a center point and a radius in units of angular arc length.
Create and plot a small circle centered at (0º,0º) with a radius of 10º.
axesm('mercator','MapLatLimit',[-30 30],'MapLonLimit',[-30 30]); [latc,longc] = scircle1(0,0,10); plotm(latc,longc,'g')
If the desired radius is known in some nonangular distance unit, use the radius returned by the earthRadius function as the ellipsoid input to set the range units. (Use an empty azimuth entry to indicate a full circle.)
[latc,longc] = scircle1(0,0,550,[],earthRadius('nm')); plotm(latc,longc,'r')
For just an arc of the circle, enter an azimuth range.
[latc,longc] = scircle1(0,0,5,[-30 70]); plotm(latc,longc,'m')