gps image-time attitude 拟合精度

This commit is contained in:
nuknal
2024-09-05 15:10:21 +08:00
parent df6090df21
commit 52638b5ffe
8 changed files with 35 additions and 24 deletions

View File

@@ -27,9 +27,11 @@ func (r *Registrator) LoadAuxData() error {
attFile := strings.Replace(r.Params.AuxRawFile, ".AUX", ".att.txt", 1)
gpsFile := strings.Replace(r.Params.AuxRawFile, ".AUX", ".gps.txt", 1)
timeFile := strings.Replace(r.Params.AuxRawFile, ".AUX", ".imgtime.txt", 1)
r.AttQuaternion, _ = auxilary.StoreAtt(r.AuxPlatforms, attFile)
r.GPSs, _ = auxilary.StoreGPS(r.AuxPlatforms, gpsFile)
r.ImageTime = auxilary.NewImageTime(r.AuxPlatforms)
r.ImageTime.Store(timeFile)
return err
}
@@ -183,7 +185,7 @@ func (r *Registrator) calculateLatLonH(scene *Scene, row, col, H int) calculator
imgrow := row + scene.Y
imgtime, _ := r.ImageTime.Interp(imgrow, cross)
nanosecond := (imgtime - math.Floor(imgtime)) * 1000000000
nanosecond := (imgtime - math.Floor(imgtime)) * 1e9
sattime := time.Unix(int64(imgtime), int64(nanosecond)).UTC()
// 球面线性插值得到姿态四元数
@@ -195,5 +197,6 @@ func (r *Registrator) calculateLatLonH(scene *Scene, row, col, H int) calculator
groudPoint84, _ := calculator.Camera2GroundPoint(cECI,
[]float64{p84.X84, p84.Y84, p84.Z84},
sattime, ucam, H)
return groudPoint84
}