Mapping Toolbox | ![]() ![]() |
Display planetary data for the nine planets, the Sun, and the Moon
Syntax
almanac almanac(body
) data = almanac(body
,parameter
) data = almanac(body
,parameter,units
) data = almanac(body
,parameter
,units
,referencebody
)
Description
almanac displays the names of the celestial objects available in the almanac.
almanac(body
) lists the options, or parameters, available for each celestial body. Valid body
strings are:
data = almanac(body
,parameter
) returns the value of the requested parameter for the celestial body specified by body
.
Valid parameter
strings are: 'radius'
for the planetary radius, 'geoid'
for the two-element geoid vector, 'surfarea'
for the surface area, and 'volume'
for the planetary volume.
For the Earth, parameter
can also be any valid predefined ellipsoid string. In this case, the two-element geoid vector for that ellipsoid model is returned. Valid ellipsoid definition strings for the Earth are:
For the Earth, the parameter
string 'geoid'
is equivalent to'grs80'.
data = almanac(body
,parameter
,units
) specifies the units to be used for the output measurement, where units
is any valid distance units string. Note that these are linear units, but the result for surface area is in square units, and for volume is in cubic units. The default units are 'kilometers'
.
data = almanac(parameter
,units
,referencebody
) specifies the source of the information. This sets the assumptions about the shape of the celestial body used in the calculation of volumes and surface areas. A referencebody
string of 'actual'
returns a tabulated value rather than one dependent upon a geoid model assumption. Other possible referencebody
strings are 'sphere'
for a spherical assumption, and 'geoid'
, for the default geoid model. The default reference body is 'sphere'
.
For the Earth, any of the above-listed pre-defined ellipsoid definition strings can also be entered as a reference body.
For Mercury, Pluto, Venus, the Sun and the Moon, the eccentricity of the geoid model is zero, i.e. the 'geoid'
reference body is actually a sphere.
Examples
The radius of the Earth (treated as a sphere) in kilometers:
The default geoid model for the Earth ([semimajor axis eccentricity]
):
Note that the radius returned for any geoid model reference body is the semimajor axis:
almanac('earth','radius','kilometers','geoid') Warning: Semimajor axis returned for radius parameter ans = 6.3781e+03
Compare the tabulated values of the Earth's surface area with a spherical assumption and with the 1966 World Geodetic System ellipsoid model:
almanac('earth','surfarea','statutemiles','actual') ans = 1.969614809100133e+08 almanac('earth','surfarea','statutemiles','sphere') ans = 1.969477626875824e+08 almanac('earth','surfarea','statutemiles','wgs66') ans = 1.969486900374475e+08
Note that these values are so close that long notation is required to discriminate them.
almanac('moon','radius') ans = 1738 almanac('moon','surfarea') ans = 3.7959e+07 almanac('moon','volume') ans = 2.1991e+10
Remarks
Care should be taken when using angular arc length units for distance measurements. All planets have a radius of 1 radian, for example, and an area unit of square degrees indicates unit squares, 1 degree of arc length on a side, not 1-degree-by-1-degree quadrangles.
See Also
distance |
Distance between points |
distdim |
Convert distance units |
geoid vector |
Data structure for geoid model |
![]() | Mapping Toolbox Demos | angl2str | ![]() |