Ok, know its clear why the calculation returns these weird values. But how i can compensate this time changes ?
Here's the calculation:
function speed()
{
while(1)
{
vec_set(Old_Rot, my.pan);
wait(1);
vec_set(Now_Rot, my.pan);
vec_diff(Rot_Speed, Old_Rot, Now_Rot);
wait(1);
}
}
This first wait(1) is the responsible code line I guess. I need a always constant thing in this wait. Maybe something with time_step ?