loginov-rocks / UbxGps

Arduino library for the fastest and simplest communication with u-blox GPS modules
https://registry.platformio.org/libraries/loginov-rocks/UbxGps
MIT License
140 stars 44 forks source link

How do I use 2 (or more) messages in the same sketch? #2

Closed unocerobits closed 5 years ago

unocerobits commented 7 years ago

Following your code, would be possible to receive PVT and POS messages in the same sketch? Thanks

loginov-rocks commented 7 years ago

@unocerobits unfortunately no.

The main idea of this library is to get the minimum required data set in the shortest possible time, we do not want to care what type of message is sent from the receiver, so it should be configured to send one type message only. So in your sketch you use specified class to get it, UbxGpsNavPvt for example, or UbxGpsNavPosllh, etc.

What kind of data do you need? We can check protocol specification to find message type suiting your aims and implement it in library.

unocerobits commented 7 years ago

Thanks for your answer, Would be great that your library can to work with anothers messages simultaneosly, I think that the problem can be to unify serial handler in UbxGps.h header instead on the each message header ( I agree with you in your faster method).

I'm working in this with ODOand HNR-PVT, this are exclusive messages from UDR model NEO-M8U. When I work with each one alone works great, but I have problems when I try to work with both simultaneously (Obviously modifying your sources).

I thought that you had (maybe) thought a solution or alternative. Thanks for your time!