npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@behaver/precession

v2.0.3

Published

calculate precession.

Readme

Precession 组件库

GitHub license npm version PRs Welcome

简介

Precession 组件库用于计算天文学中的地球岁差运动,它包含计算模型: IAU1976、IAU2000 和 IAU2006 作为岁差。

Precession 系列组件的使用依赖于 JDateRepository

用例

通过npm安装,在项目目录下执行:

npm i @behaver/precession


使用 Precession 组件计算岁差项:

const Precession = require('@behaver/precession');
const { JDateRepository } = require('@behaver/jdate');

let jdr = new JDateRepository(new Date('1992/8/15 08:25:12'), 'date');
let precession = new Precession({
  epoch: jdr,
  model: 'iau1976',
});

// 岁差计算项 ε 的数值
console.log(precession.epsilon);

// 岁差计算项 ω 的数值
console.log(precession.omega);

API

constructor(options)

构造函数:

  • epoch 儒略时间仓库 对象
  • model 计算模型, 包含: iau1976, iau2000 和 iau2006

set epoch(value)

设置 计算历元对象

get epoch()

获取 计算历元对象

set model(value)

设置 计算模型字串, 包含: iau1976, iau2000 和 iau2006

get model()

获取 计算模型字串

get(key)

获取 岁差计算项 数值,单位:角秒。

get P()

获取 岁差计算项 Ρ 的数值,单位:角秒。

get Q()

获取 岁差计算项 Q 的数值,单位:角秒。

get eta()

获取 岁差计算项 η 的数值,单位:角秒。 岁差项 η(eta) 是 J2000 黄道面与终历元黄道面的夹角

get pi()

获取 岁差计算项 Π 的数值,单位:角秒。

get p()

获取 岁差计算项 p 的数值,单位:角秒。

get epsilon0()

获取 岁差计算项 ε0 的数值,单位:角秒。 岁差项 ε0(epsilon) 为 J2000 历元的黄赤交角。

get epsilon()

获取 岁差计算项 ε 的数值,单位:角秒。 岁差项 ε(epsilon) 为黄赤交角。

get chi()

获取 岁差计算项 χ 的数值,单位:角秒。 岁差项 χ(chi) 为黄道岁差(行星岁差),是 J2000 春分点与终历元春分点在赤道上东移的夹角。

get omega()

获取 岁差计算项 ω 的数值,单位:角秒。 岁差项 ω(omega) 为瞬时赤道与历元黄道间的夹角。

get psi()

获取 岁差计算项 ψ 的数值,单位:角秒。 岁差项 ψ(psi) 为赤道岁差(日月岁差),是 J2000 春分点与终历元春分点在黄道上西移的夹角。

get theta()

获取 岁差计算项 θ 的数值,单位:角秒。

get zeta()

获取 岁差计算项 ζ 的数值,单位:角秒。

get z()

获取 岁差计算项 z 的数值,单位:角秒。

许可证书

The MIT license.