Skip to content

Commit

Permalink
support custom frame length for stratosattk1
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Nov 2, 2024
1 parent 21dbb9d commit a20c653
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ru/r2cloud/jradio/source/RtlSdr.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public RtlSdr(InputStream iqStream, float sampleRate, Long totalSamples) {
buffer = new byte[BUFFER_SIZE];
maxBytes = buffer.length;
lookupTable = new float[0x100];
for (int i = 0; i < 256; ++i) {
for (int i = 0; i < lookupTable.length; ++i) {
lookupTable[i] = (i - 127.5f) / 128.0f;
}
context = new Context();
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/ru/r2cloud/jradio/sstk1/StratosatTk1.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
import ru.r2cloud.jradio.fec.ccsds.UncorrectableException;

public class StratosatTk1 extends BeaconSource<StratosatTk1Beacon> {

private static final Logger LOG = LoggerFactory.getLogger(StratosatTk1.class);
private final AdditiveScrambler scrambler;

public StratosatTk1(ByteInput demod) {
super(new CorrelateSyncword(new SoftToHard(demod), 4, "10010011000010110101000111011110", 66 * 8));
this(demod, 66);
}

public StratosatTk1(ByteInput demod, int beaconSizeBytes) {
super(new CorrelateSyncword(new SoftToHard(demod), 4, "10010011000010110101000111011110", beaconSizeBytes * 8));
scrambler = new AdditiveScrambler(0x21, 0x1ff, 8, 8);
}

Expand Down

0 comments on commit a20c653

Please sign in to comment.