This repository was archived by the owner on Nov 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
KalmanFilter2D - System.NullReferenceException #955
Copy link
Copy link
Closed
Description
Hello,
I'm getting System.NullReferenceException when trying to use KalmanFilter2D. Or I'm trying to use it wrong? Here is simple example:
var inputs = new double[] { 0.0977411735138111, 0.17250515877793, 0.0142479810661655, 0.11347312747475, 0.184498913475038, 0.0309690788645605, 0.13478951530726, 0.202264012007815, 0.0500396375577767, 0.164596631103065, 0.231882918753043, 0.0808987314560835, 0.196098906894069, 0.263206395946556, 0.113400386444221, 0.226026068895491, 0.292963699280326, 0.147462474468307, 0.25764238858147, 0.327604169017093, 0.183006973876048, 0.287677892283658, 0.357327099482348, 0.216774248313212, 0.31939713658544, 0.388749399209367, 0.252038674813277, 0.355901450241932, 0.42178609973479, 0.285539879988696, 0.384209516645964, 0.453170965234272, 0.310994993335337, 0.407916663945071, 0.479801071673242, 0.338362866799867, 0.43362396966362, 0.501914157005432, 0.364362346590917, 0.458045910096296, 0.522921588071212, 0.389061852392537, 0.487617785077295, 0.552435194938631, 0.418897414473481, 0.515711066309701, 0.58047312146259, 0.450426714235851, 0.545585199264993, 0.607109151660518, 0.477194033224901, 0.570780109787462, 0.632413380348092, 0.502622986264733, 0.597900790569291, 0.6564523976015, 0.52996600743732, 0.623665437311327, 0.679289463992455, 0.555941877551308, 0.648141851716537, 0.700984677063677, 0.583804469944782, 0.680950992756303, 0.737522708405889, 0.613459448503043, 0.708934160959539, 0.772233838181498, 0.638446162349097, 0.738703686537598, 0.798838379898043, 0.668554572072476, 0.76379922005123, 0.824112694528851, 0.693972045524456, 0.787639976889656, 0.84812329342767, 0.714933129518964, 0.807103180100768, 0.870933362382531, 0.734846159313965, 0.844706317861241, 0.908530506813621, 0.776062148113634, 0.89317136187342, 0.953804341378543, 0.824773884828338, 0.939213153685234};
KalmanFilter2D kalman = new KalmanFilter2D();
for (int i = 0; i < inputs.Length; i++)
{
kalman.Push(new Accord.DoublePoint(i, inputs[i])); //here will be exception
}
Could you please check and tell what is wrong or provide quick example to make it work?