gpstk::Vector<double> RACRotation::convertToRAC( const gpstk::Vector<double>& inV ) { gpstk::Vector<double> outV(3); /* My goal was to use the following statement. outV = this * inV; However, for some reason, gcc refuses to recognize RACRotation as a Matrix subclass. Therefore, I've incorporated the matrix multiply as a temporary kludge. */ if (inV.size()!=3) { gpstk::Exception e("Incompatible dimensions for Vector"); GPSTK_THROW(e); } size_t i, j; for (i = 0; i < 3; i++) { outV[i] = 0; for (j = 0; j < 3; j++) { double temp = (*this)(i,j) * inV[j]; outV[i] += temp; } } /* end kludge */ return(outV); }
gpstk::Vector<double> ENUUtil::convertToENU( const gpstk::Vector<double>& inV ) const { gpstk::Vector<double> outV(3); if (inV.size()!=3) { gpstk::Exception e("Incompatible dimensions for Vector"); GPSTK_THROW(e); } outV = rotMat * inV; return(outV); }