-
Hi, However, as I'm new to the GNSS world, I'm struggling a bit to start. I got a F9P and F9H, which I want to leverage to get precise headings (on a moving boat, both devices on-boat). I tried to play around with your repository, but could not get any useful output so far. I tried U-Center and there, I can at least read the correct lat and long values (but also do not know where/how to get the heading). I tried
But I do not know how to interpret this. Where is the lat, where is the long? How would I safe these values to variables? Finally, how would I get the heading, which is supposed to be in the UBX-NAV-RELPOSNED message (what does that even mean, how would I access this message)? I also tried your webserver, but there the lat, long values are completely off and change completely also. Sorry for the amount of questions, I'd be happy if you could answer some of them. -Benjamin |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @Ben93kie pyubx2 is a Python library which is intended to be used within a user's own Python script or application, so it assumes some knowledge of Python and the NMEA, UBX & RTCM protocols. The
There are plenty of code examples in the examples folder. There's also comprehensive API documentation available. You mentioned you tried to use the 'webserver' - I presume you're referring to this example? Note that this example only works with UBX data - specifically UBX NAV-DOP, NAV-POSLLH, NAV-HPPOSLLH, NAV-PVT and NAV-SAT message types. By default, a u-blox receiver does not output UBX protocol data - it only outputs NMEA data, which is what you're seeing above. For the webserver example to work, you will need to enable UBX output. Refer to the u-blox documentation for how to do this, or refer to some of the other examples provided. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! I got the values to print out the correct lat and long via this simple script (essentially your example in the README): from serial import Serial The message I receive is this <NMEA(GNRMC, time=23:00:09, status=A, lat=48.5344915, NS=N, lon=9.0706453333, EW=E, spd=0.147, cog=, date=2023-05-10, mv=, mvEW=, posMode=D, navStatus=V)> I correctly get the lat and long, but I do not see any "heading" output. Could you point me to somewhere where I would be able to implement that eventually? Would I have to use your other repo (https://github.com/semuconsulting/pynmeagps) or is this already fully included here? Yes, the webserver explanations make sense to me, too. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @Ben93kie Using the F9P and F9H receivers in the recommended moving base/rover configuration is a non-trivial exercise requiring fairly detailed knowledge of the protocols involved. Please appreciate that I do not work for, and am not paid by, u-blox. These libraries are maintained entirely voluntarily, though donations are always appreciated. I recommend you do some basic research into GNSS NMEA and UBX message protocols - there are plenty of resources you can find using Google. The u-blox Interface Manuals for your F9P and F9H receivers contain a wealth of information on the messages they support: https://www.u-blox.com/sites/default/files/documents/u-blox-F9-HPG-1.32_InterfaceDescription_UBX-22008968.pdf You can ask questions on the u-blox Support Forum here: https://portal.u-blox.com/s/ I also publish this one-page GNSS Positioning - A Reviser which gives an overview of the technology. In short, a GNSS receiver in its default configuration outputs various NMEA message types, each of which contains a specific set of data items. An NMEA message identifier comprises a one or two character 'talker' (which corresponds to the GNSS constellation) and a three character 'message ID' (which denotes the message type and content) e.g. GNRMC, where 'GN' signifies GNSS and 'RMC' signifies 'Recommended Minimum Content'. By default, a u-blox F9P receiver will output the following types at a rate of approximately one a second: Talkers: Message IDs: So if, for example, you want course over ground ('cog', or 'cogt'/'cogm' (true/magnetic)) you can find that in the RMC or VTG messages. Bear in mind a basic, unassisted GNSS receiver cannot give you 'heading' as such, only track or course over ground. The F9P and F9H receivers are designed to work in tandem to give you heading, using a technique known as RTK (real-time kinematics). To find out which type a given message is, using the 'identity' attribute: ubr = UBXReader(stream) NB: NMEA is a legacy protocol which was designed before modern GNSS capabilities were introduced. u-blox receivers also support the proprietary UBX protocol which covers a far more comprehensive range of message types and data items. For sophisticated applications, you may need to enable the UBX protocol as well as, or instead of, NMEA. Refer to the receiver's interface and integration manuals for more information. |
Beta Was this translation helpful? Give feedback.
Hi @Ben93kie
Using the F9P and F9H receivers in the recommended moving base/rover configuration is a non-trivial exercise requiring fairly detailed knowledge of the protocols involved.
Please appreciate that I do not work for, and am not paid by, u-blox. These libraries are maintained entirely voluntarily, though donations are always appreciated.
I recommend you do some basic research into GNSS NMEA and UBX message protocols - there are plenty of resources you can find using Google. The u-blox Interface Manuals for your F9P and F9H receivers contain a wealth of information on the messages they support:
https://www.u-blox.com/sites/default/files/documents/u-blox-F9-HPG-1.32_InterfaceDescri…