Subversion Repositories FlightCtrl

Rev

Rev 2127 | Rev 2161 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2127 Rev 2154
Line 197... Line 197...
197
unsigned char Parameter_ExtraConfig;
197
unsigned char Parameter_ExtraConfig;
198
unsigned char Parameter_MaximumAltitude;
198
unsigned char Parameter_MaximumAltitude;
199
unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5;
199
unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5;
200
unsigned char CareFree = 0;
200
unsigned char CareFree = 0;
201
//const signed char sintab[31] = { 0, 2, 4, 6, 7, 8, 8, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -8, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 8}; // 15° steps // MartinR: so war es
201
//const signed char sintab[31] = { 0, 2, 4, 6, 7, 8, 8, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -8, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 8}; // 15° steps // MartinR: so war es
202
const signed char sintab[62] = { 0, 2, 4, 6, 8, 10, 11, 13, 14, 15, 15, 16, 16, 16, 15, 14, 13, 11, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -11, -13, -14, -15, -15, -16, -16, -16, -15, -15, -14, -13, -11, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 11, 13, 14, 15, 15, 16, 16, 16}; // 7,5° steps //MartinR
202
const signed char sintab[62] = { 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 16, 16, 16, 16, 16, 15, 14, 13, 12, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -12, -13, -14, -15, -16, -16, -16, -16, -16, -15, -14, -13, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 16, 16, 16}; // 7,5° steps //MartinR
203
signed char cosinus, sinus; // MartinR : extern für PAN-Funktion
203
signed char cosinus, sinus; // MartinR : extern für PAN-Funktion
Line 204... Line 204...
204
 
204
 
205
signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20;
205
signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20;
206
//int MaxStickNick = 0,MaxStickRoll = 0; MartinR: so war es
206
//int MaxStickNick = 0,MaxStickRoll = 0; MartinR: so war es
Line 1044... Line 1044...
1044
                StickRoll = ((FromNC_Rotate_C * roll) - (FromNC_Rotate_S * nick)) / (32 / 4);
1044
                StickRoll = ((FromNC_Rotate_C * roll) - (FromNC_Rotate_S * nick)) / (32 / 4);
1045
        }
1045
        }
1046
        else
1046
        else
1047
        {
1047
        {
1048
                //FromNC_Rotate_C = sintab[EE_Parameter.OrientationAngle + 6]; //MartinR: so war es
1048
                //FromNC_Rotate_C = sintab[EE_Parameter.OrientationAngle + 6]; //MartinR: so war es
1049
                FromNC_Rotate_C = sintab[EE_Parameter.OrientationAngle * 2 + 12]; //MartinR: feinere Auflösung
1049
                FromNC_Rotate_C = (sintab[EE_Parameter.OrientationAngle * 2 + 12]) / 2; //MartinR: feinere Auflösung
1050
                //FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle]; //MartinR: so war es
1050
                //FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle]; //MartinR: so war es
1051
                FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle * 2]; //MartinR: feinere Auflösung
1051
                FromNC_Rotate_S = (sintab[EE_Parameter.OrientationAngle * 2]) / 2; //MartinR: feinere Auflösung
1052
                StickNick = ((FromNC_Rotate_C * stick_nick) + (FromNC_Rotate_S * stick_roll)) / 8;
1052
                StickNick = ((FromNC_Rotate_C * stick_nick) + (FromNC_Rotate_S * stick_roll)) / 8;
1053
                StickRoll = ((FromNC_Rotate_C * stick_roll) - (FromNC_Rotate_S * stick_nick)) / 8;
1053
                StickRoll = ((FromNC_Rotate_C * stick_roll) - (FromNC_Rotate_S * stick_nick)) / 8;
1054
        }
1054
        }
Line 1055... Line 1055...
1055
 
1055