try to correct commander_atan - not working

This commit is contained in:
Louis-Guillaume DUBOIS 2015-06-01 17:18:17 +02:00
parent 1edbc97844
commit 05bbe16f37

View file

@ -106,12 +106,12 @@ class Run
{ {
if(msg->normal.z > 0) if(msg->normal.z > 0)
{ {
in.y = msg->normal.x; in.y = - msg->normal.x;
in.x = msg->normal.y; in.x = msg->normal.y;
} else } else
{ {
in.y = - msg->normal.x; in.y = - msg->normal.x;
in.x = - msg->normal.y; in.x = msg->normal.y;
} }
in.z = msg->altitude - neutral_z; in.z = msg->altitude - neutral_z;
in.th = msg->angle; in.th = msg->angle;