Options
All
  • Public
  • Public/Protected
  • All
Menu

Based on the CSW Angle class.

An wrapper for angle. Normally angle would be stored in double as radians, but this introduces rounding errors. This class stores value in microarcseconds to prevent rounding errors.

Hierarchy

  • Angle

Index

Constructors

constructor

  • new Angle(uas: number): Angle

Properties

Readonly uas

uas: number

Static Readonly CIRCLE

CIRCLE: number = ...

Static Readonly D2H

D2H: number = ...

multiply to convert degrees to archours

Static Readonly D2M

D2M: number = 60

multiply to convert degrees to arcminute

Static Readonly D2Mas

D2Mas: number = ...

multiply to convert degrees to milliarcseconds

Static Readonly D2R

D2R: number = ...

multiply to convert degrees to radians

Static Readonly D2S

D2S: number = 3600

multiply to convert degrees to arcsecond

Static Readonly D2Uas

D2Uas: number = ...

multiply to convert degrees to microarcseconds

Static Readonly DEGREE_SIGN

DEGREE_SIGN: "°" = '\u00B0'

round circle which marks degrees

Static Readonly H2D

H2D: number = ...

multiply to convert archour to degrees

Static Readonly H2Mas

H2Mas: number = ...

multiply to convert hours to milliarcseconds

Static Readonly H2R

H2R: number = ...

multiply to convert hours to radians

Static Readonly H2Uas

H2Uas: number = ...

multiply to convert hours to microarcseconds

Static Readonly HMin2Mas

HMin2Mas: number = ...

multiply to convert time minutes to milliarcseconds

Static Readonly HMin2Uas

HMin2Uas: number = ...

multiply to convert time minutes to microarcseconds

Static Readonly HSec2Mas

HSec2Mas: number = ...

multiply to convert time seconds to milliarcseconds

Static Readonly HSec2Uas

HSec2Uas: number = ...

multiply to convert time seconds to microarcseconds

Static Readonly M2D

M2D: number = ...

multiply to convert arcminute to toDegree

Static Readonly M2Mas

M2Mas: number = ...

multiply to convert minutes to milliarcseconds

Static Readonly M2R

M2R: number = ...

multiply to convert minutes to radians

Static Readonly M2Uas

M2Uas: number = ...

multiply to convert minutes to microarcseconds

Static Readonly Mas2R

Mas2R: number = ...

multiply to convert milliarcseconds to radians

Static Readonly R2D

R2D: number = ...

multiply to convert radians to degrees

Static Readonly R2H

R2H: number = ...

multiply to convert radians to hours

Static Readonly R2M

R2M: number = ...

multiply to convert radians to minutes

Static Readonly R2Mas

R2Mas: number = ...

multiply to convert radians to milliarcseconds

Static Readonly R2S

R2S: number = ...

multiply to convert radians to arcseconds

Static Readonly R2Uas

R2Uas: number = ...

multiply to convert radians to microarcseconds

Static Readonly S2D

S2D: number = ...

multiply to convert arcsecond to toDegree

Static Readonly S2Mas

S2Mas: number = 1000

multiply to convert Seconds to milliarcseconds

Static Readonly S2R

S2R: number = ...

multiply to convert arcseconds to radians

Static Readonly S2Uas

S2Uas: number = ...

multiply to convert Seconds to microarcseconds

Static Readonly Uas2D

Uas2D: number = ...

multiply to convert UAS to degrees

Static Readonly Uas2M

Uas2M: number = ...

multiply to convert UAS to minutes

Static Readonly Uas2R

Uas2R: number = ...

multiply to convert microarcseconds to radians

Static Readonly Uas2S

Uas2S: number = ...

multiply to convert UAS to Seconds

Methods

add

div

div2

  • div2(a2: number): Angle

mul

mul2

  • mul2(a2: number): Angle

normalizedRa

sub

toArcSec

  • toArcSec(): number

toDegree

  • toDegree(): number

toJSON

  • toJSON(): number

toMas

  • toMas(): number

toRadian

  • toRadian(): number

Static assertDe

  • assertDe(de: number): void

Static assertRa

  • assertRa(ra: number): void

Static deToString

  • deToString(de2: number): string
  • convert DE to string in format '1d 2m' minutes and seconds are auto added as needed

    Parameters

    • de2: number

      in radians

    Returns string

    de in string form

Static distance

  • distance(ra1: number, de1: number, ra2: number, de2: number): number
  • calculate great circle distance of two points, coordinates are given in radians

    Parameters

    • ra1: number
    • de1: number
    • ra2: number
    • de2: number

    Returns number

    distance of two points in radians

Static fromArcHour

  • fromArcHour(value: number): Angle

Static fromArcMinute

  • fromArcMinute(value: number): Angle

Static fromArcSec

  • fromArcSec(value: number): Angle

Static fromDegree

  • fromDegree(value: number): Angle

Static fromMas

  • fromMas(value: number): Angle

Static fromRadian

  • fromRadian(value: number): Angle

Static max

Static min

Static normalizeRa

  • normalizeRa(ra2: number): number

Static parseDe

  • parseDe(deSign: string, deDegree: string, deMin: string, deSec: null | string): Angle
  • Parse Declination from four values. It uses Big, so there are no rounding errors

    Parameters

    • deSign: string

      signum (ie + or -)

    • deDegree: string

      declination in degrees

    • deMin: string

      remaining part in arcminutes

    • deSec: null | string

      remaining part in arcseconds

    Returns Angle

    declination in microarcseconds

Static parseDeFromString

  • parseDeFromString(de: string): Angle

Static parseRa

  • parseRa(raHour: string, raMin: string, raSec: null | string): Angle
  • parse Right ascencion from triple values raHour raMin, raSec This method uses big decimal, so there are no rounding errors

    Parameters

    • raHour: string

      ra hours value as string

    • raMin: string

      ra minutes value as string

    • raSec: null | string

      ra seconds value as string

    Returns Angle

    result in microarcseconds

Static parseRaDe

  • Parses pair of RA and De coordinates. This method should handle formats used in vizier. An example: The following writings are allowed:

    20 54 05.689 +37 01 17.38
    10:12:45.3-45:17:50
    15h17m-11d10m
    15h17+89d15
    275d11m15.6954s+17d59m59.876s
    12.34567h-17.87654d
    350.123456d-17.33333d <=> 350.123456 -17.33333
    

    Parameters

    • str: string

    Returns [Angle, Angle]

Static parseRaFromString

  • parseRaFromString(ra: string): Angle
  • Tries to parse Angle from string. It knows common formats used for Right ascencion (including hours)

    Parameters

    • ra: string

    Returns Angle

Static raToString

  • raToString(ra: number): string
  • convert RA to string in format '1h 2m' minutes and seconds are auto added as needed

    Parameters

    • ra: number

      in radians

    Returns string

    ra in string form

Static randomDe

Static randomRa

Generated using TypeDoc