42 double exx =
err(2, 2);
43 double eyy =
err(3, 3);
44 double exy =
err(3, 2);
48 double den = 1. + xp*xp + yp*yp;
49 double den3 = den*den*den;
51 double vxx = ( (1.+yp*yp)*(1.+yp*yp) * exx + xp*xp*yp*yp * eyy
52 - 2.*xp*yp*(1. + yp*yp) * exy ) / den3;
53 double vyy = ( xp*xp*yp*yp * exx + (1.+xp*xp)*(1.+xp*xp) * eyy
54 - 2.*xp*yp*(1. + xp*xp) * exy ) / den3;
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 ) / den3;
59 double vyz = ( xp*xp*yp * exx - yp*(1. + xp*xp) * eyy - xp*(1. + xp*xp - yp*yp) * exy ) / den3;
60 double vxz = ( -xp*(1. + yp*yp) * exx + xp*yp*yp * eyy - yp*(1. - xp*xp + yp*yp) * exy ) / den3;
64 double ddd2 = vxx*vxx + vyy*vyy + vzz*vzz
65 - 2.*vxx*vyy - 2.*vxx*vzz - 2.*vyy*vzz
66 + 4.*vxy*vxy + 4.*vyz*vyz + 4.*vxz*vxz;
67 double ddd = sqrt(ddd2 > 0. ? ddd2 : 0.);
68 double lambda2 = 0.5 * ( vxx + vyy + vzz + ddd);
69 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.
void err(const char *fmt,...)
double PointingError(const TrackVector &vec, const TrackError &err) const
Get pointing error of track.
Base class for Kalman filter planar surfaces.
virtual ~SurfPlane()
Destructor.