Jon’s PhD Journal

November 9, 2009

Mon: 2 steps forward, 1 step back …

Filed under: Notes — JDE @ 8:41 pm

Been messing around with code. Hmm, not going great, but have worked out logic for braking that appears fairly solid:

  • work out distances between you and other cars
  • if velocity is smaller than the distance, use velocity
  • if distance is negative, ignore
  • find the minimum value, i
  • subtract 1 from i — this is the distance between current car and next car.

Blog at WordPress.com.