Skip to content
Snippets Groups Projects
Commit 33654594 authored by Victor Perszel's avatar Victor Perszel :top:
Browse files

Troca de coordenadas em VelPos

parent eb7dffb7
No related branches found
No related tags found
No related merge requests found
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"
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment