function to calculate time diff tau

Uses data of R0 and calculates data from other sensors to calculate R
and then calculate tau.