Closed pdavid747 closed 2 months ago
@pdavid747 what is this PR about?
@alphaville originally it was just taking the initial altitude values and getting an average. the reason for doing this was so that we will have an altitude from ground, not sea level. this will be calculated by subtracting the initial average from the current altitude.
when completing this I realised that the barometer code was wrong and needed re done. currently the GPS has this initialisation feature, and im working on implementing it with the new barometer code.
@pdavid747, can you please write a proper description and title for this PR?
@pdavid747 I've made a few comments otherwise LGTM
@alphaville using "@property" seems to stop the code from working...
@alphaville using "@Property" seems to stop the code from working...
What do you mean? Is there a specific error it gives? Did you investigate?
@alphaville using "@Property" seems to stop the code from working...
What do you mean? Is there a specific error it gives? Did you investigate?
it gives "numpy.float64 object is not callable"
@alphaville using "@Property" seems to stop the code from working...
What do you mean? Is there a specific error it gives? Did you investigate?
it gives "numpy.float64 object is not callable"
What gives "numpy.float64 object is not callable"?
@alphaville using "@Property" seems to stop the code from working...
What do you mean? Is there a specific error it gives? Did you investigate?
it gives "numpy.float64 object is not callable"
What gives "numpy.float64 object is not callable"?
Yesterday when running python pressure_sensor.py
it would stop working because of the __initialise()
function called in line 60.
By adding a few print statements to debug we found it was p = self.pressure()
(line 191) causing the issue and getting the error above.
The same issue then happened for .altitude()
function in line 218
@alphaville using "@Property" seems to stop the code from working...
What do you mean? Is there a specific error it gives? Did you investigate?
it gives "numpy.float64 object is not callable"
What gives "numpy.float64 object is not callable"?
Yesterday when running
python pressure_sensor.py
it would stop working because of the__initialise()
function called in line 60. By adding a few print statements to debug we found it wasp = self.pressure()
(line 191) causing the issue and getting the error above. The same issue then happened for.altitude()
function in line 218
thanks for the clarification Jamie.
@alphaville @jamie-54 @ejb-11 @Yuanbwcx @Minanchi @Runway27
Can we get this reviewed and merged as soon as possible please, as I need it for other things (new Kalman filter, controllers)
Main Changes
Taking the initial altitude values and getting an average. The reason for doing this was so that we will have an altitude from ground, not sea level for both the barometer and the GNSS sensors. This will be calculated by subtracting the initial average from the current altitude.
Tests
Tests worked well both sensors take an average of the initial altitude values.