Skip to content

Commit

Permalink
support for new satellites
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Nov 2, 2024
1 parent 3f87736 commit 8ad9a85
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<dependency>
<groupId>ru.r2cloud</groupId>
<artifactId>jradio</artifactId>
<version>1.101</version>
<version>1.103</version>
</dependency>
<dependency>
<groupId>org.nanohttpd</groupId>
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/ru/r2cloud/satellite/decoder/Decoders.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import ru.r2cloud.jradio.fox.Fox1BBeacon;
import ru.r2cloud.jradio.fox.Fox1CBeacon;
import ru.r2cloud.jradio.fox.Fox1DBeacon;
import ru.r2cloud.jradio.geoscan.GeoscanBeacon;
import ru.r2cloud.jradio.mrc100.Mrc100Beacon;
import ru.r2cloud.jradio.usp.UspBeacon;
import ru.r2cloud.model.DecoderKey;
Expand Down Expand Up @@ -64,14 +65,18 @@ public Decoders(PredictOreKit predict, Configuration props, ProcessFactory proce
index("47963", "47963-0", new Diy1Decoder(predict, props));
index("47964", "47964-0", new Smog1Decoder(predict, props));
index("51439", "51439-0", new GaspacsDecoder(predict, props));
index("53385", "53385-0", new GeoscanDecoder(predict, props));
index("53108", "53108-0", new CcsdsDecoder(predict, props, TransferFrame.class));
index("56993", "56993-0", new Mrc100Decoder(predict, props, Mrc100Beacon.class));
index("56211", "56211-1", new InspireSat7SpinoDecoder(predict, props));
index("57167", "57167-0", new StratosatTk1Decoder(predict, props));
index("55104", "55104-0", new Sharjahsat1Decoder(predict, props));
index("56212", "56212-0", new RoseyDecoder(predict, props));
index("53384", "53384-0", new SputnixDecoder(predict, props));
index("R2CLOUD433", "R2CLOUD433-0", new GeoscanDecoder(predict, props, GeoscanBeacon.class, 74));
index("R2CLOUD434", "R2CLOUD434-0", new GeoscanDecoder(predict, props, GeoscanBeacon.class, 74));
index("R2CLOUD435", "R2CLOUD435-0", new GeoscanDecoder(predict, props, GeoscanBeacon.class, 74));
index("R2CLOUD438", "R2CLOUD438-0", new GeoscanDecoder(predict, props, GeoscanBeacon.class, 74));
index("R2CLOUD439", "R2CLOUD439-0", new GeoscanDecoder(predict, props, GeoscanBeacon.class, 74));
}

public Decoder findByTransmitter(Transmitter transmitter) {
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/ru/r2cloud/satellite/decoder/GeoscanDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@

public class GeoscanDecoder extends TelemetryDecoder {

public GeoscanDecoder(PredictOreKit predict, Configuration config) {
private final Class<? extends Beacon> beacon;
private final int beaconSizeBytes;

public GeoscanDecoder(PredictOreKit predict, Configuration config, Class<? extends Beacon> beacon, int beaconSizeBytes) {
super(predict, config);
this.beacon = beacon;
this.beaconSizeBytes = beaconSizeBytes;
}

@Override
Expand All @@ -35,12 +40,12 @@ protected BufferedImage decodeImage(List<? extends Beacon> beacons) {

@Override
public BeaconSource<? extends Beacon> createBeaconSource(ByteInput source, Observation req) {
return new Geoscan(source);
return new Geoscan<>(source, beacon, beaconSizeBytes);
}

@Override
public Class<? extends Beacon> getBeaconClass() {
return GeoscanBeacon.class;
return beacon;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ru.r2cloud.jradio.Beacon;
import ru.r2cloud.jradio.BeaconSource;
import ru.r2cloud.jradio.ByteInput;
import ru.r2cloud.jradio.sstk1.StratosatTk1;
import ru.r2cloud.jradio.geoscan.Geoscan;
import ru.r2cloud.jradio.sstk1.StratosatTk1Beacon;
import ru.r2cloud.jradio.sstk1.StratosatTk1PictureDecoder;
import ru.r2cloud.model.Observation;
Expand Down Expand Up @@ -35,7 +35,7 @@ protected BufferedImage decodeImage(List<? extends Beacon> beacons) {

@Override
public BeaconSource<? extends Beacon> createBeaconSource(ByteInput demodulator, Observation req) {
return new StratosatTk1(demodulator);
return new Geoscan<>(demodulator, StratosatTk1Beacon.class);
}

@Override
Expand Down
43 changes: 42 additions & 1 deletion src/main/resources/satellites.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
[
{
"id": "R2CLOUD432",
"name": "SAKURA",
"noradId": "60954",
"enabled": false,
"transmitters": [
{
"modulation": "AFSK",
"framing": "AX25",
"beaconClass": "ru.r2cloud.jradio.ax25.Ax25Beacon",
"frequency": 145825000,
"bandwidth": 20000,
"baudRates": [
1200
],
"deviation": 600,
"afCarrier": 1700,
"status": "ENABLED"
}
]
},
{
"id": "R2CLOUD431",
"name": "Changshagaoxin",
"noradId": "43665",
"enabled": false,
"transmitters": [
{
"modulation": "GFSK",
"framing": "AX100",
"beaconClass": "ru.r2cloud.jradio.csp.CspBeacon",
"frequency": 401606000,
"bandwidth": 20000,
"baudRates": [
4800
],
"deviation": 5000,
"status": "ENABLED"
}
]
},
{
"id": "R2CLOUD430",
"name": "PCSAT (NO-44)",
Expand Down Expand Up @@ -4680,7 +4721,7 @@
"baudRates": [
2400
],
"status": "ENABLED"
"status": "WEAK"
}
]
},
Expand Down

0 comments on commit 8ad9a85

Please sign in to comment.