Observation function for viapoint task