Since it's an out-and-back ride on the trail, you can always start with a plan to do 40 miles and then turn around early if necessary. Where are you starting and are you riding east or west?