Periodic messages offer a number of benefits over regular polling
No time waiting for a response
Output of message as soon as they are available
Less busy reading
Easier to configure output of multiple message types
Also made a couple other changes
Added a context structure for the gps
Added a function for also sending a valset message to simplify using them
Removed the timeout for read, the sensor will attempt to read a message 10 times, evenly spaced, instead of checking the monotonic clock
Added a way to check if a message is of a certain type. The array of message headers will be useful for a polling interface in the future, if that's required.
Periodic messages offer a number of benefits over regular polling
Also made a couple other changes