writing code to try and segment time based and distance based data logging.