feat: 新增月掩与日月食地理绘图并提升观测计算精度
- 新增月掩恒星和行星:支持搜索、掩甚点、全球掩带及固定地点轨迹计算 - 支持恒星星表坐标转换、有限盘面行星接触事件和月掩 SVG 输出 - 新增日月食及月掩全球投影图、时间标记和 GeoJSON 地理数据接口 - 扩展日食中心线、南北界及偏食足迹采样,支持极区投影 - 修正站心时角、月出月落、月球视半径、折射和恒星自行计算 - 优化内外行星事件搜索、边界选择、极端输入处理和计算稳定性
This commit is contained in:
+12
-5
@@ -4,13 +4,14 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// this file contains bright 9100 stars
|
||||
// 本文件包含约 9100 颗亮星 / this file contains bright 9100 stars
|
||||
// 9100颗亮星列表
|
||||
|
||||
type InnerStarData struct {
|
||||
@@ -20,8 +21,8 @@ type InnerStarData struct {
|
||||
Ra float64 //Ra J2000;J2000历元赤经
|
||||
Dec float64 //De J2000;J2000历元赤纬
|
||||
Mag float64 //视星等
|
||||
PmRA float64 //赤经年自行
|
||||
PmDec float64 //赤纬年自行
|
||||
PmRA float64 //赤经投影年自行 cos(赤纬)*d赤经/dt,单位角秒/年
|
||||
PmDec float64 //赤纬年自行,单位角秒/年
|
||||
RadVel float64 //径向速度 km/s
|
||||
RotVel float64 //自行速度 km/s
|
||||
Pc float64 //秒差距
|
||||
@@ -252,9 +253,15 @@ func StarDataByHR(hr int) (StarData, error) {
|
||||
}
|
||||
|
||||
func (s InnerStarData) RaDecByJde(jde float64) (float64, float64) {
|
||||
//计算自行
|
||||
// BSC 的 pmRA 是投影自行 cos(Dec)*dRA/dt,而不是 dRA/dt / BSC pmRA is the projected motion cos(Dec)*dRA/dt, not dRA/dt.
|
||||
year := ((jde - 2451545.0) / 365.2422)
|
||||
return Precess(s.Ra+(year*s.PmRA/3600), s.Dec+(year*s.PmDec/3600), 2451545.0, jde)
|
||||
dec := s.Dec + year*s.PmDec/3600
|
||||
cosDec := math.Cos(s.Dec * math.Pi / 180)
|
||||
ra := s.Ra
|
||||
if math.Abs(cosDec) > 1e-12 {
|
||||
ra += year * s.PmRA / (3600 * cosDec)
|
||||
}
|
||||
return Precess(ra, dec, 2451545.0, jde)
|
||||
}
|
||||
|
||||
func (s StarData) RaDecByDate(date time.Time) (float64, float64) {
|
||||
|
||||
Reference in New Issue
Block a user