def add_observation(self, obs):
if len(self._observations)==<NUM_LIT:0>:<EOL><INDENT>self._observations.append(obs)<EOL><DEDENT>else:<EOL><INDENT>res = obs.resolution<EOL>ind = <NUM_LIT:0><EOL>for o in self._observations:<EOL><INDENT>if res > o.resolution:<EOL><INDENT>break<EOL><DEDENT>ind += <NUM_LIT:1><EOL><DEDENT>self._observations.insert(ind, obs)<EOL><DEDENT>self._build_tree()<EOL>self._clear_cache()<EOL>
Adds an observation to observation list, keeping proper order