相机偏置矩阵

This commit is contained in:
nuknal
2024-09-04 15:15:25 +08:00
parent 884dee3c82
commit abe5ecbdec
5 changed files with 51 additions and 32 deletions

View File

@@ -14,9 +14,10 @@ const (
PANPixels = float64(payload.PAN_PIXEL_WIDTH)
PANCellSize = 3.2 // µm
MSSPixels = float64(payload.MSS_PIXEL_WIDTH)
MSSCellSize = 12.8 // µm
CameraRoll = 0.0 // 相机与卫星本体X轴的安装角度, degree FIXME: 安装矩阵应该由卫星方提供
CameraPitch = 0.0 // 相机与卫星本体Y轴的安装角度, degree
MSSCellSize = 12.8 // µm
CameraRoll = -0.010 // 相机与卫星本体X轴的安装角度, degree FIXME: 安装矩阵应该由卫星方提供
CameraPitch = 0.183 // 相机与卫星本体Y轴的安装角度, degree
CameraYaw = 0.012 // 相机与卫星本体Z轴的安装角度, degree
)
// 计算过程使用PAN分辨率
@@ -80,9 +81,17 @@ func CameraRotMatrix(phi, theta, psi float64) *mat.Dense {
-math.Sin(theta), 0, math.Cos(theta),
})
Rz := mat.NewDense(3, 3, []float64{
math.Cos(psi), -math.Sin(psi), 0,
math.Sin(psi), math.Cos(psi), 0,
0, 0, 1,
})
// R = Rz * Ry * Rx
RyRx := mat.NewDense(3, 3, nil)
RyRx.Mul(Ry, Rx)
Rzxy := mat.NewDense(3, 3, nil)
Rzxy.Mul(Rz, RyRx)
return RyRx
return Rzxy
}

View File

@@ -23,7 +23,7 @@ func Camera2GroundPoint(q Quaternion, satPos84 []float64, satTime time.Time, uca
direction := CameraDirectionVec(0, float64(ucam))
// -------- 相机坐标系下CCD成像方向向量转到卫星坐标系 --------
Rcam := CameraRotMatrix(CameraRoll*math.Pi/180.0, CameraPitch*math.Pi/180.0, 0)
Rcam := CameraRotMatrix(CameraRoll*math.Pi/180.0, CameraPitch*math.Pi/180.0, CameraYaw*math.Pi/180.0)
var dCam mat.VecDense
dCam.MulVec(Rcam, mat.NewVecDense(3, direction))