Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: OmniMove.h
- Revision:
- 5:333ed75dd3f1
- Parent:
- 4:4d94b6148a0a
- Child:
- 6:fac3dcaebe83
--- a/OmniMove.h Fri Mar 26 01:55:13 2021 +0000 +++ b/OmniMove.h Sat Mar 27 11:14:59 2021 +0000 @@ -47,47 +47,47 @@ /* セットアップ関数 nWheel:車輪の個数(3~8),fstWheelAng:0番目のx軸と車輪軸のなす角度(deg) */ - void setup(int nWheel,float fstWheelAng); + void setup(int nWheel,double fstWheelAng); /* 全方位移動入力関数(極座標) r:マシンの速度(0~1),theta:マシンの進行方向(角度deg ex.90,-45) Vroll:マシンの回転速度(-1~1),roll_ratio:回転速度の重み(0~1) */ - void input_polar(float r,float theta,float Vroll,float roll_ratio); + void input_polar(double r,double theta,double Vroll,double roll_ratio); /* マシンの傾き角度を考慮した全方位移動入力関数(極座標) MachineAng:マシンの現在角度(角度deg ex.90,-45) */ - void input_polar(float r,float theta,float Vroll,float roll_ratio,float MachineAng); + void input_polar(double r,double theta,double Vroll,double roll_ratio,double MachineAng); /* 全方位移動入力関数(直交座標) x:マシンのx方向速度(-1~1),y:マシンのy方向速度(-1~1) Vroll:マシンの回転速度(-1~1),roll_ratio:回転速度の重み(0~1) */ - void input_cartesian(float x,float y,float Vroll,float roll_ratio); + void input_cartesian(double x,double y,double Vroll,double roll_ratio); /* マシンの傾き角度を考慮した全方位移動入力関数(直交座標) MachineAng:マシンの現在角度(角度deg ex.90,-45) */ - void input_cartesian(float x,float y,float Vroll,float roll_ratio,float MachineAng); + void input_cartesian(double x,double y,double Vroll,double roll_ratio,double MachineAng); /* 全方位移動出力関数(アドレスよくわからん人用) 引数:n番目の車輪の回転速度 */ - float output_(int n); + double output_(int n); /* 全方位移動出力関数 *v:車輪回転速度の配列の先頭アドレス */ - void output(float *V); + void output(double *V); private: int i,nWheel; - float Vx_wheel[8],Vy_wheel[8],Vx,Vy,Vroll,r,theta; + double Vx_wheel[8],Vy_wheel[8],Vx,Vy,Vroll,r,theta; - float limit(float min,float max,float _value); - float conv_deg(float _rad); - float conv_rad(float _deg); + double limit(double min,double max,double _value); + double conv_deg(double _rad); + double conv_rad(double _deg); }; #endif \ No newline at end of file