Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPSAccKalmanFilter fails if useGpsSpeed=false #90

Open
dsame opened this issue Oct 10, 2020 · 1 comment
Open

GPSAccKalmanFilter fails if useGpsSpeed=false #90

dsame opened this issue Oct 10, 2020 · 1 comment

Comments

@dsame
Copy link
Contributor

dsame commented Oct 10, 2020

in the constructor there's a code

int mesDim = useGpsSpeed ? 4 : 2;
...
m_kf = new KalmanFilter(4, mesDim, 2);

so KalmanFilter creates Zk with 2 rows

        this.Zk = new Matrix(measureDimension, 1);

but there's a call of Zk.setData with 4 varargs

    public void update(double timeStamp,
                       double x,
                       double y,
                       double xVel,
                       double yVel,
                       double posDev,
                       double velErr) {
   ... 
       m_kf.Zk.setData(x, y, xVel, yVel);
   ... 

which makes assert to fail

    public void setData(double... args) {
/* 4 !=  2 x 1 */
        assert(args.length == rows * cols);
...
    }
dsame added a commit to s4ysolutions/WayTodaySDK-Android that referenced this issue Oct 10, 2020
@Lezh1k
Copy link
Collaborator

Lezh1k commented Oct 13, 2020

There is fix in lib branch in C code. But I don't have time to finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants