I started working with EKF based closely on one of the tutorials to estimate position, velocity & heading of a vehicle based on GPS readings.
For this project I want to have an ExtendedKalmanFilter filter as a member of another class. Since no default constructor is available this does not work in a straightforward way. First I tought to get around the problem by using a pointer-to-filter as member:
HEADER ExtendedKalmanFilter* filter; CPP filter = &ExtendedKalmanFilter(priorPDF);
These option gives blas::bad_size error. I assume this because the size of the system is not known during initialization of the filter. Is this correct? This would explain the absence of the default constructor ... it's not possible to have one because size needs to be known from the beginning?
How come that the same "idea" at least at first glance seems to work with other objects e.g. HEADER Gaussian* priorPDF; CPP priorPDF = &Gaussian(priorMu, priorCovariance); ?
Actually, this second question is not so important. What I'm most interested in is a suggestion how to solve this problem.
One way I could imagine right now is through initialization lists. Are there other suggestions?
Thanks in advance for any advice, Regars, Jonas