From 336545947a7225f122a43a7341d55070b1d09d61 Mon Sep 17 00:00:00 2001
From: Victor Perszel <vlp14@inf.ufpr.br>
Date: Tue, 24 Nov 2015 00:27:16 -0200
Subject: [PATCH] Troca de coordenadas em VelPos

---
 confR.plt | 5 ++---
 main.c    | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/confR.plt b/confR.plt
index e7c3848..d487c50 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 cdfbb02..09979f6 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);
   }
 
-- 
GitLab