]> rtime.felk.cvut.cz Git - hubacji1/psp.git/commitdiff
Fix guess goal for forward perpendicular parking
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 21 Jul 2020 13:33:07 +0000 (15:33 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 21 Jul 2020 13:33:08 +0000 (15:33 +0200)
src/psp.cc

index 9021d260bf69e3f2fa5dcfb0877a7da164276bab..583643ac0d1ec5008f6b8f008a464fb9c740e05f 100644 (file)
@@ -107,8 +107,8 @@ void PSPlanner::guess_gc()
                         this->ps().x2() - this->ps().x1()
                 );
                 while (h < 0) h += 2 * M_PI;
-                x += this->gc().dr() * cos(h + M_PI);
-                y += this->gc().dr() * sin(h + M_PI);
+                x += 2 * this->gc().dr() * cos(h);
+                y += 2 * this->gc().dr() * sin(h);
 #else
                 // Backward parking
                 double entry_width = edist(