Subversion Repositories FlightCtrl

Rev

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

Rev 155 Rev 156
Line 19... Line 19...
19
  CK1024           = 5,
19
  CK1024           = 5,
20
  T0_FALLING_EDGE  = 6,
20
  T0_FALLING_EDGE  = 6,
21
  T0_RISING_EDGE   = 7
21
  T0_RISING_EDGE   = 7
22
};
22
};
Line -... Line 23...
-
 
23
 
-
 
24
// Aenderungen von Peter Muehlenbrock ("Salvo") Stand 13.9.2007
-
 
25
/*
-
 
26
Driftkompensation fuer Gyros verbessert
-
 
27
Linearsensor mit fixem neutralwert
23
 
28
Ersatzkompass abgeleitet aus magnetkompass und Giergyro fuer nahezu neigungsubhaengige Kompassfunktion
24
 
29
*/
25
SIGNAL (SIG_OVERFLOW0)    // 8kHz
30
SIGNAL (SIG_OVERFLOW0)    // 8kHz
26
{
31
{
27
    static unsigned char cnt_1ms = 1,cnt = 0;
32
    static unsigned char cnt_1ms = 1,cnt = 0;
Line 67... Line 72...
67
         {
72
         {
68
                KompassValue -= 360;
73
                KompassValue -= 360;
69
         }     
74
         }     
70
 // Salvo End  
75
 // Salvo End  
71
    }
76
    }
72
//     if(cntKompass < 10) cntKompass = 10;
-
 
73
//     KompassValue = (unsigned long)((unsigned long)(cntKompass-10)*720L + 1L) / 703L;
-
 
74
//Salvo 12.9.2007 Ersatzkompass als Basis nehmen, nicht den magnetkompass
-
 
75
     KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
77
     KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
76
//      int i;
-
 
77
//      i = GyroKomp_Int/GYROKOMP_INC_GRAD_DEFAULT;
78
//Salvo 13.9.2007 Ok Erkennung des Magnetkompasses 
78
//      if (i < 180)  KompassRichtung = ((540 + i - KompassStartwert) % 360) - 180;
-
 
79
//      else KompassRichtung = ((540 + (i-360) - KompassStartwert) % 360) - 180;
-
 
80
// Salvo End
-
 
81
         Kompass_Neuer_Wert     = 1;
79
         Kompass_Neuer_Wert     = 1;
-
 
80
 // Salvo End
82
     cntKompass = 0;
81
     cntKompass = 0;
83
   }
82
   }
84
 }
83
 }
85
}
84
}