More work on R and Q.
Added more examples and cleaned up explanations on modifying R and Q. In particular, the filter setting for R was not the same as the simulated noise for no obvious reason. Also, names were bad R instead of R_var, for example.
This commit is contained in:
parent
60e31b890d
commit
66f20b745e
File diff suppressed because one or more lines are too long
@ -12,14 +12,14 @@ import math
|
||||
|
||||
class DogSensor(object):
|
||||
|
||||
def __init__(self, x0=0, velocity=1, noise=0.0):
|
||||
def __init__(self, x0=0, velocity=1, noise_var=0.0):
|
||||
""" x0 - initial position
|
||||
velocity - (+=right, -=left)
|
||||
noise - scaling factor for noise, 0== no noise
|
||||
noise_var - noise variance, 0== no noise
|
||||
"""
|
||||
self.x = x0
|
||||
self.velocity = velocity
|
||||
self.noise = math.sqrt(noise)
|
||||
self.noise = math.sqrt(noise_var)
|
||||
|
||||
def sense(self):
|
||||
self.x = self.x + self.velocity
|
||||
|
Loading…
Reference in New Issue
Block a user