Add SET_SATELLITE_INFO (opcode 77) request + reply body structs#27
Open
cameronzucker wants to merge 2 commits into
Open
Add SET_SATELLITE_INFO (opcode 77) request + reply body structs#27cameronzucker wants to merge 2 commits into
cameronzucker wants to merge 2 commits into
Conversation
SetSatelliteInfoBody is the fixed 30-byte phone->radio payload pushed while the app tracks an amateur satellite (name, az/el, range, altitude, countdown). SetSatelliteInfoReplyBody is the bare ReplyStatus ack inferred from the SET_* convention. Derived from the BTECH UV Programmer decompile; verified against a golden vector.
Import the new bodies, add the BasicCommand.SET_SATELLITE_INFO case to body_disc(), and export both classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #26 with the
SET_SATELLITE_INFO(BasicCommand 77) payload structs.SET_SATELLITE_INFOis sent phone → radio while the app is tracking anamateur satellite. It pushes the current pass solution so the HT can show
az/el/range on its own screen during a pass. (Doppler shift is handled
separately via
FREQ_MODE_SET_PAR, not here.)Wire layout (fixed 30 bytes)
nameazimuthelevationrange_kmaltitude_kmcountdown_secs0xFFFF= unknownBitfields are MSB-first / big-endian, matching the rest of the protocol.
Provenance
The fields come from the BTECH UV Programmer app (
com.benshikj.ht.btech.ham):the serializer
w4.d#a()and its callercom.dw.ht.satellite.b#W(), whichcomputes the look-angle vector via Orekit and rounds az/el/range/altitude into
the fields above. Meanings are cross-checked against the app's embedded
satellite.protodata model (RfInfo/GP/TLE).Verification
Golden vector —
name="ISS", az=180°, el=45°, range=800 km, alt=420 km, countdown=600 s:SetSatelliteInfoBody(...).to_bytes()reproduces this byte-for-byte andround-trips via
from_bytes. Thecountdown_secssentinel (0xFFFF↔None)round-trips, and
SetSatelliteInfoReplyBodyencodes aReplyStatus.SUCCESSack to
0x00.Notes
bf_str(20, "gb2312")), not ASCII — identical fortypical names (
ISS,AO-91,SO-50), diverging only on non-ASCII.range_km/altitude_km> 65535 to 0 (not a sentinel).SET_*command in thisprotocol returns a bare
ReplyStatusack (modeled here onSetPhoneStatusReplyBody), and the decompile contains no dedicated replyparser. The request body is the verified contribution; the reply struct can
be dropped from this PR if confirming it against an on-air BLE/RFCOMM capture
first is preferable.