This commit is contained in:
nuknal
2024-09-10 14:13:30 +08:00
parent 52638b5ffe
commit 2fcbc389c6
8 changed files with 82 additions and 32 deletions

View File

@@ -37,7 +37,7 @@ func (it *ImageTime) Extract(aps []*AuxPlatform) {
// Interp 内插出成像时刻
// 参数: imgrow 图像行号 cross 图像跨度 aps 辅助平台列表
// 返回值: 成像时刻(UTC seconds)
func (it *ImageTime) Interp(imgrow int, cross int) (float64, float64) {
func (it *ImageTime) Interp0(imgrow int, cross int) (float64, float64) {
// 内插出成像时刻
u := int(imgrow / cross)
var u1, u2 *auxT
@@ -53,6 +53,14 @@ func (it *ImageTime) Interp(imgrow int, cross int) (float64, float64) {
return t, dt
}
func (it *ImageTime) Interp(imgrow int, cross int) (float64, float64) {
n := len(it.auxT)
rCnt := (it.auxT[n-1].Row-it.auxT[0].Row)*cross + 1
dt := (it.auxT[n-1].Tutc - it.auxT[0].Tutc) / float64(rCnt)
t := it.auxT[0].Tutc + dt*float64(imgrow)
return t, dt
}
func (it *ImageTime) Store(imgtimeFile string) error {
f, err := os.Create(imgtimeFile)
if err != nil {