From f8584e51bb308ee216bdf2107ae653c32cf9ef01 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 16 Jul 2023 18:15:49 +0000 Subject: [PATCH] build based on 2862005 --- dev/guide/base/index.html | 2 +- dev/guide/derived/index.html | 4 ++-- dev/guide/intro/index.html | 10 +++++----- dev/guide/units/index.html | 6 +++--- dev/index.html | 2 +- dev/motivation/index.html | 2 +- dev/proposed/index.html | 2 +- dev/search/index.html | 2 +- dev/syntax/index.html | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dev/guide/base/index.html b/dev/guide/base/index.html index 1b8dd7d..dc55609 100644 --- a/dev/guide/base/index.html +++ b/dev/guide/base/index.html @@ -14,4 +14,4 @@ 10.519999999999992°

The functions with a *d version and deg2rad only accept angles in degrees and functions with a *pi version only accept angles in half turns. Similarly, rad2deg only accepts angles in radians. The functions exp and expm1 only accept imaginary angles, that is 1im*θ for some angle θ.

Additionally, several inverse functions in base are extended to return quantities with dimensionful angles when requested. This is requested by providing a unit as the first argument. For instance

julia> using DimensionfulAngles
 
 julia> acos(ua"°", 0.9831912354632536)
-10.52000000000001°

The functions in Base that are currently extended to accept units as their first argument and return values with those units are:

+10.52000000000001°

The functions in Base that are currently extended to accept units as their first argument and return values with those units are:

diff --git a/dev/guide/derived/index.html b/dev/guide/derived/index.html index 175b639..fd415d8 100644 --- a/dev/guide/derived/index.html +++ b/dev/guide/derived/index.html @@ -1,5 +1,5 @@ -Derived dimensions · DimensionfulAngles

Derived dimensions

DimensionfulAngles.jl also defines derived dimensions that include angle. These are:

This allows, among other things, dispatching on these derived dimensions.

Several units are defined for these derived dimensions, including the steradian for solid angle and RPM for angular velocity.

DimensionfulAngles.jl also provides Periodic a UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.

Solid Angle

Solid angle is a two-dimensional angle subtended at a point. In the SI system it has units of $m²/m²=1$ and is non-dimensional. Here, following several proposed systems, it has dimensions of angle squared, 𝐀². See Relation to proposed SI extensions. The SI unit of solid angle is the steradian, which here is defined as $sr=rad²$. The steradian takes SI prefixes and therefore defines many other units (e.g., the millisteradian DimensionfulAngles.msrᵃ). These are documented in Prefixed units.

