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 🙏

© 2024 – Pkg Stats / Ryan Hefner

orbscjs

v3.1.0

Published

计算卫星星下点经纬度

Downloads

12

Readme

ORBSCJS

未完成

  • 打包并同时支持 js 与 nodejs
  • 新增的两个函数尚未调试

记录

orbelem

/**
 * @typedef orbelem
 * @prop {number} eptime 时间,秒计数(起点时??)
 * @prop {number} period 轨道周期,单位为秒
 * @prop {number} eporbt 轨道编号
 * @prop {number[]} epelem 6参
 * 
 * @des epelem[0] 轨道元素中的半长轴(semi-major axis),单位为千米
 * @des epelem[1] 轨道元素中的偏心率(eccentricity)
 * @des epelem[2] 轨道元素中的轨道倾角(inclination),单位为弧度
 * @des epelem[3] 轨道元素中的升交点赤经(right ascension of ascending node),单位为弧度
 * @des epelem[4] 轨道元素中的轨道偏角(argument of periapsis),单位为弧度
 * @des epelem[5] 轨道元素中的真近点角(true anomaly),单位为弧度
 */

orbosele[8] 瞬时轨道参数

/**
 * @des orbosele[8] 瞬时轨道参数
 * @des orbosele(1):  轨道半长轴[公里]
 * @des orbosele(2): 轨道偏心率
 * @des orbosele(3): 轨道倾角[弧度]
 * @des orbosele(4): 升交点赤经[弧度]
 * @des orbosele(5): 近地点幅角[弧度]
 * @des orbosele(6): 平近点角[弧度]
 * @des orbosele(7): 卫星轨道向经(从卫星到地心的距离)[公里]
 * @des orbosele(8): 真近点角[弧度]
 */

subSatPoint

subSatPoint(tleLine1, tleLine2, time[, pixels])

计算星下点经纬度

参数

tleLine1 (string): 第一行 // 1 99999U 23055A 23148.95833333 .00053924 00000-0 86260-3 0 00006

tleLine2 (string): 第二行 // 2 99999 049.9996 336.6070 0004272 315.4428 328.1689 15.52430075006689

time (Date): 时间 new Date("2017-10-18 00:50:00")

[pixels = tPixel] (number): 仪器的水平像素数 // eg. NOAAI9 AVHRR:2048

返回值

(object): 星下点信息

  • orbit (number): 轨道号
  • lat (number): 星下点纬度
  • lon (number): 星下点经度
  • height (number): 星下点高度
  • adFlg (string): 升降轨标识(A-升,D-降)
  • leftLat (number): 最左侧扫描点纬度
  • leftLon (number): 最左侧扫描点经度
  • rightLat (number): 最右侧扫描点纬度
  • rightLon (number): 最右侧扫描点经度

例子

var ORBSC = require("orbscjs");

let testTime = new Date('2023-05-26T05:11:00Z')
const tleLine1 = '1 49008U 21062A   23142.56951089  .00000011  00000+0  25950-4 0  9993'
const tleLine2 = '2 49008  98.7217 144.3655 0002722  84.3641 275.7846 14.19681025 97422'
const orbitInfo = ORBSC.subSatPoint(tleLine1, tleLine2, testTime, 2048)

console.log(`###${i}### ${testTime.toString()}: ${orbitInfo.orbit}, ${orbitInfo.adFlg} Lon: ${orbitInfo.lon}, Lat: ${orbitInfo.lat}, Left: [${orbitInfo.leftLon}, ${orbitInfo.leftLat}], right: [${orbitInfo.rightLon}, ${orbitInfo.rightLat}`)

angleSatPoint

angleSatPoint(time, pointNum, tPixels, stpAng, stpTim, orbelem)

计算从0到扫描角的pointNum个点为经纬度

参数

time (Date): 时间 new Date("2017-10-18 00:50:00")

pointNum (number): 要计算的点的个数

tPixels (number): 一行象素点总数(仪器属性)

stpAng (number): 两点间的角度(仪器属性)

stpTim (number): 两点间的时间(仪器属性)

orbelem (orbelem): 轨道参数

返回值

(array): 返回逐点的经纬度信息

例子

// NOAAI9 AVHRR 110.8 2048 0.0541 0.000025
// tPixels = 2048, stpAng = 0.0541, stpTim = 0.000025

const ORBSC = require("orbscjs");
// 直接传入轨道根数
const orbelem = {
 "epelem": [
  7205.1839,
  0.001118,
  1.7238019999999943,
  1.9813819999999987,
  0.049575999999990068,
  1.116255000000005
 ],
 "eporbt": 1347,
 "eptime": 1303344000.0,
 "period": 6086.64318
}
const angData = ORBSC.angleSatPoint(new Date("2017-10-18 00:50:00"), 10, 2048, 0.0541, 0.000025, orbelem)

// => [{lat: x, lon: y}, ... ...]