SatPulse 0.1 released and onwards to 0.2
I released version 0.1 of SatPulse today. This is the first stable release of SatPulse. The initial commit was back in December 2022, over 3 years ago.
For the last six months or so, I have been working on some major changes that are potentially destabilising. So I wanted to push out 0.1 based on the code before merging in these changes. I have now merged these changes into the master branch. Before I did the merge I was curious how much had changed.
$ git diff --stat master..v0.2-pre | tail -1
215 files changed, 41769 insertions(+), 5171 deletions(-)
About a third of this is test data, but that’s a pile of code. There are two main changes.
The first change is a complete rewrite of the core functionality of SatPulse: synchronizing the PTP hardware clock (PHC) to GPS time using timestamps and messages from the GPS. Although the current code works, it is a mess and not a good foundation for future improvements. I had been struggling for quite a while to come up with a better approach, but I now have something that feels much cleaner. The most important aspect of this is that there is now a simulator that allows realistic testing to be done without needing GPS or PHC hardware. The simulator has taken a lot of time, but I think it’s an investment that will pay off in the long-term.
The second change is to make the GPS support truly multi-protocol. Version 0.1 supports the u-blox UBX protocol only. Although the code was designed to be protocol-independent, there is a big difference between designing it to be protocol independent and it’s actually working well for other protocols in practice. What makes this hard is that my goal is to provide not only a protocol-independent representation of the relevant information transmitted by a GPS receiver, but also a protocol-independent model for querying and changing the configuration of a GPS receiver. The code on master now supports the Unicore UM980, which uses a protocol based on the protocol used by NovAtel OEM series of GPS receivers. One of the reasons I chose to work on this is that the protocol is both rich and completely different from UBX.
I plan to go into more detail about these changes in future posts.
These changes are working but there is lots of polishing, tweaking and testing still to do before a 0.2 release.