Corrects the initial offset calculation for the guidance graph. Now correctly starts at trough for all values of |idealPeriod|