From 58c6fc6fa7beb2e8a57f49b94e95c9c0eb3e08b8 Mon Sep 17 00:00:00 2001 From: dufourj Date: Wed, 22 Jun 2005 08:24:48 +0000 Subject: Correction du calcul de la position de la quille et ajout de log --- 2005/i/robert/src/ovision/see/ovision.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '2005/i/robert/src/ovision/see/ovision.cc') diff --git a/2005/i/robert/src/ovision/see/ovision.cc b/2005/i/robert/src/ovision/see/ovision.cc index a316306..2cbb4a1 100644 --- a/2005/i/robert/src/ovision/see/ovision.cc +++ b/2005/i/robert/src/ovision/see/ovision.cc @@ -136,8 +136,10 @@ OVision::getLoc (Zone &zone, int &x, int &y, int &angle, int &dist) int tmpY = (int)((zone.ymax - zone.centery) * newPcY + zone.centery); int newX, newY; space_->getLoc (tmpX, tmpY, newX, newY); - angle = (int)(atan (newX / (newY + 9))); - dist = newY; + angle = (int)(atan ((double)newX / ((double)newY + 90))); + x = newX; y = newY; + dist = (int)sqrt (y*y + x*x); + std::cout << " " << " " << newX << " " << newY << " " << angle << " " << dist << "\n"; } /// Renvoie la liste des quilles -- cgit v1.2.3