Replies: 1 comment 1 reply
-
Apologies @fjdbirot. The rtcmbuild.py script was only intended as a crude academic illustration of how RTCM3 payloads are constructed from bits->octets->bytes. The code as it stands only works for unsigned integer values and is not viable as a means to generate real-world RTCM3 packets. I should have made this clearer in the comments and am minded to remove the example altogether, as it probably only serves to confuse. The pyrtcm library is purely a parser, not a generator.
Sorry for the confusion.
…--
semuadmin
SEMU Consulting
https://github.com/semuconsulting
________________________________
From: fjdbirot ***@***.***>
Sent: Tuesday, September 5, 2023 3:30:19 PM
To: semuconsulting/pyrtcm ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [semuconsulting/pyrtcm] RTCM 1005 message generation (Discussion #42)
Hi all, thanks for the tremendous work done on this package. I was inspired by the sample script rtcmbuild.py to try to generate a RTCM 1005 message. The data parameter in my case then looks like this.
data = [
("DF002", 1005),
("DF003", 0),
("DF021", 0),
("DF022", 1),
("DF023", 1),
("DF024", 1),
("DF141", 0),
("DF025", 4381294.934),
("DF142", 1),
("DF001_1", 0),
("DF026", -109288.027),
("DF364", 0),
("DF027", 4618528.857),
]
Where DF025, DF026 and DF027 are the XYZ coordinates to be encoded. This raises an error
bits += f"{val:0{datasiz(dfd)}b}"
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Unknown format code 'b' for object of type 'float'
Do you have any thoughts on how to fix this ? Thanks a lot !
—
Reply to this email directly, view it on GitHub<#42>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGZ7C36UGO7FXKU4Z7B2RYDXY4ZPXANCNFSM6AAAAAA4L4OIQE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, thanks for the tremendous work done on this package. I was inspired by the sample script rtcmbuild.py to try to generate a RTCM 1005 message. The data parameter in my case then looks like this.
Where DF025, DF026 and DF027 are the XYZ coordinates to be encoded. This raises an error
Do you have any thoughts on how to fix this ? Thanks a lot !
Beta Was this translation helpful? Give feedback.
All reactions