/etc/colibry/common # cat estimator.cfg.liion
#-----------
# Estimators
#-----------
# Global
#Covariance Matrix (P)
PinitVit =
(
"PinitVitInitValue",
("Default", 10.0), # [mm/s]
("Freefall", 2000.0) # [mm/s]
);
PinitAngle = 3.0; # In degrees
PinitAlt = 10.0; # In mm
PinitHorizontalBias = 2.0; # In mg
PinitDerive =
(
"PinitDeriveInitValue",
("Default", 0.5), # [deg/s]
("Immobility", 5.0), # [deg/s]
("Calibration", 0.04) # [deg/s]
);
PinitBP = 0.0; # In Pascals
PinitCap = 0.0; # In degrees
PinitPosition = 0.0;
PinitVent = 0.0;
PinitVerticalBias = 30.0; # In mg
pathToAccBiasFile = "/data/acc_calibration_v1.bin";
#Process Noise (Q)
bruitAcc = 2.5; # In thousandth's of g, the actual value will be : (bruitAcc * dt)^2
bruitVol = 2.0; # the actual value will be (bruitVol*_SQRT_MIN)^2 * adcTs
bruitVolVert = 0.4; # the actual value will be (bruitVolVert*_SQRT_MIN)^2 * adcTs
bruitAccVol = 40.0; # the actual value will be (bruitAccVol * MG)^2
rdw = 0.5; # the actual value will be (rdw*DEG_TO_RAD*adcTs)^2
rdwSol = 5.5; # the actual value will be (rdwSol*DEG_RAC_MIN)^2
feGyro = 0.01;
feSol = 0.02;
dBiais = 0.3; # the actual value will be (dBiais*MG*_SQRT_MIN)^2 * adcTs
dBiaisZ = 0.65; # the actual value will be (dBiaisZ*MG*_SQRT_MIN)^2 * adcTs
dDerive = 0.03; # the actual value will be (dDerive*DEG_TO_RAD*_SQRT_MIN)^2 *adcTs
dBiaisPression = 1.0; # the actual value will be (dBiaisPression*_SQRT_10MIN)^2 *adcTs
dBiaisTh = 15.0; # In thousandth's of g
dBiaisMvt = 2.0; # dBiaisMvt/90*MG
dDeriveTh = 0.2; # In degrees/s
dVent = 0.02;
TauVent = 0.5;
tauWindToZero = 1.5; # [s]
dPosition = 0.5;
#Observation Noise (R)
RAero = 200.0; # the actual value will be (RAero * MG)^2
RSpeedGPS = 0.2; # the actual value will be (RSpeedGPS)^2
Rderive = 1.0; # (Rderive*DEG_S)^2
RbiaisZ = 10.0; # (RbiaisZ*MG)^2
RPression = 0.3; # (RPression)^2
RUs = 50.0; # (RUs*MM)
RPositionGPS = 2.0; # the actual value will be (RPositionGPS)^2
#Sensor Monitoring Algorithm
#Dynamic Inclinometer
bruitInclinoMax = 30.0; # the actual value will be (bruitInclinoMax*DEG)^2
bruitInclinoMin = 5.0; # the actual value will be (bruitInclinoMin*DEG)^2
normAccMax = 0.5;
normAccMin = 0.015;
reductionBruitInclino = 5.0; # the actual value will be (reductionBruitInclino*DEG)^2
#Vision Monitoring
fusionVisionVz = false;
visionIndicatorActive = false;
#1st order low-pass (tau=0.05s / fe=66Hz)
visionFilterB = [ 0.0, 0.2591818];
visionFilterA = [ 1.0, -0.7408182];
#1st order low-pass (tau=0.5s / fe=66Hz)
visionSigmaFilterB = [ 0.0, 0.0295545];
visionSigmaFilterA = [ 1.0, -0.9704455];
visionSigmaMin = 0.15;
gpsVisionSensitivity = 0.3;
gpsVisionSensitivityMin = 0.3;
cptVisionFail = 100;
visionIndicatorRejectThreshold = 0.8;
visionIndicatorRejectThresholdHoveringNoGps = 1.5;
visionSpeedRminSet =
(
"visionSpeedRminInitValue", # already squared!
("Default", 0.25), # [m/s]^2
("GPS", 1.0) # [m/s]^2
);
visionSpeedRminAltitudeGain = 0.0011; #[ (m/s)^2/(m^2)]
dRVisionSpeedZ = 0.3; # [no unit]
altitudeVisionSensorToGround = 0.04; # [m]
#Magic Carpet Dynamic Noise
RCarpetHorizontalMax = 20.0; # In cm
RCarpetHorizontalMin = 10.0; # In cm
NbPaternsForMaxCarpetHorizontalPrecision = 5.0;
minNbPatternForEstimation = 2;
RCarpetAltitudeMax = 15.0; # In cm
RCarpetAltitudeMin = 5.0; # In cm
NbPatternsForMaxCarpetAltitudePrecision = 5.0;
#Ultrasound Algorithm
nbSamplesUS = 5;
thresholdCoherenceUS = 0.15;
UsRejectionStepThreshold = 0.12;
UsRejectionPredictionThreshold = 0.12;
UsRejectionNewGroundHeightThreshold = 0.07;
UsRejectionFirstGroundHeightThreshold = 0.3;
UsAltMinForPresence = 2.0;
UsAltMaxForPresence = 3.5;
ultrasoundFrequency = 15.0; # [Hz]
timeToLossUsSignal = 1.0; # [s]
SamplesNb = 5;
nbNoUsMeasuresToResetBuffers = 67; # 5 samples at 15 Hz over 200 Hz
thresholdUsCarpetLowHeightEstimator = 0.0799999982118607;
thresholdUsCarpetHighHeightEstimator = 0.200000002980232;
thresholdTimeWihtoutCarpetInEstimator = 100.0;
gainRejetUsHeightEstimator = 0.00219999998807907;
#Pressure observation
diffAltitudePressMax = 8.0; # [m]
altitudePressMinForTakeOff = 0.6; # [m]
heightGroundEffect = 0.0; # [m]
durationLandingWithoutPress = 0.0; # [s]
#Aerodynamic observation
normAccHorMax = 1.0; # In g
timeBeforeObsAcc = 200.0;
#Various tests
BiasZInclThreshold = 45.0; # In degrees
accHorizontalityTest = 30.0; # the actual value will be (accHorizontalityTest*DEG*GRAVITY)
maxEstimatedHorizontalBias = 100.0; # In mg
maxEstimatedVerticalBias = 350.0; # In mg
AccThresholdForAngleInit = 3.4;
#GPS settings
gpsLag = 1;
timeToResetPastSpeed = 0.400000005960464; # 2*dtGps
# Butterworth filter 1st order (Fc = 0.1Hz, Fe=5Hz)
takeoffAltitudeFilterB = [3.0468747e-2,
3.0468747e-2];
takeoffAltitudeFilterA = [1.0000000,
-9.3906251e-1];
# States activation
alwaysIntegratePosition = false; # For Kalamos and Pix4D
# Sensor Activation
xsensFusion =
{
pos = true;
speed = false;
angles = false;
};
pathToGyroBiasFile = "/data/gyro_calibration_v1.bin";
minBiasDiffToSaveGyroCalib = 0.18; # [deg/s]
minTemperatureToSaveGyroCalib = 49.5; # [degree Celcius]
# Vertical Model
# All cov are squared in config manager
verticalModelInitCz = 0.9; # [s-1]
verticalModelInitCovGamma = 0.0667; # [kg-1]
verticalModelInitCovCz = 0.0167; # [s-1]
verticalModelCovR = 1.6; # [m.s-2]
verticalModelBruitGamma = 0.002; # [kg-1]
verticalModelBruitCz = 0.0; # [s-1]
verticalModelMinGamma = 1.0; # [kg-1]
verticalModelMinCz = 0.0; # [s-1]
verticalModelMaxGamma = 3.0; # [kg-1]
verticalModelMaxCz = 1.5; # [s-1]
verticalModelMotorHistorySize = 3;
# Aerodynamic Torque
aerodynamicTorqueInitCov = 1.0;
aerodynamicTorqueProcessNoise = 0.015;
aerodynamicTorqueMeasureNoise = 5.0;
aerodynamicTorqueRotationalLag = 2;
aerodynamicTorqueInitialModel = [ -0.008500000461936, 0.442699998617172, -0.173199996352196, 15.7835998535156, -1.01530003547668, 4.92819976806641, 312.894104003906, -7.81479978561401, 14.4722995758057, 50.79090023040771 ];
# Butter order 2, fc=40Hz, fs=200Hz
aerodynamicTorqueZFilterB = [ 0.206572083826148, 0.413144167652296, 0.206572083826148 ];
aerodynamicTorqueZFilterA = [ 1.000000000000000, -0.369527377351241, 0.195815712655833 ];
# Heading
pathToMagnetoBiasFile = "/data/magneto_calibration_v1.bin";
thresholdTimeToAbortCalibration = 30.0; # [s]
noiseMagnetoMeasurement = 60.0; # [mG] - the actual value will be (noiseMagnetoMeasurement)^2 [mG^2]
noiseProcessMag = 300.0; # [mG/(rad/s)] - the actual value will be (2*PdriftGyro*noiseProcessMag)^2 [mG^2]
noiseProcessMagBias = 50.0; # [mG] - the actual value will be (noiseProcessMagBias*_SQRT_30MIN)^2 *adcTs) [mG^2]
thresholdMagBiasCov =
(
"thresholdMagBiasCovInitValue",
("HighAccuracy", [180.0, 180.0, 180.0]), # [mG^2]
("MediumAccuracy", [400.0, 400.0, 900.0]), # [mG^2]
("LowAccuracy", [3600.0, 3600.0, 8100.0]) # [mG^2]
);
magneticFieldCovInit = 2500.0; # [mG^2]
magnetoBiasCovInit = 40000.0; # [mG^2]
magnetoInnovationTestSigmaLevel = 2.0; # []
minMagnetoCalibInnovationRatioToValidateAxis = 0.95; # []
magnetoBiasValiditySigmaLevel = 4.0; # []
biasUpdateAllowedSigmaLevel = 1.0; # []
invalidCalibrationDetectionDuration = 2.0; # [s]
headingFusionGainMagneto = 0.0015; # []
headingFusionGainCarpet = 0.3; # []
headingFusionGainXsens = 0.1; # []
magicCarpetMinCovPsi = 5.0; # [deg]
magicCarpetHeadingProcessNoise = 2000.0; # [deg/s]
magicCarpetMinPatternsForHeading = 2; # []
magicCarpetDelay = 0.1; # [s]
# User Trajectory
userTrajectoryConfig =
{
positionStdInit = 100.0 # [m]
positionProcessNoise = 0.3 # [m/s]
speedProcessNoise = 2.0 # [m/s2]
initialHeight = 1.5; # [m]
minDistance = 2.0; # [m]
defaultDistance = 10.0; # [m]
barometerMaxFrequency = 1.0; # [Hz]
barometerFilterGain = 0.5; # []
barometerHeightNoise = 3.0; # [m]
barometerSpeedNoise = 0.5; # [m/s]
barometerObsGpsTimeout = 2.0; # [s]
barometerMinNewDataForHeightInit = 3; # []
barometerMaxGapForValidity = 60.0; # [Pa]
# Butterworth 1st order, fc/(fs/2) = 0.07
barometerValidPressureFilterB = [9.9424465e-2, 9.9424465e-2];
barometerValidPressureFilterA = [1.0, -0.8011511];
targetImageLagToNoise = 25.0; # [deg/s]
targetImageMinNoise = 6.0; # [deg]
targetImageConstantRangeNoise = 0.1; # [1/m]
targetImageLostUnvalidCount = 20; # [No unit]
gpsPositionMinNoise = 1.0; # [m]
gpsSpeedNoise = 0.2; # [m/s]
gpsPositionErrorForReset = 100.0; # [m]
gpsDistanceMax = 1000.0; # [m]
gpsMinNewDataForPosition = 3; # []
securityPositionNoise = [0.5, 0.5, 0.3]; # [(m/s)^2*sqrt(dt)]
brakingTime = 20.0; # [s]
accuracyForPosition = 20.0; # [m]
accuracyForDirectionOK = 6.0; # [deg]
accuracyForDirectionKO = 10.0; # [deg]
directionUnknownTimeout = 1.5; # [s]
};
userCourseFilterTimeConstant = 1.0; # [s]
userCourseFilterMinSpeed = 1.0; # [m/s]
# Battery
smartBatteryIsUsed = false;
batteryType = 0;
vbatFilterBCoef = [ 0.0015683340607211, 0.0015683340607211 ];
vbatFilterACoef = [ 1.0, -0.996863305568695 ];
shutdownVoltage = 8.3; # [V] Will be compared with the estimated no load voltage
# Parameters Kalman filter
vBatRawDiff = 0.1; #[V]
batteryModelInitBeta = 0.05; # []
batteryModelMinBeta = 0.02; # []
batteryModelMaxBeta = 0.26; # []
batteryModelInitCovE = 2.5e-07; # [V²]
batteryModelInitCovBeta = 6.25e-06; # [] (pow2(0.05*batteryModelInitBeta))
batteryModelMeasurementNoise = 1.0e-02; # [V²]
batteryModelNoiseE = 5.0e-07; # (pow2(0.01)*ADC_TS);
batteryModelNoiseBetaNoEstimation = 0.0;
batteryModelNoiseBetaFastEstimation = 5.0e-09; # (pow2(0.05*batteryModelInitBeta)*ADC_TS)
batteryModelMinMotorsVoltage = 0.0; #[V]
# Velocities
nbPtMCMem = 3;
positionMCVarThreshold = 0.00999999977648258;
gainEstPos = 0.5;
maxMCPattern = 7;
gainRejetVisionPos = 0.200000002980232;
offsetRejetVisionPos = 0.0500000007450581;
velocitiesAccGain = 0.5;
maxTimeNotVisionS = 20.0;
# ESC motor speed control
motorSpeedsFilterB = [ 1.0000, 0.0000 ];
motorSpeedsFilterA = [ 1.0000, 0.0000 ];