Skip to content

Commit

Permalink
Merge pull request #150 from observerly/refactor/planets/solar-system
Browse files Browse the repository at this point in the history
feat: Added all solar-system planets as exports in planets module in @observerly/astrometry.
  • Loading branch information
michealroberts authored Nov 1, 2023
2 parents c040450 + b1816c1 commit d807d2a
Showing 1 changed file with 127 additions and 122 deletions.
249 changes: 127 additions & 122 deletions src/planets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,132 @@ export type Planet = {

/*****************************************************************************************************************/

export const mercury = {
uid: '01HD49QMD7GA502WXEMY1ZAG15',
name: 'Mercury',
symbol: '☿',
T: 0.2408467,
m: 0.055274,
r: 2439700,
e: 0.205636,
a: 0.3870993,
i: 7.004979,
ε: 252.250324,
ϖ: 77.457796,
Ω: 48.330766,
isInferior: true
} as const satisfies Planet

/*****************************************************************************************************************/

export const venus = {
uid: '01HD49R1NASDCYK3ZBYYCBJTBW',
name: 'Venus',
symbol: '♀',
T: 0.615197,
m: 0.8149984,
r: 6051800,
e: 0.0067767,
a: 0.72333566,
i: 3.39467605,
ε: 181.9791,
ϖ: 131.602467,
Ω: 76.679843,
isInferior: true
} as const satisfies Planet

/*****************************************************************************************************************/

export const mars = {
uid: '01HD4ARM2X130B6M2Q74JFKRW4',
name: 'Mars',
symbol: '♂',
T: 1.880848,
m: 0.107447,
r: 3389500,
e: 0.093394,
a: 1.52371,
i: 1.849691,
ε: -4.553432,
ϖ: -23.943629,
Ω: 49.559539,
isInferior: false
} as const satisfies Planet

/*****************************************************************************************************************/

export const jupiter = {
uid: '01HD4AYRMZP734M8FVQGXDB5BV',
name: 'Jupiter',
symbol: '♃',
T: 11.862615,
m: 317.828133,
r: 69911000,
e: 0.048393,
a: 5.202887,
i: 1.3043975,
ε: 34.396441,
ϖ: 14.728479,
Ω: 100.473909,
isInferior: false
} as const satisfies Planet

/*****************************************************************************************************************/

export const saturn = {
uid: '01HD4AYZAHS15TJJMZDQWV1TET',
name: 'Saturn',
symbol: '♄',
T: 29.447498,
m: 95.160904,
r: 58232000,
e: 0.053862,
a: 9.536676,
i: 2.485992,
ε: 49.954244,
ϖ: 92.598878,
Ω: 113.662424,
isInferior: false
} as const satisfies Planet

/*****************************************************************************************************************/

export const uranus = {
uid: '01HD4AZ66TP0P2KY9A8XFMRQ4T',
name: 'Uranus',
symbol: '♅',
T: 84.016846,
m: 14.535757,
r: 25362000,
e: 0.0472574,
a: 19.18916464,
i: 0.772638,
ε: 313.238104,
ϖ: 170.954276,
Ω: 74.016925,
isInferior: false
} as const satisfies Planet

/*****************************************************************************************************************/

export const neptune = {
uid: '01HD4AZGMADD008W4XT4HEV9ZC',
name: 'Neptune',
symbol: '♆',
T: 164.79132,
m: 17.147241,
r: 24622000,
e: 0.00867797,
a: 30.069923,
i: 1.77004347,
ε: -55.120029,
ϖ: 44.964762,
Ω: 131.784226,
isInferior: false
} as const satisfies Planet

/*****************************************************************************************************************/

/**
*
*
Expand All @@ -122,128 +248,7 @@ export type Planet = {
* All quoted values are for the epoch J2000.0.
*
*/
export const planets: Planet[] = [
{
uid: '01HD49QMD7GA502WXEMY1ZAG15',
name: 'Mercury',
symbol: '☿',
T: 0.2408467,
m: 0.055274,
r: 2439700,
e: 0.205636,
a: 0.3870993,
i: 7.004979,
ε: 252.250324,
ϖ: 77.457796,
Ω: 48.330766,
isInferior: true
},
{
uid: '01HD49R1NASDCYK3ZBYYCBJTBW',
name: 'Venus',
symbol: '♀',
T: 0.615197,
m: 0.8149984,
r: 6051800,
e: 0.0067767,
a: 0.72333566,
i: 3.39467605,
ε: 181.9791,
ϖ: 131.602467,
Ω: 76.679843,
isInferior: true
},
{
uid: '01HD4AM60QS3SXKKJWY1A2Z3JF',
name: 'Earth',
symbol: '♁',
T: 1.0000174,
m: 1,
r: 6378140,
e: 0.01671123,
a: 1.0000003,
i: -0.00001531,
ε: 100.464572,
ϖ: 102.937682,
Ω: null,
isInferior: false
},
{
uid: '01HD4ARM2X130B6M2Q74JFKRW4',
name: 'Mars',
symbol: '♂',
T: 1.880848,
m: 0.107447,
r: 3389500,
e: 0.093394,
a: 1.52371,
i: 1.849691,
ε: -4.553432,
ϖ: -23.943629,
Ω: 49.559539,
isInferior: false
},
{
uid: '01HD4AYRMZP734M8FVQGXDB5BV',
name: 'Jupiter',
symbol: '♃',
T: 11.862615,
m: 317.828133,
r: 69911000,
e: 0.048393,
a: 5.202887,
i: 1.3043975,
ε: 34.396441,
ϖ: 14.728479,
Ω: 100.473909,
isInferior: false
},
{
uid: '01HD4AYZAHS15TJJMZDQWV1TET',
name: 'Saturn',
symbol: '♄',
T: 29.447498,
m: 95.160904,
r: 58232000,
e: 0.053862,
a: 9.536676,
i: 2.485992,
ε: 49.954244,
ϖ: 92.598878,
Ω: 113.662424,
isInferior: false
},
{
uid: '01HD4AZ66TP0P2KY9A8XFMRQ4T',
name: 'Uranus',
symbol: '♅',
T: 84.016846,
m: 14.535757,
r: 25362000,
e: 0.0472574,
a: 19.18916464,
i: 0.772638,
ε: 313.238104,
ϖ: 170.954276,
Ω: 74.016925,
isInferior: false
},
{
uid: '01HD4AZGMADD008W4XT4HEV9ZC',
name: 'Neptune',
symbol: '♆',
T: 164.79132,
m: 17.147241,
r: 24622000,
e: 0.00867797,
a: 30.069923,
i: 1.77004347,
ε: -55.120029,
ϖ: 44.964762,
Ω: 131.784226,
isInferior: false
}
]
export const planets: Planet[] = [mercury, venus, earth, mars, jupiter, saturn, uranus, neptune]

/*****************************************************************************************************************/

Expand Down

0 comments on commit d807d2a

Please sign in to comment.