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/fixed-star-calculator

v1.1.0

Published

This package is builded for calculating the equinoctial coordinate of fixed stars.

Downloads

16

Readme

FixedStarCalculator

GitHub license npm version PRs Welcome

简介

FixedStarCalculator 是一个用以计算恒星赤道坐标的天文学组件。它包含有动力学计算子组件 DynamicCalculator 和三角学计算子组件 TrigonometricCalculator

安装

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

npm install @behaver/fixed-star-calculator

安装完成后,调用即可:

const { DynamicCalculator } = require('@behaver/fixed-star-calculator');

用例

const { DynamicCalculator } = require('@behaver/fixed-star-calculator');
const { JDateRepository } = require('@behaver/jdate');
const { EquinoctialCoordinate } = require('@behaver/celestial-coordinate');

// 实例化儒略时间对象
let jdate = new JDateRepository(2462088.69, 'jde');

// 实例化恒星坐标计算组件
let Calculator = new DynamicCalculator(jdate);
// let Calculator = new TrigonometricCalculator(jdate);

// 计算恒星修正自行和周年视差后的球坐标
let sc = Calculator.calc({
  ra: 41.0500,
  dec: 49.2283,
  pmra: 0.336,
  pmdec: -0.089,
  radvel: 25,
  parallax: 0.089,
});

// 实例化赤道坐标组件
let eqc = new EquinoctialCoordinate({
  sc,
});

// 修正岁差
eqc.epoch = Calculator.epoch;

// 修正光行差
eqc.withAnnualAberration = true;

// 修正章动
eqc.withNutation = true;

// 输出赤经度数
console.log(eqc.ra.getDegrees());

// 输出赤纬度数
console.log(eqc.dec.getDegrees());

// 输出赤地心距
console.log(eqc.radius);

API

constructor(epoch)

构造函数

  • epoch 目标历元 JDateRepository 对象

set epoch(value)

设置目标历元对象

  • epoch 目标历元 JDateRepository 对象

get epoch()

获取目标历元对象

calc(options)

计算恒星赤道坐标(修正了自行和周年视差)

  • options.ra J2000 平赤经
  • options.dec J2000 平赤纬
  • options.pmra 赤经周年自行,单位:角秒每儒略年
  • options.pmdec 赤纬周年自行,单位:角秒每儒略年
  • options.radvel 日心视向速度,单位:km/s
  • options.parallax 周年视差,单位:角秒

许可证书

The ISC license.