All problems
1D Kalman Predict
Problem
Perform the 1D predict step of a Kalman filter tracking position with constant velocity.
Given state x, velocity v, covariance p and process noise q, return [round(x + v, 4), round(p + q, 4)].
Test cases
case 1
in: [0,1,1,0.1]
expected: [1,1.1]
case 2
in: [5,0,2,1]
expected: [5,3]
case 3
in: [-1,2,0,0]
expected: [1,0]
case 4
in: [1.5,0.5,2.5,0.5]
expected: [2,3]
Starter codePython
def kalman_predict(x, v, p, q):
# Your code here
pass4 test cases · run your code against them in the editor