3.1.0 • Published 11 months ago

orbscjs v3.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
11 months ago

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),单位为弧度
 */

orbosele8 瞬时轨道参数

/**
 * @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: 仪器的水平像素数 // 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}, ... ...]
3.0.2

11 months ago

3.1.0

11 months ago

3.0.1

11 months ago

2.0.3

12 months ago

2.1.1

12 months ago

2.0.2

12 months ago

2.0.4

12 months ago

2.0.7

12 months ago

2.0.6

12 months ago

2.0.8

12 months ago

2.1.0

12 months ago

2.0.0

12 months ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.1

7 years ago

0.0.3

7 years ago