atitude interp

This commit is contained in:
nuknal
2024-09-10 16:02:10 +08:00
parent e44bd318ae
commit 7bd0896f05
6 changed files with 26 additions and 22 deletions

View File

@@ -102,6 +102,7 @@ func (r *Registrator) SetSceneBoundary(scene *Scene) (topLeft, bottomRight orb.P
}
log.Debug("resolution x: ", xResolution)
log.Debug("resolution y: ", yResolution)
scene.Meta.Gsd = math.Max(xResolution, yResolution)
// 求外接矩形
latMin := mathutil.Min(line0Start.Lat, line0End.Lat, lineNStart.Lat, lineNEnd.Lat)
@@ -133,15 +134,14 @@ func (r *Registrator) SetSceneBoundary(scene *Scene) (topLeft, bottomRight orb.P
scene.Meta.Corners.LowerRight.Latitude = lineNEnd.Lat
scene.Meta.Corners.LowerRight.Longitude = lineNEnd.Lon
// scene.Meta.SatPosX = startPos84[0]
// scene.Meta.SatPosY = startPos84[1]
// scene.Meta.SatPosZ = startPos84[2]
// scene.Meta.Yaw = ae.Eular3 * 180 / math.Pi
// scene.Meta.Pitch = ae.Eular2 * 180 / math.Pi
// scene.Meta.Roll = ae.Eular1 * 180 / math.Pi
aux0 := r.AuxPlatforms[r.sceneOffsetInAuxIndex(scene, 0)]
scene.Meta.SatPosX, scene.Meta.SatPosY, scene.Meta.SatPosZ = calculator.ECEFGeocentricToGeodetic(aux0.W84PosX, aux0.W84PosY, aux0.W84PosZ)
scene.Meta.Yaw = aux0.Eular3 * 180 / math.Pi
scene.Meta.Pitch = aux0.Eular2 * 180 / math.Pi
scene.Meta.Roll = aux0.Eular1 * 180 / math.Pi
// 计算RPC
rpc := NewRPC(r, scene, strings.Replace(scene.Tiff, ".tiff", ".rpb", 1))
rpc := NewRPC(r, scene)
if err := rpc.RPC(); err != nil {
log.Error("calculate RPC failed: ", err)
}