2bf8478639
- 新增日月食中心带、偏食带、阴影足迹、等时线、食分线及升落边界计算,支持极区与混合食拓扑 - 新增日食单时刻阴影求解器、站心状态查询、批量采样和 ΔT 覆盖接口 - 重构恒星与行星月掩路径,补充有限盘面接触、站心修正、掩带宽度、极区投影及升落边界 - 扩展 SVG 与 GeoJSON 输出,支持详细面板、全球/极区/地球投影、边界闭合、时间标记和拓扑签名 - 扩展日月食候选搜索、局地搜索、沙罗序列预计算与范围外推,补充系列锚点和成员一致性校验 - 补齐古历纪年、儒略历独有闰日、多公历候选、历法改革跨日及精确日期运算接口 - 优化 ΔT、章动、恒星时、月球地平线、事件根搜索和本地星历缓存,降低重复计算开销并提升边界稳定
27 lines
1.4 KiB
Go
27 lines
1.4 KiB
Go
package svgmap
|
|
|
|
import "b612.me/astro/internal/geodata"
|
|
|
|
// SphericalCircle 返回球面小圆上的等间隔采样点 / SphericalCircle returns evenly spaced points on a small circle on the
|
|
// 球面小圆;方位角从地理北方顺时针采样 / sphere. Bearings are sampled clockwise from geographic north.
|
|
func SphericalCircle(center GeoPoint, radiusDegrees float64, points int) []GeoPoint {
|
|
return geodata.SphericalCircle(center, radiusDegrees, points)
|
|
}
|
|
|
|
// JoinPolylineSegments 按最近端点连接无序边界线段 / JoinPolylineSegments joins unordered boundary segments by their nearest
|
|
// 端点连接;输入线段不会被修改 / endpoints. The input segments are not modified.
|
|
func JoinPolylineSegments(segments [][]GeoPoint) []GeoPoint {
|
|
return geodata.JoinPolylineSegments(segments)
|
|
}
|
|
|
|
// ShortestCircleArc 返回两点之间较短的采样圆弧 / ShortestCircleArc returns the shorter sampled arc from one point to another.
|
|
func ShortestCircleArc(circle []GeoPoint, from, to GeoPoint) []GeoPoint {
|
|
return geodata.ShortestCircleArc(circle, from, to)
|
|
}
|
|
|
|
// SameGeoPoint 判断两个经纬度点是否在拓扑所需精度内相等 / SameGeoPoint reports whether two longitude/latitude points are equal within
|
|
// 地图拓扑辅助函数所需的精度内相等 / the precision needed by the map topology helpers.
|
|
func SameGeoPoint(a, b GeoPoint) bool {
|
|
return geodata.SameGeoPoint(a, b)
|
|
}
|