We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For the data chunk
data = [217, 135, 153, 12, 0, 0, 0, 0, 251, 133, 153, 12, 0, 0, 0, 0, 231, 207, 50, 49, 64, 131, 213, 36, 215, 182, 109, 50, 247, 152, 146, 50, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0, 192, 127, 0, 0]
and field description
[('uint64_t', 1, 'timestamp'), ('uint64_t', 1, 'timestamp_sample'), ('float', 12, 'control'), ('uint16_t', 1, 'reversible_flags'), ('uint8_t', 6, '_padding0')]
This library only outputs the first two items from the field description in
px4-ulog-rs/examples/gps-position.rs
Line 24 in 41b5b61
The extracted format from this library is
["uint64_t timestamp", "uint64_t timestamp_sample", "float[12] control", "uint16_t reversible_flags", "uint8_t[6] _padding0", ""]
Here is how I correctly parse them
import struct timestamp = struct.unpack('<Q', bytes([217, 135, 153, 12, 0, 0, 0, 0]))[0] timestamp_sample = struct.unpack('<Q', bytes([251, 133, 153, 12, 0, 0, 0, 0]))[0] control_0 = struct.unpack('<f', bytes([231, 207, 50, 49])) control_1 = struct.unpack('<f', bytes([64, 131, 213, 36])) control_2 = struct.unpack('<f', bytes([215, 182, 109, 50])) control_3 = struct.unpack('<f', bytes([247, 152, 146, 50])) control_4 = np.nan # ... control_11 = np.nan
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For the data chunk
and field description
This library only outputs the first two items from the field description in
px4-ulog-rs/examples/gps-position.rs
Line 24 in 41b5b61
The extracted format from this library is
Here is how I correctly parse them
The text was updated successfully, but these errors were encountered: