Dear all,

I am trying to do single axis solar tracker with linear actuator /rtc/ UNO. I have already done with feedback sensor. Now Here i am trying to without feedback.
Linear actuator specification: 24v , 3.2mm/sec as speed , 600mm stoke.

Desired angle calculation: tracking start from 7am to 18PM, 11hours
Assumed degree: 7AM as -45 deg , 12.30 as 0 degree and 18 pm as 45 degree.
static float slope= 0.00227272727273;
static float intercept=- 102.272727273;
TS=(3600*hour)+(60*minute);
Desire_Degree=(TS*slope)+intercept;

Problem part : calculating actual angle/ calculation for Ton time and convert in to +/-45 degree format.
rate=distance/ time
Ton=600mm/660minute = 10/11 mm each minute
time * 3.2mm/sec = 10mm / 11
time= (25 / 88) sec/minute;
if i wanna run for 2 sec ->(2*88/25)= 7.04 i.e actuator must on for 7 minute;
angle= ((3 * position) / 20) - 45 and
or
position =((angle + 45) * 20) / 3
since position = 3.2 * time
angle =((96 * time) / 200) - 45.
How can i put time here.
can someone help me coding for calculating Ton time and solve above equation. below i posted my code . I need it has to be modified little bit. i need to implement ton time actuator here.