mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
null location option from PL
This commit is contained in:
parent
6930d97104
commit
ad40e979bd
1 changed files with 2 additions and 8 deletions
|
@ -147,15 +147,9 @@ void autopilotInit(void)
|
|||
positionPidCoeffs.Ki = cfg->position_I * POSITION_I_SCALE;
|
||||
positionPidCoeffs.Kd = cfg->position_D * POSITION_D_SCALE;
|
||||
positionPidCoeffs.Kf = cfg->position_A * POSITION_A_SCALE; // Kf used for acceleration
|
||||
// initialise filters with approximate filter gains; location isn't used at this point.
|
||||
ap.upsampleLpfGain = pt3FilterGain(UPSAMPLING_CUTOFF_HZ, 0.01f); // 5Hz, assuming 100Hz task rate at init
|
||||
resetUpsampleFilters();
|
||||
// Initialise PT1 filters for deivative and acceleration in earth frame axes
|
||||
ap.vaLpfCutoff = cfg->position_cutoff * 0.01f;
|
||||
const float vaGain = pt1FilterGain(ap.vaLpfCutoff, 0.1f); // assume 10Hz GPS connection at start; value is overwritten before first filter use
|
||||
for (unsigned i = 0; i < ARRAYLEN(ap.efAxis); i++) {
|
||||
resetEFAxisFilters(&ap.efAxis[i], vaGain);
|
||||
}
|
||||
gpsLocation_t nullLocation = { 0 };
|
||||
resetPositionControl(&nullLocation, 100 /*Hz*/);
|
||||
}
|
||||
|
||||
void resetAltitudeControl (void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue