Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2266 → Rev 2267

/test_branches/FC2_2/analog.c
194,7 → 194,6
static long tmpLuftdruck = 0;
static long result[16];
static unsigned char messanzahl_Druck = 0;
long AltLoss;
#define ANZ_RING 32
//static long VarioRing[ANZ_RING];
//static unsigned char RingPtr = 0;
328,17 → 327,8
case 17:
HoehenDiff = HoehenWert - HoeheAlt;
// vvSum = vvSum - vv + ((Aktuell_az - NeutralAccZ) - AccShorter)*7 + HoehenDiff*500; // Fusion vert. velocity
if(Parameter_UserParam1 > 50)
{
AccVertical = (long)(AdWertAccHoch + 172)*CosAttitude/8192 - 172;
vvSum = vvSum - vv + AccVertical*13 + HoehenDiff*500; // Fusion vert. velocity, T=2s
}
else
{
vvSum = vvSum - vv + AdWertAccHoch*13 + HoehenDiff*500; // Fusion vert. velocity, T=2s
}
// AltLoss = HoehenWertF - HoehenWert;
// if((AltLoss > 50) && (Parameter_UserParam1 > 50)) vvSum -= AltLoss*2; // avoids height loss
AccVertical = (long)(AdWertAccHoch + 172)*CosAttitude/8192 - 172;
vvSum = vvSum - vv + AccVertical*13 + HoehenDiff*500; // Fusion vert. velocity, T=2s
vv = (vvSum + 512)/1024; // cm/s
HoeheAlt = HoehenWert;
SummenHoehe = SummenHoehe - HoehenWertF + vv + HoehenWert; //Fusion Hoehe
/test_branches/FC2_2/fc.c
1814,6 → 1814,11
{ // reduce the time constant of averaging by factor of 4 to get much faster a stable value
HoverGasFilter -= HoverGasFilter/(HOVER_GAS_AVERAGE/16L);
HoverGasFilter += 16L * tmp_long2;
if(Parameter_UserParam1 > 50)
{
SummeNick = 0; // avoids wind up at take off
SummeRoll = 0; // avoids wind up at take off
}
}
if(modell_fliegt < 8000) // the first 16 seconds
{ // reduce the time constant of averaging by factor of 2 to get much faster a stable value