Subversion Repositories FlightCtrl

Rev

Rev 155 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 155 Rev 161
Line 11... Line 11...
11
*/
11
*/
12
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13
Peter Muehlenbrock
13
Peter Muehlenbrock
14
Winkelfunktionen sin, cos und arctan in
14
Winkelfunktionen sin, cos und arctan in
15
brute-force Art: Sehr Schnell, nicht sonderlich genau, aber ausreichend
15
brute-force Art: Sehr Schnell, nicht sonderlich genau, aber ausreichend
16
Stand 11.9.2007
16
Stand 20.9.2007
17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18
*/
18
*/
19
#include "main.h"
19
#include "main.h"
Line 51... Line 51...
51
        else //0,568...1  entsprechend 30..45 Grad
51
        else //0,568...1  entsprechend 30..45 Grad
52
        {      
52
        {      
53
                return_value = (int)((((wert-578)*50)/(1000-578)*(45-30))/50) +30;             
53
                return_value = (int)((((wert-578)*50)/(1000-578)*(45-30))/50) +30;             
54
        }
54
        }
Line 55... Line 55...
55
 
55
 
56
        if (change_xy > 0)  return_value = 90-return_value; //Quadrant 45..90 Grad
56
        if (change_xy == 0)  return_value = 90-return_value; //Quadrant 45..90 Grad
57
        if ((x > 0) && (y <0)) return_value = - return_value;
57
        if ((x >= 0) && (y <0)) return_value = - return_value;
Line 58... Line 58...
58
        else if ((x < 0) && (y > 0)) return_value = - return_value;
58
        else if ((x < 0) && (y >= 0)) return_value = - return_value;
59
 
59