Subversion Repositories FlightCtrl

Rev

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

Rev 734 Rev 740
Line 180... Line 180...
180
//############################################################################
180
//############################################################################
181
// Neigungskompensierung und Berechnung der Ausrichtung
181
// Neigungskompensierung und Berechnung der Ausrichtung
182
int heading_MM3(void)
182
int heading_MM3(void)
183
//############################################################################
183
//############################################################################
184
{
184
{
185
        uint16_t div_faktor;
-
 
186
        int16_t sin_nick, cos_nick, sin_roll, cos_roll;
185
        int16_t sin_nick, cos_nick, sin_roll, cos_roll;
187
        int16_t mm3_x_axis, mm3_y_axis, mm3_z_axis;
186
        int16_t mm3_x_axis, mm3_y_axis, mm3_z_axis;
188
        int32_t Hx, Hy, Hz, x_corr, y_corr;
187
        int32_t Hx, Hy, Hz, x_corr, y_corr;
189
        int16_t heading;
188
        int16_t heading;
190
        int8_t tilt;
189
        int8_t tilt;
Line 206... Line 205...
206
        tilt = atan2_i(Aktuell_az-556,AdWertAccRoll*64);
205
        tilt = atan2_i(Aktuell_az-556,AdWertAccRoll*64);
207
        sin_roll = sin_i(tilt);
206
        sin_roll = sin_i(tilt);
208
        cos_roll = cos_i(tilt);
207
        cos_roll = cos_i(tilt);
209
/*
208
/*
210
        // Lage-Berechnung mittels Gyro-Integral
209
        // Lage-Berechnung mittels Gyro-Integral
-
 
210
        uint16_t div_faktor;
211
        div_faktor = (uint16_t)EE_Parameter.UserParam3 *8;
211
        div_faktor = (uint16_t)EE_Parameter.UserParam3 *8;
Line 212... Line 212...
212
 
212
 
213
        tilt = (IntegralNick /div_faktor);
213
        tilt = (IntegralNick /div_faktor);
214
        sin_nick = sin_i(tilt);
214
        sin_nick = sin_i(tilt);