17 pre_left_motor = left_motor;
19 pre_right_motor = right_motor;
41 return (left_motor + right_motor) / 2.0f;
52 std::int32_t current_right_motor)
55 float left_motor = current_left_motor - pre_left_motor;
57 float right_motor = current_right_motor - pre_right_motor;
60 update(current_left_motor, current_right_motor);
62 return (left_motor + right_motor) / 2.0f;
74 return static_cast<float>(right_motor - left_motor);
85 return (motor > 0) ? motor : -motor;
float relativeAngleMean(std::int32_t current_left_motor, std::int32_t current_right_motor)
左右モータの相対角度の平均値を計算する
void reset()
左右モータ角度の過去値を0にリセットする
float angularDifference(std::int32_t left_motor, std::int32_t right_motor)
左右モータ角度の差を計算する(右手系/反時計回りが正)
std::int32_t absoluteValueOfAngle(std::int32_t motor)
モータ角度の絶対値を計算する
float absoluteAngleMean(std::int32_t left_motor, std::int32_t right_motor)
左右モータの絶対角度の平均値を計算する
左右モータの回転角に関するクラス(旧Distance.h, SelfLocalization内のMotorAngle)
void update(std::int32_t left_motor, std::int32_t right_motor)
左右モータ角度の過去値を現在値へ更新する