/trunk/analog.c |
---|
161,8 → 161,8 |
{ |
if(NeutralAccZ < 750) |
{ |
subcount += 2; |
if(modell_fliegt < 500) subcount += 10; |
subcount += 5; |
// if(modell_fliegt < 500) subcount += 10; |
} |
if(subcount > 100) { NeutralAccZ++; subcount -= 100;} |
} |
170,8 → 170,8 |
{ |
if(NeutralAccZ > 550) |
{ |
subcount -= 2; |
if(modell_fliegt < 500) subcount -= 10; |
subcount -= 5; |
// if(modell_fliegt < 500) subcount -= 10; |
if(subcount < -100) { NeutralAccZ--; subcount += 100;} |
} |
} |
258,7 → 258,7 |
HoehenWert = StartLuftdruck - Luftdruck; |
SummenHoehe -= SummenHoehe/SM_FILTER; |
SummenHoehe += HoehenWert; |
VarioMeter = (15 * VarioMeter + 8 * (int)(HoehenWert - SummenHoehe/SM_FILTER))/16; |
VarioMeter = (31 * VarioMeter + 8 * (int)(HoehenWert - SummenHoehe/SM_FILTER))/32; |
tmpLuftdruck /= 2; |
messanzahl_Druck = 18/2; |
} |
/trunk/eeprom.c |
---|
143,13 → 143,13 |
EE_Parameter.WinkelUmschlagRoll = 85; |
} |
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER; |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT;// | CFG2_VARIO_BEEP | CFG_SENSITIVE_RC |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT | CFG2_VARIO_BEEP;// | CFG_SENSITIVE_RC |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 255; // Wert : 0-247 255 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 5; // Wert : 0-247 |
EE_Parameter.Luftdruck_D = 45; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 20; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 8; // Wert : 0-247 |
EE_Parameter.Hoehe_GPS_Z = 64; // Wert : 0-247 |
EE_Parameter.Hoehe_StickNeutralPoint = 0; // Wert : 0-247 (0 = Hover-Estimation) |
EE_Parameter.Hoehe_Verstaerkung = 20; // Wert : 0-50 |
164,7 → 164,7 |
EE_Parameter.Gyro_Gier_P = 80; // Wert : 0-247 |
EE_Parameter.Gyro_Gier_I = 150; // Wert : 0-247 |
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8 |
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.NotGas = 45; // Wert : 0-247 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 90; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.I_Faktor = 32; |
252,13 → 252,13 |
EE_Parameter.WinkelUmschlagRoll = 85; |
} |
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER; |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT;// | CFG2_VARIO_BEEP | CFG_SENSITIVE_RC |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT | CFG2_VARIO_BEEP;// CFG_SENSITIVE_RC |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 255; // Wert : 0-247 255 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 5; // Wert : 0-247 |
EE_Parameter.Luftdruck_D = 45; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 20; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 8; // Wert : 0-247 |
EE_Parameter.Hoehe_GPS_Z = 64; // Wert : 0-247 |
EE_Parameter.Hoehe_StickNeutralPoint = 0;// Wert : 0-247 (0 = Hover-Estimation) |
EE_Parameter.Hoehe_Verstaerkung = 15; // Wert : 0-50 |
273,7 → 273,7 |
EE_Parameter.Gyro_Gier_P = 90; // Wert : 0-247 |
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247 |
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8 |
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.NotGas = 35; // Wert : 0-247 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 60; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.I_Faktor = 32; |
360,13 → 360,13 |
EE_Parameter.WinkelUmschlagRoll = 85; |
} |
EE_Parameter.GlobalConfig = /*CFG_DREHRATEN_BEGRENZER |*/ CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER; |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT;// | CFG2_VARIO_BEEP | CFG_SENSITIVE_RC |
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT | CFG2_VARIO_BEEP;// | CFG_SENSITIVE_RC |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 255; // Wert : 0-247 255 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 30; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 5; // Wert : 0-247 |
EE_Parameter.Luftdruck_D = 45; // Wert : 0-247 |
EE_Parameter.Hoehe_ACC_Wirkung = 20; // Wert : 0-247 |
EE_Parameter.Hoehe_HoverBand = 8; // Wert : 0-247 |
EE_Parameter.Hoehe_GPS_Z = 64; // Wert : 0-247 |
EE_Parameter.Hoehe_StickNeutralPoint = 0;// Wert : 0-247 (0 = Hover-Estimation) |
EE_Parameter.Hoehe_Verstaerkung = 15; // Wert : 0-50 |
381,7 → 381,7 |
EE_Parameter.Gyro_Gier_P = 100; // Wert : 0-247 |
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247 |
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8 |
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50) |
EE_Parameter.NotGas = 35; // Wert : 0-247 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 60; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.I_Faktor = 16; |
/trunk/fc.c |
---|
183,6 → 183,8 |
DebugOut.Analog[20] = ServoNickValue; |
DebugOut.Analog[22] = Capacity.ActualCurrent; |
DebugOut.Analog[23] = Capacity.UsedCapacity; |
DebugOut.Analog[24] = AdWertAccHoch; |
// DebugOut.Analog[22] = FromNaviCtrl_Value.GpsZ; |
// DebugOut.Analog[24] = MesswertNick/2; |
// DebugOut.Analog[25] = MesswertRoll/2; |
1122,9 → 1124,8 |
if(IntegralFehlerNick < -FEHLER_LIMIT) AdNeutralNick -= cnt; |
// Roll +++++++++++++++++++++++++++++++++++++++++++++++++ |
cnt = 1;// + labs(IntegralFehlerNick) / 4096; |
cnt = 1;// + labs(IntegralFehlerRoll) / 4096; |
if(labs(IntegralFehlerRoll) > FEHLER_LIMIT1) cnt = 4; |
ausgleichRoll = 0; |
if(labs(MittelIntegralRoll_Alt - MittelIntegralRoll) < BEWEGUNGS_LIMIT || (FromNaviCtrl_Value.Kalman_MaxDrift > 3*8)) |
{ |
if(IntegralFehlerRoll > FEHLER_LIMIT2) |
1292,7 → 1293,7 |
#else |
#define OPA_OFFSET_STEP 10 |
#endif |
int HCGas, HeightDeviation = 0; |
int HCGas, HeightDeviation = 0,GasReduction; |
static int HeightTrimming = 0; // rate for change of height setpoint |
static int FilterHCGas = 0; |
static int StickGasHover = 120, HoverGasMin = 0, HoverGasMax = 1023; |
1480,28 → 1481,45 |
tmp_long = (HoehenWert - SollHoehe); // positive when too high |
LIMIT_MIN_MAX(tmp_long, -32767L, 32767L); // avoid overflov when casting to int16_t |
HeightDeviation = (int)(tmp_long); // positive when too high |
tmp_long = (tmp_long * (long)Parameter_Hoehe_P) / 16L; // p-part |
tmp_long = (tmp_long * (long)Parameter_Hoehe_P) / 32L; // p-part |
LIMIT_MIN_MAX(tmp_long, -127 * STICK_GAIN, 255 * STICK_GAIN); // more than the full range makes no sense |
HCGas -= tmp_long; |
// HCGas -= tmp_long; |
DebugOut.Analog[25] = tmp_long; |
GasReduction = tmp_long; |
// ------------------------- D-Part 1: Vario Meter ---------------------------- |
tmp_int = VarioMeter / 8; |
LIMIT_MIN_MAX(tmp_int, -181, 181); // avoid overflow when squared (181^2 = 32761) |
tmp_int2 = tmp_int; |
LIMIT_MAX(tmp_int2, 8); // limit quadratic part on upward movement to avoid to much gas reduction |
if(tmp_int2 > 0) tmp_int = tmp_int + (tmp_int2 * tmp_int2) / 4; |
else tmp_int = tmp_int - (tmp_int2 * tmp_int2) / 4; |
tmp_int = (tmp_int * (long)Parameter_Luftdruck_D) / 128L; // scale to d-gain parameter |
LIMIT_MIN_MAX(tmp_int,-32 * STICK_GAIN, 64 * STICK_GAIN); |
HCGas -= tmp_int; |
LIMIT_MIN_MAX(tmp_int, -127, 128); |
DebugOut.Analog[18] = tmp_int; |
// tmp_int2 = tmp_int/4; |
// LIMIT_MAX(tmp_int2, 64); |
// if(tmp_int > 0) tmp_int = tmp_int + (tmp_int2 * tmp_int2); |
// else tmp_int = tmp_int - (tmp_int2 * tmp_int2); |
tmp_int = (tmp_int * (long)Parameter_Luftdruck_D) / 64L; // scale to d-gain parameter |
LIMIT_MIN_MAX(tmp_int,-64 * STICK_GAIN, 64 * STICK_GAIN); |
// HCGas -= tmp_int; |
DebugOut.Analog[19] = tmp_int; |
GasReduction += tmp_int; |
} // EOF no baro range expanding |
// ------------------------ D-Part 2: ACC-Z Integral ------------------------ |
tmp_long = ((Mess_Integral_Hoch / 128L) * (int32_t) Parameter_Hoehe_ACC_Wirkung) / (128L / STICK_GAIN); |
LIMIT_MIN_MAX(tmp_long, -32 * STICK_GAIN, 64 * STICK_GAIN); |
HCGas -= tmp_long; |
// HCGas -= tmp_long; |
GasReduction += tmp_long; |
// ------------------------ D-Part 3: GpsZ ---------------------------------- |
tmp_int = (Parameter_Hoehe_GPS_Z * (int)FromNaviCtrl_Value.GpsZ)/128L; |
LIMIT_MIN_MAX(tmp_int, -32 * STICK_GAIN, 64 * STICK_GAIN); |
HCGas -= tmp_int; |
// HCGas -= tmp_int; |
GasReduction += tmp_int; |
//DebugOut.Analog[16] = GasReduction; |
GasReduction = (long)((long)GasReduction * HoverGas) / 512; |
//GasReduction = (long)((long)GasReduction * Poti3) / 64; |
DebugOut.Analog[17] = GasReduction; |
HCGas -= GasReduction; |
// limit deviation from hoover point within the target region |
if(!HeightTrimming && HoverGas > 0) // height setpoint is not changed and hoover gas not zero |
{ |
/trunk/jetimenu.c |
---|
46,7 → 46,7 |
{ |
JetiBox_printfxy(0,1,"Temperatures "); |
//JetiBox_printfxy(0,0,"%3i ", Poti3); |
//JetiBox_printfxy(0,1,"%3i %3i %3i %i ",HoverGas,DebugOut.Analog[26],DebugOut.Analog[17],DebugOut.Analog[18]); |
//JetiBox_printfxy(0,1,"%3i %3i %3i %i ",HoverGas,DebugOut.Analog[16],DebugOut.Analog[17],DebugOut.Analog[18]); |
} |
else |
if(RequiredMotors <= 6) |
/trunk/libfc1284.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/libfc644.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/uart.c |
---|
98,15 → 98,15 |
"Motor 2 ", |
"Motor 3 ", |
"Motor 4 ", //15 |
"P ", |
"D ", |
"ACC ", |
"GPS ", |
"16 ", |
"17 ", |
"Vario ", |
"D-Wirk ", |
"Servo ", //20 |
"Hovergas ", |
"Current [0.1A] ", |
"Capacity [mAh] ", |
" 24 ", |
" 24 Z ", |
" 25 ", //25 |
" 26 ", |
" 27 ", |
/trunk/version.txt |
---|
435,3 → 435,14 |
0.79R H.Buss |
- Compass-Richtung nun im Jeti-menü |
0.79s H.Buss |
- diverse Änderungen im Höhenregler |
- P wirkt nur noch die Hälfte |
- D wirkt stärker |
- Anpassung der Höhenregelung auf Level des Hoovergases |
- EE_Parameter.UnterspannungsWarnung = 33 |
- EE_Parameter.Luftdruck_D = 45; // war 30 |
- EE_Parameter.Hoehe_ACC_Wirkung = 20; // war 30 |
- EE_Parameter.Hoehe_HoverBand = 8; // war 5 |