Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T800
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vytor Calixto
T800
Commits
88385fcc
Commit
88385fcc
authored
9 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Robot struct e base do código
parent
0fc1b382
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.c
+12
-1
12 additions, 1 deletion
main.c
with
12 additions
and
1 deletion
main.c
+
12
−
1
View file @
88385fcc
...
...
@@ -11,6 +11,11 @@ typedef struct{
int
x
,
y
,
t
;
}
Tuple
;
typedef
struct
{
int
x
,
y
;
double
theta
;
}
Robot
;
double
menorDistancia
(
int
xa
,
int
ya
,
int
xb
,
int
yb
){
return
(
sqrt
((
xb
-
xa
)
*
(
xb
-
xa
)
+
(
yb
-
ya
)
*
(
yb
-
ya
)));
}
...
...
@@ -18,6 +23,7 @@ double menorDistancia (int xa, int ya, int xb,int yb){
int
main
(
int
argc
,
char
const
*
argv
[])
{
int
t_size
;
Tuple
*
tuplas
;
Robot
r
=
{
0
,
0
,
0
};
puts
(
"Quantos pontos há na lista? Mínimo de 10 elementos."
);
scanf
(
"%d"
,
&
t_size
);
if
(
t_size
<
10
)
{
...
...
@@ -36,6 +42,11 @@ int main(int argc, char const *argv[]) {
}
// calcular velocidade das rodas entre cada coordenada
for
(
int
i
=
0
;
i
<
t_size
;
++
i
)
{
// pega o ângulo entre a posição do robô e o próximo ponto
// gira o robô
// calcula a velocidade para as rodas
}
// gerar tabela e grafico
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment