Skip to content

Altitude Offset for Flowdeck V2 with CF Bolt #157

Answered by knmcguire
johnnwallace asked this question in Q&A
Discussion options

You must be logged in to vote

That is being handled from the zranger2 driver code. Before it is sent to the Kalman filter, you can add the 0.1 meters to the distance like this? I've added the DISTANCE_OFFSET here so that you can make that a define on top of the file.

  float distance = (float)range_last * 0.001f + DISTANCE_OFFSET; 
  float stdDev = expStdA * (1.0f  + expf( expCoeff * (distance - expPointA)));
  rangeEnqueueDownRangeInEstimator(distance, stdDev, xTaskGetTickCount());

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johnnwallace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment