更换岁差、章动算法

This commit is contained in:
2025-09-18 13:16:04 +08:00
parent 9f688024e8
commit 543abcafa5
23 changed files with 1215 additions and 339 deletions
+9
View File
@@ -28,6 +28,15 @@ func ArcTan(x float64) float64 {
return (math.Atan(x) / math.Pi * 180.00000)
}
// ArcTan2 计算两个变量的反正切并转换为角度,处理所有象限
func ArcTan2(y, x float64) float64 {
angle := math.Atan2(y, x) * 180.0 / math.Pi
if angle < 0 {
angle += 360.0
}
return angle
}
func FloatRound(f float64, n int) float64 {
p := math.Pow10(n)
return math.Floor(f*p+0.5) / p