d = departure(lon1,lon2,lat)
calculates the departure from lon1 to lon2 at the
latitude lat. Departure is the distance along a specific parallel
between two meridians. This syntax references the coordinates to the unit sphere and returns
d as a spherical distance in degrees.
d = departure(lon1,lon2,lat,ellipsoid)
specifies a reference ellipsoid for the coordinates. This syntax returns
d in the units of the semimajor axis of the reference
ellipsoid.
Calculate the departure distance between the longitudes 10ºW and 20ºW at the latitudes 10ºN, 40ºN, and 80ºN. By default, the departure function returns spherical distances in degrees.
Create a World Geodetic System of 1984 (WGS84) reference ellipsoid with a length unit of nautical miles.
wgs84 = wgs84Ellipsoid("nm");
Calculate the departure distance between the longitudes 10ºW and 20ºW at the latitudes 10ºN, 40ºN, and 80ºN. Reference the coordinates to the ellipsoid. When you specify a reference ellipsoid as input to the departure function, the function returns linear distances in the units of the semimajor axis of the ellipsoid.
Reference ellipsoid, specified as a referenceSphere object, a referenceEllipsoid object, an oblateSpheroid object, or a two-element vector of the form
[semimajor_axis eccentricity], where
semimajor_axis is the length of the semimajor axis and
eccentricity is the eccentricity. The values
semimajor_axis and eccentricity must be of data
type double.
The default value of [1 0] represents the unit sphere.
units — Angle unit "degrees" (default) | "radians"
Angle unit, specified as one of these options:
"degrees" — Degrees
"radians" — Radians
If you do not specify a reference ellipsoid, this argument determines the angle
units for the coordinates and the departure (as a spherical distance). If you specify a
reference ellipsoid, this argument only determines the angle units for the
coordinates.
Departure distance, returned as a scalar or an array of the same size as
lon1, lon2, and lat.
When you do not specify a reference ellipsoid as input, d
is a spherical distance in degrees. You can return a spherical distance in radians
by using the units input argument.
When you specify a reference ellipsoid as input, d is a
linear distance in the units of the semimajor axis of the ellipsoid.
Departure is the distance along a parallel between two points.
Whereas a degree of latitude is always the same distance, a degree of longitude is different
in length at different latitudes. In practice, this distance is usually given in nautical
miles.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.