aboutsummaryrefslogtreecommitdiffstats
path: root/problem.hpp
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-01-08 15:27:47 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-01-08 15:27:47 +0100
commitad4173e1c2bb55d2cce827067dfd132e8a6a7ac4 (patch)
tree1b4a82070cb0cdd1edce00865fc0dcf70e722aeb /problem.hpp
parent045c846407d945f0822b059622c68387a6b8c61d (diff)
downloadRobotique-Projet-ad4173e1c2bb55d2cce827067dfd132e8a6a7ac4.tar.gz
Robotique-Projet-ad4173e1c2bb55d2cce827067dfd132e8a6a7ac4.zip
Add geometry functions & various modifications.
Diffstat (limited to 'problem.hpp')
-rw-r--r--problem.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/problem.hpp b/problem.hpp
index 535affa..10adaf8 100644
--- a/problem.hpp
+++ b/problem.hpp
@@ -16,9 +16,14 @@ struct hilare_a { // System A
// position actuelle
double x, y, theta, phi;
+ vec pos() const { return vec(x, y); }
+ vec dir() const { return vec::from_polar(1, theta); }
+
vec pos_trolley() const {
- //TODO
- return vec(0, 0);
+ return pos() + vec::from_polar(l, theta + phi + M_PI);
+ }
+ vec dir_trolley() const {
+ return vec::from_polar(1, theta + phi);
}
};