HEEEELP!!! Position.z #896
dusanpavl0vic
started this conversation in
General
Replies: 1 comment
|
This is happening because you're correctly decoding the stream, but that stream doesn't always contain real positions. Many messages are incomplete or only contain state, which is why you're getting 0,0,0. The problem isn't the decoding itself, but rather that you're treating all the packets as if they all contained valid coordinates. The solution is to filter out only the messages that actually contain complete position data and not interpret state or empty messages as valid. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I'm working with the F1 live timing API (Position.z and CarData.z streams), and I'm having trouble decoding the data correctly.
I'm decoding the Base64 string and using zlib (raw deflate), but the output I get always contains:
Status: "OnTrack"
X: 0, Y: 0, Z: 0
for all drivers.
Am I doing something wrong in the decoding process, or is this expected for some packets?
Is there anything specific I should watch out for when parsing these .z streams?
Any help or example would be really appreciated!
All reactions