14 #ifndef __SELF_LOCALIZATION__ 15 #define __SELF_LOCALIZATION__ 33 old_angle = current_angle = degree;
35 void update(std::int32_t update_degree){
37 current_angle = update_degree;
38 rotation_angle = current_angle -
old_angle;
39 moving_distance = wheel_across * M_PI * (rotation_angle / 360.0);
47 float moving_distance_mean;
50 bool is_below_of_normal_border;
51 float start_x, start_y, goal_x, goal_y;
54 bool is_below_normal_vector;
60 SelfLocalization (std::int32_t left_motor_sl, std::int32_t right_motor_sl,
bool save =
true);
61 void update (std::int32_t left_motor_sl, std::int32_t right_motor_sl);
62 void writing_current_coordinates ();
63 bool approached_target_coordinates (
float target_x,
float target_y,
float target_radius);
66 bool is_over_target_line_of_x (
float target_x);
67 bool is_over_target_line_of_y (
float target_y);
68 bool is_below_target_line_of_x(
float target_x);
69 bool is_below_target_line_of_y(
float target_y);
70 float calculate_between_ev3_and_border
71 (
float _start_x,
float _start_y,
float _goal_x,
float _goal_y,
float _current_x,
float _current_y);
73 void init_normal_vector(
float _start_x,
float _start_y,
float _goal_x,
float _goal_y,
float _current_x,
float _current_y);
74 bool is_over_normal_vector(
float _current_x,
float _current_y);
75 void calculate_current_angle();
std::int32_t rotation_angle
void update(std::int32_t update_degree)
MotorAngle(std::int32_t degree)
std::int32_t current_angle