Skip to content
New issue

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

Unclear on binary in telemetry format #6

Open
EricAndrechek opened this issue Jun 1, 2023 · 1 comment
Open

Unclear on binary in telemetry format #6

EricAndrechek opened this issue Jun 1, 2023 · 1 comment

Comments

@EricAndrechek
Copy link

Per the apr base91 comment telemetry spec (also at he.fi), section 3.9 says:

3.9 If binary values are transmitted, they MUST appear last in the
extension, after all 5 "analog" channels. They are put into a single
Base91 encoded integer, where the LSB (least significant bit) corresponds
to B1 of the traditional Telemetry specification, the 8th bit corresponds
to B8. Bits 9 to 13 are reserved to future use and will not currently be
treated as additional binary values.

Then, later, in the examples it is given:

Binary values:    '!"' decodes to decimal 1, binary values 10000000,
                          B1 is 1, B2 to B8 are 0.

I could be misunderstanding, but it was my understanding that in binary, the LSB was the right-most bit. Wouldn't this mean that in the given example B1 would be 0? I guess I am confused as to whether the binary representation goes from B8-B1 like 87654321 or from B1-B8 like 12345678. If B1 were the LSB I would think it would be 87654321 but in the example, it seems to go 12345678. Could I get some clarity here? Also, I am assuming, but would appreciate some clarity as well, as to where the 9-13 reserved bits would then go.

Thanks!

@hessu
Copy link
Owner

hessu commented Jun 1, 2023

Please look up APRS101.PDF, telemetry specification in Chapter 13. The !" base91 decodes to a decimal value of 1. Whether the LSB of an integer is left or right is an implementation detail of your computer but does not affect the spec. :) But the intention of the spec here is that the !" base91 decodes to a decimal value of 1 (only the of the integer LSB is 1), and in this case the first bit of APRS telemetry (B1) is 1.

In the classic APRS telemetry the first bit B1 is the first character in the ASCII telemetry string ("10000000"). In Mic-E telemetry it's encoded as a single integer and the LSB is B1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants