Home Reference Source

Function

Static Public Summary
public

auToKm(au: *): *

public

decimalToSexagesimalDec(decimal: *, isObserverBelowEquator: boolean): undefined[]

public
public

deg(val: *): *

public

eclipticToEquatorial_Cartesian(x: *, y: *, z: *, tilt: *): undefined[]

public

equatorialToEcliptic_Cartesian(x: *, y: *, z: *, tilt: *): undefined[]

public
public

getFullTextureUrl(template: String, basePath: String): *

Returns the complete URL to a texture given a basepath and a template url.

public

getFullUrl(template: String, basePath: String): *

Returns the complete URL to a texture given a basepath and a template url.

public

Get Earth's obliquity and nutation at a given date.

public

Get Earth's obliquity at a given date.

public

Get the number of units per AU.

public

getThreeJsTexture(template: *, basePath: *): *

public

hoursToDeg(val: *): *

public

kmToAu(km: *): *

public

rad(val: *): *

public

rescale(args: ...*): *

public

rescaleArray(XYZ: *): undefined[]

public

rescaleNumber(x: *): *

public

rescalePos(pos: *): *

public

rescaleVector(vec: *): *

public

rescaleXYZ(X: *, Y: *, Z: *): undefined[]

public

setScaleFactor(val: *)

Set the number of units per AU.

public

sexagesimalToDecimalDec(decDeg: *, decMin: *, decSec: *, isObserverBelowEquator: boolean): *

public

sexagesimalToDecimalRa(raHour: *, raMin: *, raSec: *): *

public

sphericalToCartesian(ra: *, dec: *, dist: *): undefined[]

Static Public

public auToKm(au: *): * source

import {auToKm} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
au *

Return:

*

public decimalToSexagesimalDec(decimal: *, isObserverBelowEquator: boolean): undefined[] source

import {decimalToSexagesimalDec} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
decimal *
isObserverBelowEquator boolean
  • optional
  • default: false

Return:

undefined[]

public decimalToSexagesimalRa(decimal: *): undefined[] source

import {decimalToSexagesimalRa} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
decimal *

Return:

undefined[]

public deg(val: *): * source

import {deg} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
val *

Return:

*

public eclipticToEquatorial_Cartesian(x: *, y: *, z: *, tilt: *): undefined[] source

import {eclipticToEquatorial_Cartesian} from 'spacekit/src/Coordinates.js'

Params:

NameTypeAttributeDescription
x *
y *
z *
tilt *

Return:

undefined[]

public equatorialToEcliptic_Cartesian(x: *, y: *, z: *, tilt: *): undefined[] source

import {equatorialToEcliptic_Cartesian} from 'spacekit/src/Coordinates.js'

See https://en.wikipedia.org/wiki/Ecliptic_coordinate_system#Converting_Cartesian_vector

Params:

NameTypeAttributeDescription
x *
y *
z *
tilt *

Return:

undefined[]

public getDefaultBasePath(): * source

import {getDefaultBasePath} from 'spacekit/src/util.js'

Return:

*

public getFullTextureUrl(template: String, basePath: String): * source

import {getFullTextureUrl} from 'spacekit/src/util.js'

Returns the complete URL to a texture given a basepath and a template url.

Params:

NameTypeAttributeDescription
template String

URL containing optional template parameters

basePath String

Base path for simulation data and assets.

Return:

*

Example:

getFullTextureUrl('{{assets}}/images/mysprite.png', '/path/to/assets')
=> '/path/to/assets/images/mysprite.png'

public getFullUrl(template: String, basePath: String): * source

import {getFullUrl} from 'spacekit/src/util.js'

Returns the complete URL to a texture given a basepath and a template url.

Params:

NameTypeAttributeDescription
template String

URL containing optional template parameters

basePath String

Base path

Return:

*

Example:

getFullUrl('{{assets}}/images/mysprite.png', '/path/to/assets')
=> '/path/to/assets/images/mysprite.png'

public getNutationAndObliquity(jd: Number): Object source

import {getNutationAndObliquity} from 'spacekit/src/Coordinates.js'

Get Earth's obliquity and nutation at a given date.

Params:

NameTypeAttributeDescription
jd Number

JD date

Return:

Object

Object with attributes "obliquity" and "nutation" provided in radians

public getObliquity(jd: Number): Number source

import {getObliquity} from 'spacekit/src/Coordinates.js'

Get Earth's obliquity at a given date.

Params:

NameTypeAttributeDescription
jd Number

JD date

Return:

Number

Obliquity in radians

public getScaleFactor(): * source

import {getScaleFactor} from 'spacekit/src/Scale.js'

Get the number of units per AU.

Return:

*

public getThreeJsTexture(template: *, basePath: *): * source

import {getThreeJsTexture} from 'spacekit/src/util.js'

Params:

NameTypeAttributeDescription
template *
basePath *

Return:

*

public hoursToDeg(val: *): * source

import {hoursToDeg} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
val *

Return:

*

public kmToAu(km: *): * source

import {kmToAu} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
km *

Return:

*

public rad(val: *): * source

import {rad} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
val *

Return:

*

public rescale(args: ...*): * source

import {rescale} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
args ...*

Return:

*

public rescaleArray(XYZ: *): undefined[] source

import {rescaleArray} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
XYZ *

Return:

undefined[]

public rescaleNumber(x: *): * source

import {rescaleNumber} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
x *

Return:

*

public rescalePos(pos: *): * source

import {rescalePos} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
pos *

Return:

*

public rescaleVector(vec: *): * source

import {rescaleVector} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
vec *

Return:

*

public rescaleXYZ(X: *, Y: *, Z: *): undefined[] source

import {rescaleXYZ} from 'spacekit/src/Scale.js'

Params:

NameTypeAttributeDescription
X *
Y *
Z *

Return:

undefined[]

public setScaleFactor(val: *) source

import {setScaleFactor} from 'spacekit/src/Scale.js'

Set the number of units per AU.

Params:

NameTypeAttributeDescription
val *

public sexagesimalToDecimalDec(decDeg: *, decMin: *, decSec: *, isObserverBelowEquator: boolean): * source

import {sexagesimalToDecimalDec} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
decDeg *
decMin *
decSec *
isObserverBelowEquator boolean
  • optional
  • default: false

Return:

*

public sexagesimalToDecimalRa(raHour: *, raMin: *, raSec: *): * source

import {sexagesimalToDecimalRa} from 'spacekit/src/Units.js'

Params:

NameTypeAttributeDescription
raHour *
raMin *
raSec *

Return:

*

public sphericalToCartesian(ra: *, dec: *, dist: *): undefined[] source

import {sphericalToCartesian} from 'spacekit/src/Coordinates.js'

Params:

NameTypeAttributeDescription
ra *
dec *
dist *

Return:

undefined[]