I want the Horizontal Position Accuracy (HPA) value, as seen on the RTK Facet display on my embedded microcontroller, connected using NMEA to the RX and TX lines.
I have extensively read through firmware documentation for the Sparkfun RTK Facet and the u-blox GNSS Library. I understand this value comes from a different message NAV-HPPOSLLH through data.hAcc. Can I get that value onto my microcontroller through the RX and TX lines? I know you can save it to SD or send it over Bluetooth, so I imagine sending over the data port should be possible.
Yes, if you have the Facet Data Port configured for “NMEA”, any messages passed from the ZED-F9P (UART1) to the ESP32 (Serial1) will also be output on the Data Port.
You will be able to capture the HPPOSLLH messages using the u-blox GNSS library on your microcontroller, but you will need to be a little careful. Connect: the Data Port Serial1 TXO Output to your microcontroller Serial1 RX pin; and connect GND to GND. Do not connect your microcontroller Serial TX pin. Your microcontroller will be “listen only”.
When you call begin, set the assumeSuccess parameter to true:
myGNSS.begin(Serial1, 1100, true);
This will allow begin to succeed even though it can not send data to the module.
You then also need to tell the library that the HPPOSLLH data will arrive automatically / implicitly:
myGNSS.assumeAutoHPPOSLLH(true);
When you call getHPPOSLLH, the library will listen for the HPPOSLLH message and return its contents:
if (myGNSS.getHPPOPSLLH())
{
Serial.print(myGNSS.getHorizontalAccuracy());
}
Thank you so much Paul! We were able to get it working!
We have run into another problem, though. We are unable to get the UBX-NAV-HPPOSLLH settings to save. We read on other forums that the ZED-F9P sometimes has this problem of not keeping configurations.
In u-center, we will go to MSG (Messages), click ‘On’ for UART1 for NAV-HPPOSLLH, send, and then go to CFG (Configuration), select all devices, and click ‘Save current configuration.’ The unit will then function perfectly. However, the second we turn it off and restart the RTK Facet, we lose that configuration, and the ‘On’ flag is disabled for that message.
Is there a way to fix this? Is it possible maybe for our microcontroller to send commands over the TX line to fix this? I think I saw in one of the examples something like “myGNSS.setVal(UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_UART1,1),” but you mentioned not using TX.
The Facet is probably disabling the HPPOSLLH message when it restarts. Please look at the manual: https://docs.sparkfun.com/SparkFun_RTK_ … _messages/ . If you enable the HPPOSLLH message through the NAV menu, the Facet will record that in a “profile” and will re-enable it when it restarts.