Created
February 28, 2020 10:49
-
-
Save ksheersaagr/502916ae834abc7cd68063d54c61fe09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# measurements for mu and motions, U | |
measurements = [5., 6., 7., 9., 10.] | |
motions = [1., 1., 2., 1., 1.] | |
# initial parameters | |
measurement_sig = 4. | |
motion_sig = 2. | |
mu = 0. | |
sig = 10000. #0000000001 | |
## TODO: Loop through all measurements/motions | |
## Print out and display the resulting Gaussian | |
# your code here | |
for i in range(len(measurements)): | |
# measurement update, with uncertainty | |
mu, sig = update(mu, sig, measurements[i], measurement_sig) | |
print('Update: [{}, {}]'.format(mu, sig)) | |
# motion update, with uncertainty | |
mu, sig = predict(mu, sig, motions[i], motion_sig) | |
print('Predict: [{}, {}]'.format(mu, sig)) | |
# print the final, resultant mu, sig | |
print('\n') | |
print('Final result: [{}, {}]'.format(mu, sig)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment