Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

TLM temperature encoding #261

Open
dvcorreia opened this issue Oct 8, 2021 · 0 comments
Open

TLM temperature encoding #261

dvcorreia opened this issue Oct 8, 2021 · 0 comments

Comments

@dvcorreia
Copy link

The Unencrypted TLM Frame Specification states that beacon temperature should be encoded following a signed 8.8 fixed-point notation. If the value is not supported it should be set to 0x8000, -128 °C.
The encoding of the temperature is not clear reading the specification. The link provided for the signed 8.8 fixed-point notation does not provide any clear information regarding this, with the exception of a few lessons which go over fixed-point.
A few problems I've been encountered reading the specification document are presented next.

The not supported value of 0x8000 (-128 °C) is ambiguous. 0x80, the integer part of the fixed-point, can represent 128 or -128 in two's complement.
From the legacy code I've been tasked to migrate, we have been treating the value as a two's complement encoded value. This raises another question: if the integer part is encoded in two's complement, values between -1 and 0 (e.g. -0.25, -0.5, ...) can not be encoded, since two's complement doesn't have negative zero.

Any insight in this mater would be of help.

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

No branches or pull requests

1 participant