1.1.6 • Published 3 years ago

@behaver/astraeus v1.1.6

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

AstraeusJS

GitHub license npm version PRs Welcome

Intro 简介

AstraeusJS 是一个基于 JavaScript 开发的天文计算组件库。

Usage 用例

const Astraeus = require('@behaver/astraeus.js');

// 实例化天体坐标定位控制器
let observer = new Astraeus.Observer;

// 实例化儒略时间
let JDate = new Astraeus.JDate(new Date(1992, 7, 15, 8, 25), 'date');

// 设置定位参数
observer.onObservatory({
  longitude: -124.23,
  latitude: 40.07,
  elevation: 100,
  temperature: 23.5,
}).withCorrections({
  nutation: 3,
  lightTime: 3,
  annualAberration: 3,
  annualParallax: 3,
  atmRefraction: 3,
  graDeflection: 3,
  fk5: 0,
}).useCoordSetting({
  system: 'ecc',
  centerMode: 'geocentric',
  isContinuous: false,
}).atTime(JDate);

// 注册恒星 θPersei
observer.registerStar({
  id: 'θPersei',
  ra: 41.0500,
  dec: 49.2283,
  pmra: 0.336,
  pmdec: -0.089,
  radvel: 25,
  parallax: 0.089,
});

// 获取月亮坐标结果
let resMoon = observer.get('moon');

// 获取 θPersei 坐标结果
let resThetaPersei = observer.get('θPersei');

Reference 涉及

Locator 定位器

Coord 天球坐标

Correction 天文修正

Calculator 定位计算

Time 时间

Velocity 速度

Math 数学

License 许可证书

The ISC license.

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago