40 double exx = err(2, 2);
41 double eyy = err(3, 3);
42 double exy = err(3, 2);
46 double den = 1. + xp * xp + yp * yp;
47 double den3 = den * den *
den;
49 double vxx = ((1. + yp * yp) * (1. + yp * yp) * exx + xp * xp * yp * yp * eyy -
50 2. * xp * yp * (1. + yp * yp) * exy) /
52 double vyy = (xp * xp * yp * yp * exx + (1. + xp * xp) * (1. + xp * xp) * eyy -
53 2. * xp * yp * (1. + xp * xp) * exy) /
55 double vzz = (xp * xp * exx + yp * yp * eyy + 2. * xp * yp * exy) / den3;
57 double vxy = (-xp * yp * (1. + yp * yp) * exx - xp * yp * (1. + xp * xp) * eyy +
58 (1. + xp * xp + yp * yp + 2. * xp * xp * yp * yp) * exy) /
61 (xp * xp * yp * exx - yp * (1. + xp * xp) * eyy - xp * (1. + xp * xp - yp * yp) * exy) / den3;
63 (-xp * (1. + yp * yp) * exx + xp * yp * yp * eyy - yp * (1. - xp * xp + yp * yp) * exy) /
68 double ddd2 = vxx * vxx + vyy * vyy + vzz * vzz - 2. * vxx * vyy - 2. * vxx * vzz -
69 2. * vyy * vzz + 4. * vxy * vxy + 4. * vyz * vyz + 4. * vxz * vxz;
70 double ddd = sqrt(ddd2 > 0. ? ddd2 : 0.);
71 double lambda2 = 0.5 * (vxx + vyy + vzz + ddd);
72 double lambda = sqrt(lambda2 > 0. ? lambda2 : 0.);
void getStartingError(TrackError &err) const
Get starting error matrix for Kalman filter.
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
SurfPlane()
Default constructor.
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
double PointingError(const TrackVector &vec, const TrackError &err) const
Get pointing error of track.
Base class for Kalman filter planar surfaces.
virtual ~SurfPlane()
Destructor.