RPiPico-Holonome2023/Geometrie.h

22 lines
581 B
C
Raw Permalink Normal View History

#ifndef GEOMETRIE_H
#define GEOMETRIE_H
2023-04-10 13:28:42 +00:00
#ifndef M_PI
#define M_PI (3.14159265358979323846)
#endif
#define DEGRE_EN_RADIAN (M_PI / 180.)
2023-04-21 20:33:29 +00:00
#define DISTANCE_INVALIDE (-1.)
2023-04-10 13:28:42 +00:00
struct position_t{
2023-04-28 21:51:43 +00:00
float x_mm, y_mm;
float angle_radian;
};
2023-04-28 21:51:43 +00:00
float Geometrie_get_angle_normalisee(float angle);
unsigned int Geometrie_compare_angle(float angle, float angle_min, float angle_max);
unsigned int Geometrie_intersecte_plage_angle(float angle1_min, float angle1_max, float angle2_min, float angle2_max);
float Geometrie_get_angle_optimal(float angle_depart, float angle_souhaite);
#endif