Add trip_id,time index to measurements table
Join on trip id as well as time to get maticnh measurements