Hypercubesoft / HCKalmanFilter

HCKalmanFilter is Swift implementation of Kalman filter algorithm intended to solve problem with GPS tracking
MIT License
300 stars 77 forks source link

`processState` return wrong location #5

Closed yeradis closed 7 years ago

yeradis commented 7 years ago

processState is returning NaN values

let kalmanLocation = hcKalmanFilter.processState(currentLocation: location)
return kalmanLocation

having location = <+41.14267000,+1.40481000> +/- 5.00m (speed -1.00 mps / course -1.00) @ 14/09/2017, 10:01:26 Central European Summer Time

returns: <nan,nan> +/- 0.00m (speed -1.00 mps / course -1.00) @ 14/09/2017, 10:01:29 Central European Summer Time

yeradis commented 7 years ago

After some trials, no returns valid values :S so i will need to validate locations before using them

Hypercubesoft commented 7 years ago

Hi, We tried to replicate this but we are never getting NaN values. Can you please tell us bit more how we can replicate this situation? If you provide us with more details we will do our best to find and fix problem.

justque commented 6 years ago

I am experiencing the same problem. Getting NaN values. Any preprocessing is needed for all the locations?

Hypercubesoft commented 6 years ago

Hi, Can you send use example values that you use when you get NaN values? We tried to test this out and was not able to get that results. I tried to get more info what values are making the library to return NaN values but did not get a replay on it.

hobrink1 commented 6 years ago

Hi, I have the same issue .. repeatedly ... did you find a solution meanwhile, or can I help you by providing data?

myusuf3 commented 6 years ago

@Hypercubesoft we are getting the same issue we are passing location updates from didUpdateLocations and every once in a while we are getting nan values from the library. We are using it inside an Objective C app with a wrapper just passing data through. Is there something we need to do differently?

myusuf3 commented 6 years ago

We have worked around this by resetting the filter when we get one of these values. It seems like the library enters this state somehow and can't recover. We have also tried to reproduce this issue consistently without much success, but it happens very consistently without trying, just not in a consistently repeatable way.

We are more than willing to help debug, I am not sure why this issue was closed it is still happening.

@Hypercubesoft