You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i understand that optical flow sensor calibration calculates the ratio between the optical flow pixels/sec and the gyro degrees/sec at AGL of 0.5m (altitude above ground).
once this is done, the optical flow pixels can be converted to degrees using this ratio (function opflowUpdate).
my first question is - is it true that the ratio would work only at 0.5m altitude?
i also see this code in function estimationCalculateCorrection_XY_FLOW():
fpVector3_t flowVel = {
.x = - (posEstimator.flow.flowRate[Y] - posEstimator.flow.bodyRate[Y]) * posEstimator.surface.alt,
.y = (posEstimator.flow.flowRate[X] - posEstimator.flow.bodyRate[X]) * posEstimator.surface.alt,
.z = posEstimator.est.vel.z
};
here the gyro body rate is subtracted from the flow rate.
my problem is that this is done before adjusting the flow rate for height. i expected to see this code instead:
fpVector3_t flowVel = {
.x = - (posEstimator.flow.flowRate[Y] * posEstimator.surface.alt / 0.5) - posEstimator.flow.bodyRate[Y],
.y = (posEstimator.flow.flowRate[X] * posEstimator.surface.alt / 0.5) - posEstimator.flow.bodyRate[X] ,
.z = posEstimator.est.vel.z
};
am i wrong?
my code adjusts only the flow rate for altitude assuming flow rate is pre-calibrated for 0.5m height.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i understand that optical flow sensor calibration calculates the ratio between the optical flow pixels/sec and the gyro degrees/sec at AGL of 0.5m (altitude above ground).
once this is done, the optical flow pixels can be converted to degrees using this ratio (function opflowUpdate).
my first question is - is it true that the ratio would work only at 0.5m altitude?
i also see this code in function estimationCalculateCorrection_XY_FLOW():
fpVector3_t flowVel = {
.x = - (posEstimator.flow.flowRate[Y] - posEstimator.flow.bodyRate[Y]) * posEstimator.surface.alt,
.y = (posEstimator.flow.flowRate[X] - posEstimator.flow.bodyRate[X]) * posEstimator.surface.alt,
.z = posEstimator.est.vel.z
};
here the gyro body rate is subtracted from the flow rate.
my problem is that this is done before adjusting the flow rate for height. i expected to see this code instead:
fpVector3_t flowVel = {
.x = - (posEstimator.flow.flowRate[Y] * posEstimator.surface.alt / 0.5) - posEstimator.flow.bodyRate[Y],
.y = (posEstimator.flow.flowRate[X] * posEstimator.surface.alt / 0.5) - posEstimator.flow.bodyRate[X] ,
.z = posEstimator.est.vel.z
};
am i wrong?
my code adjusts only the flow rate for altitude assuming flow rate is pre-calibrated for 0.5m height.
Beta Was this translation helpful? Give feedback.
All reactions