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.
Dependents: NHK2017_octopus NHK2017_octopus2 NHK2017_octopus2_drive 2018NHK_gakugaku_robo ... more
wheel.h
00001 #ifndef WHEEL_H 00002 #define WHEEL_H 00003 00004 #include "mbed.h" 00005 00006 class Wheel { 00007 public: 00008 00009 /** 00010 * デフォルトコンストラクタ 00011 */ 00012 Wheel(); 00013 00014 /** 00015 * コンストラクタ 00016 * @param radian 車輪角 00017 */ 00018 Wheel(double radian); 00019 00020 /** 00021 * コンストラクタ 00022 * @param radian 車輪角 00023 * @param distance 車輪距離 00024 */ 00025 Wheel(double radian, double distance); 00026 00027 /** 00028 * コピーコンストラクタ 00029 * @param a wheelmember 00030 */ 00031 Wheel(const Wheel &a); 00032 00033 /** 00034 * 代入演算子 00035 * @return wheeel member 00036 */ 00037 Wheel &operator=(const Wheel &a); 00038 00039 /** 00040 * 代入演算子 00041 * @return 計算結果 00042 */ 00043 Wheel &operator=(double value); 00044 /** 00045 * 代入演算子 00046 * @return 計算結果 00047 */ 00048 Wheel &operator=(float value); 00049 00050 /** 00051 * キャスト演算子 00052 * @return 計算結果 00053 */ 00054 operator double(); 00055 00056 /** 00057 * キャスト演算子 00058 * @return 計算結果 00059 */ 00060 operator float(); 00061 00062 /** 00063 * 車輪の角度を設定 00064 * @param tRadian dadian 00065 */ 00066 void setRadian(double tRadian); 00067 00068 /** 00069 * 車輪の距離を設定 00070 * @param tDistance distance 00071 */ 00072 void setDistance(double tDistance); 00073 00074 /** 00075 * 出力値を設定 00076 * @param value output 00077 */ 00078 void setOutput(double value); 00079 00080 /** 00081 * 平行移動出力計算 00082 * @param r 距離 00083 * @param theta 角度 00084 * @return 出力値 00085 */ 00086 double calculateShift(double r, double theta); 00087 00088 /** 00089 * 回転移動出力計算 00090 * @param X 回転中心X 00091 * @param Y 回転中心Y 00092 * @param value 回転量 00093 * @return 出力値 00094 */ 00095 double calculateRotate(double X, double Y, double value); 00096 00097 /** 00098 * 出力値を取得 00099 * @return 出力値(計算結果) 00100 */ 00101 double getOutput(); 00102 00103 private: 00104 double radian; 00105 double distance; 00106 protected: 00107 double outputShift; 00108 double outputRotate; 00109 double output; 00110 }; 00111 00112 #endif
Generated on Thu Aug 18 2022 04:25:58 by
1.7.2