Other units of angle
While the radian (DimensionfulAngles.radᵃ) and the degree (DimensionfulAngles.°ᵃ) should cover must use cases, there are many other units of angle. Based on this table and UnitfulAngles.jl, the following units are also provided:
DimensionfulAngles.arcminuteᵃDimensionfulAngles.arcsecondᵃDimensionfulAngles.diameterPartᵃDimensionfulAngles.turnᵃDimensionfulAngles.doubleTurnᵃDimensionfulAngles.halfTurnᵃDimensionfulAngles.quadrantᵃDimensionfulAngles.sextantᵃDimensionfulAngles.octantᵃDimensionfulAngles.clockPositionᵃDimensionfulAngles.hourAngleᵃDimensionfulAngles.compassPointᵃDimensionfulAngles.hexacontadeᵃDimensionfulAngles.bradᵃDimensionfulAngles.gradᵃ
The documentation for these are found in Syntax.
Astronomical units
In astronomy it is common to measure angles in prefixed arcseconds with the symbol for arcsecond as, i.e., milliarcsecond is mas. DimensionfulAngles.jl provides this alternate, prefixable, version of the arcsecond.
DimensionfulAngles.asᵃ — ConstantasₐThe arcsecond, a unit of angle defined as 1°/3600.
This is an alternative symbol for DimensionfulAngles.arcsecondᵃ common in astronomy. Unlike arcsecondᵃ, asᵃ accepts SI prefixes. UnitfulAngles has similar implementation for μas, mas, and pas; this differs in that it contains units of angle.
To avoid abbreviation conflicts between attoseconds (as) and arcseconds, and decaseconds (das) and deciarcseconds, the astronomical arcsecond is abbreviated as asₐ instead.
Dimension: 𝐀.
See also DimensionfulAngles.arcsecondᵃ.
The prefixed units are documented in Prefixed units.
Another set of units of angle used in astronomy is the hour, minutes, and seconds. Note that these are minutes and seconds of hour, not degree (e.g., like the arcsecond). The hour is defined as $1/24$ of a full revolution. These are usually displayed as, e.g. 10ʰ 5ᵐ 13.2ˢ (see Display).
minutes/seconds of a degree are distinct from minutes/seconds of an hour.
DimensionfulAngles.ʰᵃ — ConstantʰᵃThe hour, a unit of angle defined as 1/24 turn.
Equivalent to hourAngleᵃ. This differs from UnitfulAngles.ʰ in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.ᵐᵃ — ConstantᵐᵃThe minute, a unit of angle defined as 1ʰ/60.
This differs from UnitfulAngles.ᵐ in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.ʰᵃ.
DimensionfulAngles.ˢᵃ — ConstantˢᵃThe second, a unit of angle defined as 1ʰ/3600.
This differs from UnitfulAngles.ˢ in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.ʰᵃ.
Display
Most of the time we want to express an angle in a single unit. However, in some fields it is common to express them in a sexagesimal system. Dimensionful.jl provides the function show_sexagesimal to display an angle in two different sexagesimal systems. The function sexagesimal returns these values rather than displaying them.
DimensionfulAngles.sexagesimal — Functionsexagesimal(x::Angle; base_unit::AngleUnits=°ᵃ)Convert an angle to the triple (unit, minutes of unit, seconds of unit), where unit is either degree (°ᵃ) or hour angle (ʰᵃ).
Minutes and seconds of a degree are different from minutes and seconds of an hour angle. In both cases a minute is 1/60ᵗʰ of the base unit and a second is 1/60ᵗʰ of that.
Example
julia> using DimensionfulAngles
julia> sexagesimal(20.2ua"°")
(20°, 11′, 59.99999999999746″)
julia> sexagesimal(20.2ua"°"; base_unit = ua"ʰ")
(1ʰ, 20ᵐ, 48.000000000000256ˢ)DimensionfulAngles.show_sexagesimal — Functionshow_sexagesimal(x::Angle; base_unit::AngleUnits=°ᵃ)Print an angle in units (u), minutes of unit (m), and seconds of unit (s) where unit is either degree (°ᵃ) or hour angle (ʰ). For degrees it is printed as u° m′ s″ and for hour angle as uʰ mᵐ sˢ.
Example
julia> using DimensionfulAngles
julia> show_sexagesimal(20.2ua"°")
20° 11′ 59.99999999999746″
julia> show_sexagesimal(20.2ua"°"; base_unit = ua"ʰ")
1ʰ 20ᵐ 48.000000000000256ˢFor most units, a space is inserted between the value and the unit, which is the default behavior from Unitful.jl. For the following units, this space is removed (e.g., 10° not 10 °):
°′″ʰᵐˢ
Syntax
Contents:
DimensionfulAngles.arcminuteᵃ — ConstantarcminuteᵃThe minute of arc, a unit of angle defined as 1°/60.
This differs from UnitfulAngles.arcminute in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.°ᵃ.
DimensionfulAngles.arcsecondᵃ — ConstantarcsecondᵃThe second of arc, a unit of angle defined as 1°/3600.
This differs from UnitfulAngles.arcsecond in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.°ᵃ.
DimensionfulAngles.diameterPartᵃ — ConstantdiameterPartᵃThe diameter part, a unit of angle defined as 1/60 rad.
This differs from UnitfulAngles.diameterPart in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.radᵃ.
DimensionfulAngles.turnᵃ — ConstantturnᵃThe turn, a unit of angle defined as 2π rad.
Equivalent to a full cycle, revolution, or rotation. This differs from UnitfulAngles.turn in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.radᵃ.
DimensionfulAngles.doubleTurnᵃ — ConstantdoubleTurnᵃThe double turn, a unit of angle defined as 2 turn.
This differs from UnitfulAngles.doubleTurn in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.halfTurnᵃ — ConstanthalfTurnᵃThe half turn, a unit of angle defined as 1/2 turn.
This differs from UnitfulAngles.halfTurn in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.quadrantᵃ — ConstantquadrantᵃThe quadrant, a unit of angle defined as 1/4 turn.
This differs from UnitfulAngles.quadrant in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.sextantᵃ — ConstantsextantᵃThe sextant, a unit of angle defined as 1/6 turn.
This differs from UnitfulAngles.sextant in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.octantᵃ — ConstantoctantᵃThe octant, a unit of angle defined as 1/8 turn.
This differs from UnitfulAngles.octant in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.clockPositionᵃ — ConstantclockPositionᵃThe clock position, a unit of angle defined as 1/12 turn.
This differs from UnitfulAngles.clockPosition in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.hourAngleᵃ — ConstanthourAngleᵃThe hour angle, a unit of angle defined as 1/24 turn.
This differs from UnitfulAngles.hourAngle in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.compassPointᵃ — ConstantcompassPointᵃThe compass point, a unit of angle defined as 1/32 turn.
Other compass point definitions also exist. This differs from UnitfulAngles.compassPoint in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.hexacontadeᵃ — ConstanthexacontadeᵃThe hexacontade, a unit of angle defined as 1/60 turn.
This differs from UnitfulAngles.hexacontade in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.bradᵃ — ConstantbradᵃThe binary radian, a unit of angle defined as 1/256 turn.
Also known as the binary degree. This differs from UnitfulAngles.brad in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
DimensionfulAngles.gradᵃ — ConstantgradᵃThe gradian, a unit of angle defined as 1/400 turn.
This differs from UnitfulAngles.grad in that it contains units of angle. Does not accepts SI prefixes.
Dimension: 𝐀.
See also DimensionfulAngles.turnᵃ.
Prefixed units
DimensionfulAngles.Easᵃ — ConstantDimensionfulAngles.EasᵃA prefixed unit, equal to 10^18 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Gasᵃ — ConstantDimensionfulAngles.GasᵃA prefixed unit, equal to 10^9 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Masᵃ — ConstantDimensionfulAngles.MasᵃA prefixed unit, equal to 10^6 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Pasᵃ — ConstantDimensionfulAngles.PasᵃA prefixed unit, equal to 10^15 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Tasᵃ — ConstantDimensionfulAngles.TasᵃA prefixed unit, equal to 10^12 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Yasᵃ — ConstantDimensionfulAngles.YasᵃA prefixed unit, equal to 10^24 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.Zasᵃ — ConstantDimensionfulAngles.ZasᵃA prefixed unit, equal to 10^21 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.aasᵃ — ConstantDimensionfulAngles.aasᵃA prefixed unit, equal to 10^-18 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.casᵃ — ConstantDimensionfulAngles.casᵃA prefixed unit, equal to 10^-2 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.daasᵃ — ConstantDimensionfulAngles.daasᵃA prefixed unit, equal to 10^1 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.dasᵃ — ConstantDimensionfulAngles.dasᵃA prefixed unit, equal to 10^-1 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.fasᵃ — ConstantDimensionfulAngles.fasᵃA prefixed unit, equal to 10^-15 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.hasᵃ — ConstantDimensionfulAngles.hasᵃA prefixed unit, equal to 10^2 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.kasᵃ — ConstantDimensionfulAngles.kasᵃA prefixed unit, equal to 10^3 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.masᵃ — ConstantDimensionfulAngles.masᵃA prefixed unit, equal to 10^-3 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.nasᵃ — ConstantDimensionfulAngles.nasᵃA prefixed unit, equal to 10^-9 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.pasᵃ — ConstantDimensionfulAngles.pasᵃA prefixed unit, equal to 10^-12 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.yasᵃ — ConstantDimensionfulAngles.yasᵃA prefixed unit, equal to 10^-24 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.zasᵃ — ConstantDimensionfulAngles.zasᵃA prefixed unit, equal to 10^-21 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.
DimensionfulAngles.μasᵃ — ConstantDimensionfulAngles.μasᵃA prefixed unit, equal to 10^-6 asᵃ.
Dimension: 𝐀
See also: DimensionfulAngles.asᵃ.