Library to calculate angles from positions and vice versa (also used for shooting angles)
Dependents: includeair includeair calcul_Ueff2 Mesure_energie
Diff: angleandposition.h
- Revision:
- 3:067c75c62882
- Parent:
- 1:6cace9fdb088
- Child:
- 4:9492c1c361b9
diff -r b99fef8df97e -r 067c75c62882 angleandposition.h --- a/angleandposition.h Mon Oct 19 15:05:21 2015 +0000 +++ b/angleandposition.h Tue Oct 27 16:13:26 2015 +0000 @@ -7,11 +7,43 @@ class angleandposition { public: - + /** + *Constructor + */ angleandposition(void); + /** + *Calculates required angle for rigth arm from desired position. + *@param x_position : float Desired x position in mm + *@param y_position : float Desired y position in mm + *@return Required angle for rigth arm in rad + */ float positiontoangle1 (float x_position,float y_position); + + /** + *Calculates required angle for left arm from desired position. + *@param x_position : float Desired x position in mm + *@param y_position : float Desired y position in mm + *@return Required angle for left arm in rad + */ float positiontoangle2 (float x_position,float y_position); + + /** + *Calculates the x position of the pod from the angles of the arms + *@param theta_r : float Angle of rigth arm in rad + *@param theta_l : float Angle of left arm in rad + *@return X position of pod in mm + */ + float angletoposition (float theta_r,float theta_l); + + /** + *Calculates the y position of the pod from the angles of the arms + *@param theta_r : float Angle of rigth arm in rad + *@param theta_l : float Angle of left arm in rad + *@return Y position of pod in mm + */ + float angletoposition_y(float theta_r,float theta_l); + private: