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:

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ᵃConstant
asₐ

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.

Avoid abbreviation conflicts with `Unitful.jl`

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).

Note

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 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.sexagesimalFunction
sexagesimal(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 (ʰᵃ).

Note

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_sexagesimalFunction
show_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.turnᵃConstant
turnᵃ

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.bradᵃConstant
bradᵃ

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ᵃ.

Prefixed units