GNSS 2 - External Barometer Verification


#1

I am working on setting up the GNSS 2 with built in barometer so that I can take advantage of having the barometer readings take place at an elevated location away from the low-pressure bubble my one aircraft. I was using the Pixhack, but as it does not support UAVCAN, I have just switched to PixHawk.

Wiring is complete, compass is calibrated, and the GPS signal strength is terrific. However, I want to be sure that the PixHawk is indeed getting it’s altitude readings from the barometer found on the GNSS 2 - instead of the internal barometer.

I have configured the GNSS 2 by setting the ‘uavcan.pubp-pres’ to a value of ‘200000’. I see the range is ‘0’ for off, and up to ‘1000000’. I assume that the value I have given is all that is needed to enable the barometer? Is the value of 200000 appropriate?

I am using the latest beta Arducopter firmware: 3.4rc1

I see there is a value in Mission Planner’s parameter list called ‘GND_PRIMARY’ which allows the user to choose the barometer they wish to use. I’ve tried setting this to ‘1’, but the altitude values I see in Mission Planner jump around a lot when I do this. I have set it back to ‘0’.

How might I verify that I am using the barometer in the GNSS 2?


(Pavel Kirienko) #2

Hi Chuck,

Sorry about taking long to respond. The configuration value of 200000 enables the barometer output at 5 Hz (1e6/200000). 5 Hz may be too low for APM/PX4 to use this sensor feed, which may cause erratic behavior of the estimator. I recommend you to increase the output frequency to at least 20 Hz (uavcan.pubp-pres = 50000), and if it still produces inconsistent measurements, increase it further.

APM should start using the external barometer automatically. I am not aware of any user-friendly way to check which one is being use though.

Pavel.


#3

Thanks Pavel!
Just to clarify the uavcan.pubp-pres should be set to something like 50,000 to increase it, and not 500,000. Correct?

Secondly, should GND_PRIMARY in mission planner go back to a value of ‘1’?

Thanks again!


(Pavel Kirienko) #4

uavcan.pubp-pres is the publication period in microseconds, so lowering this value increases the frequency.

GND_PRIMARY should be kept 2, if I understand the logic correctly.


#5

Hello Pavel,
I did a test flight today and everything worked great. With the barometer readings happening on the mast with the GPS and compass, I am seeing a huge improvement in altitude hold during high speed flights. Thank you for your help!

I set uavcan.pubp-pres to 50,000.
In mission planner, GND_PRIMARY is set to ‘1’. A value of ‘0’ is default which means to use the barometer inside the flight controller, while a ‘1’ means to use the second barometer found by the flight controller.


(Pavel Kirienko) #6

Thanks for reporting back Chuck, appreciated. I will update the tutorial with GND_PRIMARY caveat.