主にオムニです。

Dependencies:   EC mbed HCSR04

Fork of asimawari by yuto kawamura

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers x.y_theta_dainyuu.h Source File

x.y_theta_dainyuu.h

00001 //////////x, y代入して出力///////////////////
00002 void for_act()
00003 {
00004     sita = -1.0*(atan2((double)x,(double)y))*180/Pi;
00005     sita_2=90-sita;
00006     for (i=0; i<=2; i++) {
00007         M[i]=sin((sita_2-(fai+i*(-120)))*Pi/180);
00008     }
00009     for (i=0; i<=2; i++) {
00010         M[i]=M[i]*power[i]/max();//方向による出力の差を補正
00011     }
00012     motor_act();
00013 
00014 }