Brian needs ubx training....
It's not that different, the sentences, although requests are required, are very close to nmea except not all text but a mix of text and data - a lot like udp currently works. It's just really fiddly programming as usual.
Every Frame starts with a 2-byte Preamble consisting of two synchronization characters: 0xB50x62.
• A 1-byte MessageClass field follows. A Class is a group of messages that are related to eachother.
• A 1-byte MessageID field defines the message that is to follow.
• A 2-byte Length field follows. The length is defined as being that of the payload only. It does not include the Preamble, Message Class, Message ID, Length, or CRC fields. The number format of the length field is a Little-Endian unsigned 16-bit integer.
• The Payload field contains a variable number of bytes.
• The two 1-byte CK_A and CK_B fields hold a 16-bit checksum.
The UBX dual Antenna thing is already done. I read UBX NavPosLLH to get Lat + Long + hight to calculate heading and roll. Alternatively I calcualte heading from two GGA positions.
For keeping it simple for AOG I create a $PAOGI sentence of it, so AOG has to parse only one sentence to have position, speed and heading.
Three questions came up:
Is the PAOGI sentence correctly processed, as there might be two fields for heding: one from GPS and one from IMU, or did I missanderstand this?
What heading source do I have to activate in AOG settings? I tried to add "headingHDT = headingTrue;" to CNMEA #436 and selected heading by HDT.
What happens, if I can't calculate heading, and the field stays empty?
I wrote it for the ESP32
But for this board, you have to "move" the pins for RX1/TX1 and Uref for both ardusimple.
The basis of the code was WEder's NTRIP client. You can transfer the code for adruino. The idea is, to do this work outside AOG to have a real roof top unit, that delivers all data.
The config for both ardusimple stays the same, you may activate UBX NavPOSLLH to calculate roll. It sends NTRIP from AOG to both F9P, or uses the internal ESP NTRIP client (by WEder). Simply connect both RX1/TX1 from the Ardusimple to different arduino/ESP pins.
The only problem is, that I didn't have time to finish. So feel free to take the code.