diff --git a/confR.plt b/confR.plt index e7c38483e35946bf2a94757082eb59f05808634f..d487c505f7e82c53f0f1226549a9b3ad3f6d50e9 100644 --- a/confR.plt +++ b/confR.plt @@ -1,11 +1,11 @@ set terminal png set output 'velDir.png' -set xlabel "Velocidade/Direcao" +set ylabel "Velocidade/Direcao" set autoscale -set ylabel "Tempo" +set xlabel "Tempo" set format y "%s" set title "Simulacao de Velocidade e Direcao" @@ -16,4 +16,3 @@ set style data linespoints plot "velo" using 1:2 title "Velocidade", \ "dir" using 1:2 title "Direcao" - diff --git a/main.c b/main.c index cdfbb02ecf65dd89496046b674364fd9aeb2f894..09979f607aff63482f49e53864a80b45068a93a9 100644 --- a/main.c +++ b/main.c @@ -110,8 +110,8 @@ int main(int argc, char const *argv[]) { // calcula a velocidade para as rodas distancia = distance(r.x, r.y, tuplas[i].x, tuplas[i].y); velocidade = velocity(distancia, tuplas[i].t); - fprintf(velo, "%f %d\n", velocidade, frame); - fprintf(dir, "%f %d\n", r.theta, frame); + fprintf(velo, "%d %f\n", frame, velocidade); + fprintf(dir, "%d %f\n", frame, r.theta); moverRobo(&r,tuplas[i].x,tuplas[i].y); }