uBlox UBX ACK code in Python

In order to use the uBlox chip in a high altitude balloon, it must be set to flight mode to enable its use up to 50,000m altitude.

This mode is set by issuing a UBX command over the serial port, then checking its acknowledgement (ACK) packet response. There are great examples on UKHAS of how to do this on an Arduino, However my Pi payload code is all in Python, a language I am still getting to grips with.

It turns out it was relatively straightforward to translate line by line, also improving my understanding of how the code actually worked instead of just blindly copying/pasting blocks of example code. I encountered a slight problem when checking the ACK response packet from the GPS against a expected response as the expected response was stored as an integer value, and the actual reply was stored as a character!

My code can be found on GitHub


Leave a Reply

Your email address will not be published. Required fields are marked *