Formula for TOT-Calculations
So the calculation should be as followed:
v_TOT=s_waypoints/(t_IP-t_now ) with t_IP=t_TOT-s_(IP to targetwaypoint)/v_GSPD , current time t_now, s_(IP to targetwaypoint) being the distance between the IP and the target waypoint, t_IP being the time you should be at the IP and t_TOT being the time on target.
s_waypoints is the sum of the distances between two consecutive waypoints in the waypoint sequence (starting with the currently selected waypoint and ending with the IP) plus the distance to the currently selected waypoint.
The early/late Caret should be placed appropriately after comparing the current groundspeed with v_TOT.
The Dropbox-link above gives a better overview because of a better representation of the fractions and variables. If anything is wrong just let me know.