-
Notifications
You must be signed in to change notification settings - Fork 306
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
Feature - add end-of-train and head-of-train message decoding #387
Open
dtiller
wants to merge
40
commits into
wb2osz:master
Choose a base branch
from
dtiller:feat-EOTD-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…data + bch), not only (bch + data).
**** NOTE THAN THE MARK AND SPACE FREQUENCIES ARE BACKWARDS in gen_tone.c. Lines 228-229 correctly set f1_change_per_sample to the MARK frequency and f2_change_per_sample the space frequency. Line 383, however, sends MARK on 0 and SPACE on 1: tone_phase[chan] += dat ? f2_change_per_sample[chan] : f1_change_per_sample[chan]; As such, you have to generate packets like this: gen_packets -e R -m 1800 -s 1200 -o test.wav eotd.data EOTD input to the program consists of lines of 8 byte packets in HCB+ATAD format; i.e. the format that direwolf appends to the decoded packet. Ex: 81 b0 32 fb 31 23 73 8f A new option has been added to atest: -e type. That enables EOTD generation and the 'type' signifies 'R'ear to front or 'F'ront to rear decoding. Using "atest -B EOTD test.wav" the above packet decodes to: DECODED[1] 0:00.123 EOTD audio level = 49(30/31) [0] EOTD>APDW16:{DRREAR>FRONT:ts=2022-04-07T10:02:00.350,chain=ONLY,block=BASIC,devbat=OK,msgid=ONEWAY,unit_addr=18151,brake_status=GO(49 psig),disc_bits=f6,valve=OPERATIONAL,confirm=UPDATE,disc_bit_1=1,motion=STOPPED/NOT_MONITORED,light_batt=OK/NOT_MONITORED,light=ON,hex=81 b0 32 fb 31 23 73 8f
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.
This pull request adds EOTD and HOTD decoding to direwolf. The EOT device transmits on 457.9375 MHz, the HOT device on 452.9375 MHz. Both messages are 1200 baud MSK (1200 Hz mark/1800 Hz space) and use BCH codes for integrity checking.