import math

import utilities
reload(utilities)
from utilities import *

# Standard deviation of sonar readings from their expected value
sonarSigma = 0.3

# Max reading from the sonar (this changes for different robots)
#maxReading = 2.465
maxReading = 5.0

def obsProb(obsDist, (trueDist, angle), verbose = False):
    prob = gaussian(obsDist, min(trueDist, maxReading), sonarSigma)
    if verbose:
        print 'o=', obsDist, 't=', trueDist, 'a=', angle, 'p=', prob
    return prob
