This commit is contained in:
Stefan Bühler 2008-07-14 00:05:58 +02:00
parent 070a6a1417
commit 8184068b71

View File

@ -85,7 +85,7 @@ void sim_update(trial* t){
radar_dgl(t,tm->ts); radar_dgl(t,tm->ts);
/*calculate misspredict*/ /*calculate misspredict*/
fprintf(stderr, "Miss predict: dx=%f, dy=%f, ddir=%f (%f %f), steps=%u\n", fprintf(stderr, "Miss predict: dx=%f, dy=%f, ddir=%f, steps=%u\n",
t->sim.tm.vehicle.x - t->vehicle.x, t->sim.tm.vehicle.x - t->vehicle.x,
t->sim.tm.vehicle.y - t->vehicle.y, t->sim.tm.vehicle.y - t->vehicle.y,
fixangle(t->sim.tm.vehicle.dir - t->vehicle.dir), fixangle(t->sim.tm.vehicle.dir - t->vehicle.dir),
@ -138,7 +138,7 @@ int dgl(trial* t, vehicle* after, vehicle* before, timestamp h, timestamp deltat
tmp.x += dt*diff.x; tmp.x += dt*diff.x;
tmp.y += dt*diff.y; tmp.y += dt*diff.y;
// tmp.speed += (tmp.speed > 0) ? 1000*dt*diff.speed : 0; // tmp.speed += (tmp.speed > 0) ? 1000*dt*diff.speed : 0;
tmp.speed = fmax(0, tmp.speed + dt*diff.speed); tmp.speed = fmax(0, tmp.speed + dt*diff.speed/1000);
tmp.w += dt*diff.w; tmp.w += dt*diff.w;
tmp.dir += dt*diff.dir; tmp.dir += dt*diff.dir;