DimensionfulAngles.SolidAngleType
DimensionfulAngles.SolidAngle{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐀 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.srᵃConstant
srᵃ

The steradian, a unit of spherical angle.

There are 4π sr in a sphere. The steradian is the SI unit of solid angle. Unlike Unitful.sr, which follows SI and is therefor dimensionless, srᵃ has dimensions of Angle squared. Accepts SI prefixes.

Dimension: 𝐀²."

source

Angular velocity and acceleration

Content:

Angular velocity has dimensions of angle over time 𝐀/𝐓 and can be used to measure different quantities such as rotational velocity, rotational speed, and angular frequency of a phase angle. Two units of angular velocity are defined: the revolutions per second (RPS) and the revolutions per minute (RPM), provided as DimensionfulAngles.rpsᵃ and DimensionfulAngles.rpmᵃ respectively.

Angular acceleration is the time rate of change of angular velocity and has dimensions of angle over time squared 𝐀/𝐓². No units are defined specifically for this derived dimension.

DimensionfulAngles.AngularVelocityType
DimensionfulAngles.AngularVelocity{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐓 ^ -1 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.AngularAccelerationType
DimensionfulAngles.AngularAcceleration{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐓 ^ -2 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.rpsᵃConstant
rpsᵃ

Revolutions per second, a unit of angular velocity defined as 2π rad / s.

This differs from Unitful.rps in that it contains units of angle. Does not accepts SI prefixes.

Dimension: 𝐀 𝐓⁻¹.

See also DimensionfulAngles.radᵃ.

source
DimensionfulAngles.rpmᵃConstant
rpmᵃ

Revolutions per minute, a unit of angular velocity defined as 2π rad / minute.

This differs from Unitful.rpm in that it contains units of angle. Does not accepts SI prefixes.

Dimension: 𝐀 𝐓⁻¹.

See also DimensionfulAngles.radᵃ.

source

Periodic equivalence

For periodic responses there are several analogous ways to measure the repeat period: period T (𝐓, s), frequency f (1/𝐓, Hz=1/s), or angular frequency ω (𝐀/𝐓, rad/s). These are related by

$f = 1/T = ω/2π$.

DimensionfulAngles.jl provides Periodic a UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.

DimensionfulAngles.PeriodicType
Periodic()

Equivalence to convert between period, frequency, and angular frequency according to the relation $f = ω/2π = 1/T$, where

  • $f$ is the frequency,
  • $ω$ is the angular speed and
  • $T$ is the period.

Example

julia> using Unitful
+Derived dimensions · DimensionfulAngles

Derived dimensions

DimensionfulAngles.jl also defines derived dimensions that include angle. These are:

This allows, among other things, dispatching on these derived dimensions.

Several units are defined for these derived dimensions, including the steradian for solid angle and RPM for angular velocity.

DimensionfulAngles.jl also provides Periodic a UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.

Solid Angle

Solid angle is a two-dimensional angle subtended at a point. In the SI system it has units of $m²/m²=1$ and is non-dimensional. Here, following several proposed systems, it has dimensions of angle squared, 𝐀². See Relation to proposed SI extensions. The SI unit of solid angle is the steradian, which here is defined as $sr=rad²$. The steradian takes SI prefixes and therefore defines many other units (e.g., the millisteradian DimensionfulAngles.msrᵃ). These are documented in Prefixed units.

DimensionfulAngles.SolidAngleType
DimensionfulAngles.SolidAngle{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐀 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.srᵃConstant
srᵃ

The steradian, a unit of spherical angle.

There are 4π sr in a sphere. The steradian is the SI unit of solid angle. Unlike Unitful.sr, which follows SI and is therefor dimensionless, srᵃ has dimensions of Angle squared. Accepts SI prefixes.

Dimension: 𝐀²."

source

Angular velocity and acceleration

Content:

Angular velocity has dimensions of angle over time 𝐀/𝐓 and can be used to measure different quantities such as rotational velocity, rotational speed, and angular frequency of a phase angle. Two units of angular velocity are defined: the revolutions per second (RPS) and the revolutions per minute (RPM), provided as DimensionfulAngles.rpsᵃ and DimensionfulAngles.rpmᵃ respectively.

Angular acceleration is the time rate of change of angular velocity and has dimensions of angle over time squared 𝐀/𝐓². No units are defined specifically for this derived dimension.

DimensionfulAngles.AngularVelocityType
DimensionfulAngles.AngularVelocity{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐓 ^ -1 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.AngularAccelerationType
DimensionfulAngles.AngularAcceleration{T, U}

A supertype for quantities and levels of dimension 𝐀 * 𝐓 ^ -2 with a value of type T and units U.

See also: Unitful.Quantity, Unitful.Level.

DimensionfulAngles.rpsᵃConstant
rpsᵃ

Revolutions per second, a unit of angular velocity defined as 2π rad / s.

This differs from Unitful.rps in that it contains units of angle. Does not accepts SI prefixes.

Dimension: 𝐀 𝐓⁻¹.

See also DimensionfulAngles.radᵃ.

source
DimensionfulAngles.rpmᵃConstant
rpmᵃ

Revolutions per minute, a unit of angular velocity defined as 2π rad / minute.

This differs from Unitful.rpm in that it contains units of angle. Does not accepts SI prefixes.

Dimension: 𝐀 𝐓⁻¹.

See also DimensionfulAngles.radᵃ.

source

Periodic equivalence

For periodic responses there are several analogous ways to measure the repeat period: period T (𝐓, s), frequency f (1/𝐓, Hz=1/s), or angular frequency ω (𝐀/𝐓, rad/s). These are related by

$f = 1/T = ω/2π$.

DimensionfulAngles.jl provides Periodic a UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.

DimensionfulAngles.PeriodicType
Periodic()

Equivalence to convert between period, frequency, and angular frequency according to the relation $f = ω/2π = 1/T$, where

  • $f$ is the frequency,
  • $ω$ is the angular speed and
  • $T$ is the period.

Example

julia> using Unitful
 
 julia> using DimensionfulAngles
 
@@ -7,4 +7,4 @@
 0.1 s
 
 julia> uconvert(u"radᵃ/s", 1u"Hz", Periodic())
-6.283185307179586 rad s⁻¹
source

Syntax

Contents:

Syntax provided by Unitful.jl

DimensionfulAngles.AngularVelocityUnitsType
DimensionfulAngles.AngularVelocityUnits{U}

A supertype for units of dimension 𝐀 * 𝐓 ^ -1. Equivalent to Unitful.Units{U, 𝐀 * 𝐓 ^ -1}.

See also: Unitful.Units.

DimensionfulAngles.AngularVelocityFreeUnitsType
DimensionfulAngles.AngularVelocityFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension 𝐀 * 𝐓 ^ -1. Equivalent to Unitful.FreeUnits{U, 𝐀 * 𝐓 ^ -1}.

DimensionfulAngles.AngularAccelerationUnitsType
DimensionfulAngles.AngularAccelerationUnits{U}

A supertype for units of dimension 𝐀 * 𝐓 ^ -2. Equivalent to Unitful.Units{U, 𝐀 * 𝐓 ^ -2}.

See also: Unitful.Units.

DimensionfulAngles.SolidAngleUnitsType
DimensionfulAngles.SolidAngleUnits{U}

A supertype for units of dimension 𝐀 * 𝐀. Equivalent to Unitful.Units{U, 𝐀 * 𝐀}.

See also: Unitful.Units.

DimensionfulAngles.SolidAngleFreeUnitsType
DimensionfulAngles.SolidAngleFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension 𝐀 * 𝐀. Equivalent to Unitful.FreeUnits{U, 𝐀 * 𝐀}.

Prefixed Units

+6.283185307179586 rad s⁻¹
source

Syntax

Contents:

Syntax provided by Unitful.jl

DimensionfulAngles.AngularVelocityUnitsType
DimensionfulAngles.AngularVelocityUnits{U}

A supertype for units of dimension 𝐀 * 𝐓 ^ -1. Equivalent to Unitful.Units{U, 𝐀 * 𝐓 ^ -1}.

See also: Unitful.Units.

DimensionfulAngles.AngularVelocityFreeUnitsType
DimensionfulAngles.AngularVelocityFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension 𝐀 * 𝐓 ^ -1. Equivalent to Unitful.FreeUnits{U, 𝐀 * 𝐓 ^ -1}.

DimensionfulAngles.AngularAccelerationUnitsType
DimensionfulAngles.AngularAccelerationUnits{U}

A supertype for units of dimension 𝐀 * 𝐓 ^ -2. Equivalent to Unitful.Units{U, 𝐀 * 𝐓 ^ -2}.

See also: Unitful.Units.

DimensionfulAngles.SolidAngleUnitsType
DimensionfulAngles.SolidAngleUnits{U}

A supertype for units of dimension 𝐀 * 𝐀. Equivalent to Unitful.Units{U, 𝐀 * 𝐀}.

See also: Unitful.Units.

DimensionfulAngles.SolidAngleFreeUnitsType
DimensionfulAngles.SolidAngleFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension 𝐀 * 𝐀. Equivalent to Unitful.FreeUnits{U, 𝐀 * 𝐀}.

Prefixed Units

diff --git a/dev/guide/intro/index.html b/dev/guide/intro/index.html index beeb314..9449cd3 100644 --- a/dev/guide/intro/index.html +++ b/dev/guide/intro/index.html @@ -48,13 +48,13 @@ 0.9825467074800567 rad julia> cos(45ua"°") -0.7071067811865476source
DimensionfulAngles.𝐀Constant
𝐀

A dimension representing Angle.

Not SI

Angle is not an SI base dimension.

source
DimensionfulAngles.radᵃConstant
radᵃ

The radian, a unit of angle.

There are 2π rad in a circle. The radian is the SI unit of angle. Unlike Unitful.rad, which follows SI and is therefor dimensionless, radᵃ has dimensions of Angle. Accepts SI prefixes.

Dimension: DimensionfulAngles.𝐀.

Examples

julia> using DimensionfulAngles
+0.7071067811865476
source
DimensionfulAngles.𝐀Constant
𝐀

A dimension representing Angle.

Not SI

Angle is not an SI base dimension.

source
DimensionfulAngles.radᵃConstant
radᵃ

The radian, a unit of angle.

There are 2π rad in a circle. The radian is the SI unit of angle. Unlike Unitful.rad, which follows SI and is therefor dimensionless, radᵃ has dimensions of Angle. Accepts SI prefixes.

Dimension: DimensionfulAngles.𝐀.

Examples

julia> using DimensionfulAngles
 
 julia> 1.0ua"rad" + 20.0ua"mrad"
-1.02 rad
source
DimensionfulAngles.°ᵃConstant
°ᵃ

The degree, a unit of angle.

There are 360° in a circle. The degree is an SI-accepted unit of angle. Unlike Unitful.°, which follows SI and is therefor dimensionless, °ᵃ has dimensions of Angle. Does not accepts SI prefixes.

Dimension: DimensionfulAngles.𝐀.

Examples

julia> using DimensionfulAngles
+1.02 rad
source
DimensionfulAngles.°ᵃConstant
°ᵃ

The degree, a unit of angle.

There are 360° in a circle. The degree is an SI-accepted unit of angle. Unlike Unitful.°, which follows SI and is therefor dimensionless, °ᵃ has dimensions of Angle. Does not accepts SI prefixes.

Dimension: DimensionfulAngles.𝐀.

Examples

julia> using DimensionfulAngles
 
 julia> 1ua"°"
-1°
source
DimensionfulAngles.θ₀Constant
θ₀

A quantity equal to the central angle of a plane circular sector whose arc length is equal to that of its radius. It has a value of exactly 1 rad or approximately 57.2958°. Used as the defining constant of Angle dimension in several proposed SI extension systems.

Dimensions: 𝐀.

See also DimensionfulAngles.radᵃ.

Examples

julia> using DimensionfulAngles
+1°
source
DimensionfulAngles.θ₀Constant
θ₀

A quantity equal to the central angle of a plane circular sector whose arc length is equal to that of its radius. It has a value of exactly 1 rad or approximately 57.2958°. Used as the defining constant of Angle dimension in several proposed SI extension systems.

Dimensions: 𝐀.

See also DimensionfulAngles.radᵃ.

Examples

julia> using DimensionfulAngles
 
 julia> θ₀
 1//1 rad
@@ -63,10 +63,10 @@
 57.29577951308232°
 
 julia> 2.1ua"rad" / θ₀
-2.1
source
DimensionfulAngles.@ua_strMacro
macro ua_str(unit)

String macro to easily recall units with angular dimension located in the DimensionfulAngles package. Although all unit symbols in that package are suffixed with , the suffix should not be used when using this macro.

Note that what goes inside must be parsable as a valid Julia expression.

Examples

julia> using DimensionfulAngles
+2.1
source
DimensionfulAngles.@ua_strMacro
macro ua_str(unit)

String macro to easily recall units with angular dimension located in the DimensionfulAngles package. Although all unit symbols in that package are suffixed with , the suffix should not be used when using this macro.

Note that what goes inside must be parsable as a valid Julia expression.

Examples

julia> using DimensionfulAngles
 
 julia> 1.0ua"turn"
 1.0 τ
 
 julia> 1.0ua"rad" - 1.0ua"°"
-0.9825467074800567 rad
source
DimensionfulAngles.DefaultSymbolsModule

Imports default units into the workspace.

This replicates the behavior of Unitful.DefaultSymbols in Unitful.jl/src/pkgdefaults.jl but replaces Unitful Angles with DimensionfulAngles angles.

Examples

julia> using DimensionfulAngles.DefaultSymbols

will bring the following into the calling namespace:

  • Dimensions 𝐋,𝐌,𝐓,𝐈,𝚯,𝐉,𝐍 and 𝐀

  • Base and derived SI units, with SI prefixes

    • Candela conflicts with Base.cd so it is not brought in (Unitful.jl issue #102)
  • Degrees: °

All angles imported removing the ᵃ superscript.

Potential conflict with other packages

All angles are imported removing the ᵃ superscript. This means, e.g., ° == u"°ᵃ" instead of u"°". This may cause conflicts with other packages that assume angles are the dimensionless ones from Unitful.

source

Syntax provided by Unitful.jl

DimensionfulAngles.AngleType
DimensionfulAngles.Angle{T, U}

A supertype for quantities and levels of dimension DimensionfulAngles.𝐀 with a value of type T and units U.

See also: DimensionfulAngles.𝐀, Unitful.Quantity, Unitful.Level.

DimensionfulAngles.AngleUnitsType
DimensionfulAngles.AngleUnits{U}

A supertype for units of dimension DimensionfulAngles.𝐀. Equivalent to Unitful.Units{U, DimensionfulAngles.𝐀}.

See also: DimensionfulAngles.𝐀, Unitful.Units.

DimensionfulAngles.AngleFreeUnitsType
DimensionfulAngles.AngleFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension DimensionfulAngles.𝐀. Equivalent to Unitful.FreeUnits{U, DimensionfulAngles.𝐀}.

See also: DimensionfulAngles.𝐀.

Prefixed units

DimensionfulAngles.EradᵃConstant
DimensionfulAngles.Eradᵃ

A prefixed unit, equal to 10^18 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.GradᵃConstant
DimensionfulAngles.Gradᵃ

A prefixed unit, equal to 10^9 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.MradᵃConstant
DimensionfulAngles.Mradᵃ

A prefixed unit, equal to 10^6 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.PradᵃConstant
DimensionfulAngles.Pradᵃ

A prefixed unit, equal to 10^15 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.TradᵃConstant
DimensionfulAngles.Tradᵃ

A prefixed unit, equal to 10^12 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.YradᵃConstant
DimensionfulAngles.Yradᵃ

A prefixed unit, equal to 10^24 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.ZradᵃConstant
DimensionfulAngles.Zradᵃ

A prefixed unit, equal to 10^21 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.aradᵃConstant
DimensionfulAngles.aradᵃ

A prefixed unit, equal to 10^-18 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.cradᵃConstant
DimensionfulAngles.cradᵃ

A prefixed unit, equal to 10^-2 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.daradᵃConstant
DimensionfulAngles.daradᵃ

A prefixed unit, equal to 10^1 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.dradᵃConstant
DimensionfulAngles.dradᵃ

A prefixed unit, equal to 10^-1 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.fradᵃConstant
DimensionfulAngles.fradᵃ

A prefixed unit, equal to 10^-15 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.hradᵃConstant
DimensionfulAngles.hradᵃ

A prefixed unit, equal to 10^2 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.kradᵃConstant
DimensionfulAngles.kradᵃ

A prefixed unit, equal to 10^3 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.mradᵃConstant
DimensionfulAngles.mradᵃ

A prefixed unit, equal to 10^-3 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.nradᵃConstant
DimensionfulAngles.nradᵃ

A prefixed unit, equal to 10^-9 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.pradᵃConstant
DimensionfulAngles.pradᵃ

A prefixed unit, equal to 10^-12 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.yradᵃConstant
DimensionfulAngles.yradᵃ

A prefixed unit, equal to 10^-24 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.zradᵃConstant
DimensionfulAngles.zradᵃ

A prefixed unit, equal to 10^-21 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.μradᵃConstant
DimensionfulAngles.μradᵃ

A prefixed unit, equal to 10^-6 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

+0.9825467074800567 radsource
DimensionfulAngles.DefaultSymbolsModule

Imports default units into the workspace.

This replicates the behavior of Unitful.DefaultSymbols in Unitful.jl/src/pkgdefaults.jl but replaces Unitful Angles with DimensionfulAngles angles.

Examples

julia> using DimensionfulAngles.DefaultSymbols

will bring the following into the calling namespace:

  • Dimensions 𝐋,𝐌,𝐓,𝐈,𝚯,𝐉,𝐍 and 𝐀

  • Base and derived SI units, with SI prefixes

    • Candela conflicts with Base.cd so it is not brought in (Unitful.jl issue #102)
  • Degrees: °

All angles imported removing the ᵃ superscript.

Potential conflict with other packages

All angles are imported removing the ᵃ superscript. This means, e.g., ° == u"°ᵃ" instead of u"°". This may cause conflicts with other packages that assume angles are the dimensionless ones from Unitful.

source

Syntax provided by Unitful.jl

DimensionfulAngles.AngleType
DimensionfulAngles.Angle{T, U}

A supertype for quantities and levels of dimension DimensionfulAngles.𝐀 with a value of type T and units U.

See also: DimensionfulAngles.𝐀, Unitful.Quantity, Unitful.Level.

DimensionfulAngles.AngleUnitsType
DimensionfulAngles.AngleUnits{U}

A supertype for units of dimension DimensionfulAngles.𝐀. Equivalent to Unitful.Units{U, DimensionfulAngles.𝐀}.

See also: DimensionfulAngles.𝐀, Unitful.Units.

DimensionfulAngles.AngleFreeUnitsType
DimensionfulAngles.AngleFreeUnits{U}

A supertype for Unitful.FreeUnits of dimension DimensionfulAngles.𝐀. Equivalent to Unitful.FreeUnits{U, DimensionfulAngles.𝐀}.

See also: DimensionfulAngles.𝐀.

Prefixed units

DimensionfulAngles.EradᵃConstant
DimensionfulAngles.Eradᵃ

A prefixed unit, equal to 10^18 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.GradᵃConstant
DimensionfulAngles.Gradᵃ

A prefixed unit, equal to 10^9 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.MradᵃConstant
DimensionfulAngles.Mradᵃ

A prefixed unit, equal to 10^6 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.PradᵃConstant
DimensionfulAngles.Pradᵃ

A prefixed unit, equal to 10^15 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.TradᵃConstant
DimensionfulAngles.Tradᵃ

A prefixed unit, equal to 10^12 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.YradᵃConstant
DimensionfulAngles.Yradᵃ

A prefixed unit, equal to 10^24 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.ZradᵃConstant
DimensionfulAngles.Zradᵃ

A prefixed unit, equal to 10^21 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.aradᵃConstant
DimensionfulAngles.aradᵃ

A prefixed unit, equal to 10^-18 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.cradᵃConstant
DimensionfulAngles.cradᵃ

A prefixed unit, equal to 10^-2 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.daradᵃConstant
DimensionfulAngles.daradᵃ

A prefixed unit, equal to 10^1 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.dradᵃConstant
DimensionfulAngles.dradᵃ

A prefixed unit, equal to 10^-1 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.fradᵃConstant
DimensionfulAngles.fradᵃ

A prefixed unit, equal to 10^-15 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.hradᵃConstant
DimensionfulAngles.hradᵃ

A prefixed unit, equal to 10^2 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.kradᵃConstant
DimensionfulAngles.kradᵃ

A prefixed unit, equal to 10^3 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.mradᵃConstant
DimensionfulAngles.mradᵃ

A prefixed unit, equal to 10^-3 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.nradᵃConstant
DimensionfulAngles.nradᵃ

A prefixed unit, equal to 10^-9 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.pradᵃConstant
DimensionfulAngles.pradᵃ

A prefixed unit, equal to 10^-12 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.yradᵃConstant
DimensionfulAngles.yradᵃ

A prefixed unit, equal to 10^-24 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.zradᵃConstant
DimensionfulAngles.zradᵃ

A prefixed unit, equal to 10^-21 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

DimensionfulAngles.μradᵃConstant
DimensionfulAngles.μradᵃ

A prefixed unit, equal to 10^-6 radᵃ.

Dimension: 𝐀

See also: DimensionfulAngles.radᵃ.

diff --git a/dev/guide/units/index.html b/dev/guide/units/index.html index 412eb49..94f7094 100644 --- a/dev/guide/units/index.html +++ b/dev/guide/units/index.html @@ -1,14 +1,14 @@ -Other units of angle · DimensionfulAngles

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; this differs in that it contains units of angle.

Abbreviation conflicts with `Unitful.jl`
  • both attoseconds and arcseconds are abbreviated as as.
  • both decaseconds and deciarcseconds are abbreviated as das.

Dimension: 𝐀.

See also DimensionfulAngles.arcsecondᵃ.

source

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.

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; 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
+Other units of angle · DimensionfulAngles

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; this differs in that it contains units of angle.

Abbreviation conflicts with `Unitful.jl`
  • both attoseconds and arcseconds are abbreviated as as.
  • both decaseconds and deciarcseconds are abbreviated as das.

Dimension: 𝐀.

See also DimensionfulAngles.arcsecondᵃ.

source

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.

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; 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.00000000000026ˢ)
source
DimensionfulAngles.show_sexagesimalFunction
show_sexagesimal(x::Angle; 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
+(1ʰ, 20ᵐ, 48.00000000000026ˢ)
source
DimensionfulAngles.show_sexagesimalFunction
show_sexagesimal(x::Angle; 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.00000000000026ˢ
source

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

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

source

Prefixed units

+1ʰ 20ᵐ 48.00000000000026ˢ
source

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

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

source

Prefixed units

diff --git a/dev/index.html b/dev/index.html index ec46b8b..859f2eb 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · DimensionfulAngles

DimensionfulAngles.jl

An extension of Unitful.jl to include angle as a dimension.

While angle is not an SI base dimension, it can be extremely useful to consider it as one in computer units systems. This allows, among other things, dispatching on angles. This package creates a single additional dimension angle which is assigned to both plane and phase angles.

Note

Please read through the Unitful.jl documentation first. This package extends Unitful.jl and documentation for the main usage and features of Unitful.jl are not duplicated here.

Angle as a dimension?

For motivating examples on why this is useful, see Angle as a dimension?. The main takeaway is that

While the choice to use the SI dimensions in Unitful is the right one, for use cases that deal extensively with a dimensionless quantity, it can be extremely useful to extend the base dimensions to include that quantity. This package extends it to use angles as a dimension.

Package Guide

The Package Guide is the main documentation for the package and includes usage details and examples of all of DimensionfulAngles.jl's capabilities. These include

  • Angle as a base dimension.
  • A comprehensive list of angular units.
  • The @ua_str macro for easily accessing these units.
  • Derived dimensions and their units, including: solid angles, angular velocity/frequency, and angular acceleration.
  • A UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.
  • A comprehensive extension of functions in Base that take angular quantities as inputs, or output angular quantities.

Relationship to proposed SI extensions

This package extends the number of base dimensions solely for convenience when working with unitful quantities on a computer. This package does not propose or promote any official extension of the SI system. Such proposals do exist, and for completeness these are discussed in Relation to proposed SI extensions.

Definitions

These definitions are based on the SI Brochure. In particular note the distinction between a quantity (which has a value and a unit), its unit, and its dimension. A (base or derived) dimension has a unique standard SI unit, but the converse is not true. E.g. both torque and energy, two distinct quantities, have the same dimension. Also note the distinction between plane and phase angles as distinct quantities, and angular velocity and angular frequency as distinct quantities.

  • Angle: Either a plane or phase angle.
  • Plane Angle: The angle between two lines originating from a common point.
  • Phase Angle or Phase: The argument of a complex number, i.e. the angle between the real axis and the radius of the polar representation of the complex number in the complex plane.
  • Unit: A particular example of the quantity concerned which is used as a reference. For a particular quantity different units may be used.
  • Dimension: A conventional system for organizing physical quantities. In the SI the seven base quantities are each assigned one dimension. The dimensions of all other (derived) quantities are written as a product of powers of the base dimensions according to the equations of physics that relate these quantities.
+Home · DimensionfulAngles

DimensionfulAngles.jl

An extension of Unitful.jl to include angle as a dimension.

While angle is not an SI base dimension, it can be extremely useful to consider it as one in computer units systems. This allows, among other things, dispatching on angles. This package creates a single additional dimension angle which is assigned to both plane and phase angles.

Note

Please read through the Unitful.jl documentation first. This package extends Unitful.jl and documentation for the main usage and features of Unitful.jl are not duplicated here.

Angle as a dimension?

For motivating examples on why this is useful, see Angle as a dimension?. The main takeaway is that

While the choice to use the SI dimensions in Unitful is the right one, for use cases that deal extensively with a dimensionless quantity, it can be extremely useful to extend the base dimensions to include that quantity. This package extends it to use angles as a dimension.

Package Guide

The Package Guide is the main documentation for the package and includes usage details and examples of all of DimensionfulAngles.jl's capabilities. These include

  • Angle as a base dimension.
  • A comprehensive list of angular units.
  • The @ua_str macro for easily accessing these units.
  • Derived dimensions and their units, including: solid angles, angular velocity/frequency, and angular acceleration.
  • A UnitfulEquivalences.jl Equivalence to convert between period, frequency, and angular frequency of a periodic response.
  • A comprehensive extension of functions in Base that take angular quantities as inputs, or output angular quantities.

Relationship to proposed SI extensions

This package extends the number of base dimensions solely for convenience when working with unitful quantities on a computer. This package does not propose or promote any official extension of the SI system. Such proposals do exist, and for completeness these are discussed in Relation to proposed SI extensions.

Definitions

These definitions are based on the SI Brochure. In particular note the distinction between a quantity (which has a value and a unit), its unit, and its dimension. A (base or derived) dimension has a unique standard SI unit, but the converse is not true. E.g. both torque and energy, two distinct quantities, have the same dimension. Also note the distinction between plane and phase angles as distinct quantities, and angular velocity and angular frequency as distinct quantities.

  • Angle: Either a plane or phase angle.
  • Plane Angle: The angle between two lines originating from a common point.
  • Phase Angle or Phase: The argument of a complex number, i.e. the angle between the real axis and the radius of the polar representation of the complex number in the complex plane.
  • Unit: A particular example of the quantity concerned which is used as a reference. For a particular quantity different units may be used.
  • Dimension: A conventional system for organizing physical quantities. In the SI the seven base quantities are each assigned one dimension. The dimensions of all other (derived) quantities are written as a product of powers of the base dimensions according to the equations of physics that relate these quantities.
diff --git a/dev/motivation/index.html b/dev/motivation/index.html index 17b2843..fd9fbf0 100644 --- a/dev/motivation/index.html +++ b/dev/motivation/index.html @@ -51,4 +51,4 @@ "I am an angle?" julia> what_am_i(percent) -"I am an angle?"

Takeaways

The main takeaway is that

While the choice to use the SI dimensions in Unitful is the right one, for use cases that deal extensively with a dimensionless quantity, it can be extremely useful to extend the base dimensions to include that quantity. This package extends it to use angles as a dimension.

There will always be quantities which are dimensionless and have units of 1 as well as distinct quantities with the same dimensions. There is no "complete" system and this package is simply an extension to facilitate working with angles specifically. And while this resolves some confusion between, for example frequency and angular frequency (which have the same dimension in SI), there are still different quantities with the same dimension of angle, namely plane angles and phase angles.

+"I am an angle?"

Takeaways

The main takeaway is that

While the choice to use the SI dimensions in Unitful is the right one, for use cases that deal extensively with a dimensionless quantity, it can be extremely useful to extend the base dimensions to include that quantity. This package extends it to use angles as a dimension.

There will always be quantities which are dimensionless and have units of 1 as well as distinct quantities with the same dimensions. There is no "complete" system and this package is simply an extension to facilitate working with angles specifically. And while this resolves some confusion between, for example frequency and angular frequency (which have the same dimension in SI), there are still different quantities with the same dimension of angle, namely plane angles and phase angles.

diff --git a/dev/proposed/index.html b/dev/proposed/index.html index 7d63e38..1d71d82 100644 --- a/dev/proposed/index.html +++ b/dev/proposed/index.html @@ -21,4 +21,4 @@
B P Leonard, Proposal for the dimensionally consistent treatment of angle and solid angle by the International System of Units (SI), Metrologia, 58(5), 052001, 2021.
- + diff --git a/dev/search/index.html b/dev/search/index.html index a3d160b..a29f8a7 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · DimensionfulAngles

Loading search...

    +Search · DimensionfulAngles

    Loading search...

      diff --git a/dev/syntax/index.html b/dev/syntax/index.html index ecdf351..fcfa5bf 100644 --- a/dev/syntax/index.html +++ b/dev/syntax/index.html @@ -1,2 +1,2 @@ -Index · DimensionfulAngles

      Index

      +Index · DimensionfulAngles

      Index