Project

General

Profile

Revision 1012

theta in motors should change now

View differences:

branches/simulator/projects/simulator/test/test_motors.c
44 44

  
45 45
  *x += newy * - sin(*theta);
46 46
  *y += newy * cos(*theta);
47

  
48
  *theta = fmod((t + *theta), (2 * M_PI));
47
  
48
	int divide = (t+*theta)/(2*M_PI);
49
	*theta = (t+*theta) - (2*M_PI)*divide;
49 50
  if (*theta<0) *theta += 2 * M_PI;
50 51

  
51 52
  return 0;

Also available in: Unified diff