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/solar-star-position

v1.1.2

Published

This pkg is builded for calculating solar stars celestial position.

Readme

SolarStarPosition

GitHub license npm version PRs Welcome

简介

SolarStarPosition 是一个关于基础星体天文坐标的计算组件。其中包含了对太阳、月球、太阳系八大行星和冥王星的天文坐标计算,同时提供了计算精度的控制接口。

计算组件

SolarStarPosition 依赖使用了底层的星体坐标计算模块,其中包括了SolarPlanetsHECCELP2000MoonGECCPluto99HECC。它们被封装在星体坐标实例的 Calculator 属性中,用户可以直接通过更改这些计算模块的计算设定,来实现坐标计算过程相关的控制。

用例

const { JupiterPosition } = require('@behaver/solar-star-position');
const { JDateRepository } = require('@behaver/jdate');

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

// 实例化木星坐标对象
let JupCoord = new JupiterPosition({
  time: jdate,
  withLightTimeEffect: true,
});

// 获取木星黄道坐标对象
let JupECC = JupCoord.get();

// 获取木星黄经,单位:度
let JupL = JupECC.l.getDegrees();

// 设置木星坐标计算精度为低
JupCoord.Calculator.accuracy = 'low';

// 获取低精度木星黄道坐标对象
let JupECCLow = JupCoord.get();

// 获取低精度木星黄经,单位:弧度
let JupBLow = JupECCLow.b.getRadian();

API

constructor(options)

构造函数:

  • options.time 参考时间
  • options.withLightTimeEffect 考虑光行时修正

set time(value)

设置参考时间属性

get time()

获取参考时间属性

set withLightTimeEffect(value)

设置 是否考虑光行时影响

get withLightTimeEffect()

获取 是否考虑光行时影响

get()

获取计算结果

许可证书

The ISC license.