Closed nicolaerosia closed 6 years ago
We have observed very similar issue on pixracer. This occurs on average once every ~30-50 bootups. Currently, we're based off stable v1.5.5, but I believe it is also here on master since data collection logic did not really change since then. In our case, pressure reading here becomes negative, and then power function some lines below returns NaN because the base is negative.
We're going to address it in a very similar way by skipping publishing round if measurement is not finite, but I guess it would be interesting to dig in further and determine why pressure reading becomes negative once in a while.
Looking at the driver for the first time I notice it's nearly the same as the ms5525 differential pressure sensor I recently added. In that case any adc read (raw) returning 0 is invalid. https://github.com/PX4/Firmware/blob/master/src/drivers/ms5525_airspeed/MS5525.cpp#L197
I'm travelling this week, but I can take a closer look at this when I return.
I've fixed this on Navio2 by dropping Work Queues and reworking the measurement logic: https://github.com/PX4/DriverFramework/pull/215
Hi! @dagar Did you manage to find the cause of this issue on Pixracer? @nicolaerosia whats the status regarding your PR for Navio2?
@CarlOlsson check here the commits for MS5611: https://github.com/nicolaerosia/DriverFramework/commits/mpu9250-rework Currently I don't have the bandwidth to push that into DF and honestly it's not worth it since @dagar is trying to get the NuttX drivers working on Linux (but those are not great either - atleast ms5611), and we could fix them there. Take a look at my branch, the jitter I'm seeing is under 30 cm. If you want less jitter, remove the sleep from this function: https://github.com/nicolaerosia/DriverFramework/blob/3dce84255f6c450e593e13ea57e6921ae605cb3a/drivers/ms5611/MS5611.cpp#L595
and you'll have only
while(1) {
instance->_measure();
}
Okey, will look into it and see if it fixes the issue, thanks!
let me know if it fixes your issue
Absolutely!
This PR will make the ms5611 cross platform - https://github.com/PX4/Firmware/pull/7907 Then I'd like to go through and implement @nicolaerosia's best practices.
@CarlOlsson any updates?
Sorry didn't see your comment. Due to time constraints we had to solve the issue by writing a simple outlier detector before we feed the data to the EKF. Will update here if/when we get the time to go for a cleaner fix
Hey, this issue has been closed because the label status/STALE
is set and there were no updates for 30 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
Hello,
I'm experiencing sudden jumps in temperature and/or pressure jumps on RPIv3 + Navio2. It looks like that from time to time, the read value for temperature is 0, in which case the next value to be read will be invalid (pressure). The same applies for pressure reading, if it is zero, the next reading (temperature), will be invalid. Since a sample is composed of a temperature & pressure reading, in the worst case, when pressure is zero, we will miss two samples.
Example of bad samples: Bad pressure leads to bad temperature: (t,p) (8471480, 0) (t,p) (6519328, 8879896) 18378647 18377494 ms5611 temp, alt (-31.240000, 1461.988525, 84951.000000) (t,p) (8471576, 8879736) (t,p) (8471448, 8879832)
Bad temperature leads to bad pressure: (t,p) (8474264, 8880024) (t,p) (0, 5261664) 122574877 122573726 ms5611 temp, alt (-250.660004, nan, -12514.000000) (t,p) (8474360, 8880056) (t,p) (8474136, 8879928)
I've addressed this here https://github.com/PX4/DriverFramework/pull/198