update state and covariance based on measurement