Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ephem

A class representing Kepler ephemerides.

example
const NEPTUNE = new Ephem({
  epoch: 2458426.500000000,
  a: 3.009622263428050E+01,
  e: 7.362571187193770E-03,
  i: 1.774569249829094E+00,
  om: 1.318695882492132E+02,
  w: 2.586226409499831E+02,
  ma: 3.152804988924479E+02,
}, 'deg'),

Hierarchy

  • Ephem

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Ephem(initialValues: EphemAttributes, units?: "rad" | "deg", locked?: boolean): Ephem
  • Parameters

    • initialValues: EphemAttributes

      A dictionary of initial values. Not all values are required as some may be inferred from others.

    • units: "rad" | "deg" = 'rad'

      The unit of angles in the list of initial values.

    • locked: boolean = false

    Returns Ephem

Properties

Private attrs

attrs: EphemAttributes

Private locked

locked: boolean

Methods

copy

Private fill

  • fill(): void

get

  • get(attr: EphemAttribute, units?: "rad" | "deg"): number
  • Gets an ephemerides attribute.

    Parameters

    • attr: EphemAttribute

      The name of the attribute (e.g. 'a')

    • units: "rad" | "deg" = 'rad'

      The unit of angle desired, if applicable. This input is ignored for values that are not angle measurements.

    Returns number

    Ephemeris attribute value

getUnsafe

  • getUnsafe(attr: EphemAttribute, units?: "rad" | "deg"): undefined | number
  • Gets an ephemerides attribute, but may return undefined if it's not set.

    Parameters

    • attr: EphemAttribute

      The name of the attribute (e.g. 'a')

    • units: "rad" | "deg" = 'rad'

      The unit of angle desired, if applicable. This input is ignored for values that are not angle measurements.

    Returns undefined | number

    Ephemeris attribute value, or undefined

lock

  • lock(): void
  • Make this ephem object immutable.

    Returns void

set

  • set(attr: EphemAttribute, val: number, units?: "rad" | "deg"): boolean
  • Sets an ephemerides attribute.

    Parameters

    • attr: EphemAttribute

      The name of the attribute (e.g. 'a')

    • val: number

      The value of the attribute (e.g. 0.5)

    • units: "rad" | "deg" = 'rad'

      The unit of angle provided, if applicable.

    Returns boolean

Generated using TypeDoc