Library to calculate angles from positions and vice versa (also used for shooting angles)

Dependents:   includeair includeair calcul_Ueff2 Mesure_energie

angleandposition.h

Committer:
Gerth
Date:
2015-10-27
Revision:
3:067c75c62882
Parent:
1:6cace9fdb088
Child:
4:9492c1c361b9

File content as of revision 3:067c75c62882:

#ifndef _ANGLEANDPOSITION_H_
#define _ANGLEANDPOSITION_H_

#include "mbed.h"
#include "math.h"

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:

};
#endif