diff --git a/README.md b/README.md
index d3226fef..df4e0551 100644
--- a/README.md
+++ b/README.md
@@ -569,6 +569,11 @@ jradio has lots of built-in satellite decoders. Some of them have non standard d
56214 |
ru.r2cloud.jradio.sapling.SaplingGiganteumBeacon |
+
+ ROSEYCUBESAT-1 |
+ 56212 |
+ ru.r2cloud.jradio.roseycub.RoseyCubesatBeacon and images via ru.r2cloud.jradio.roseycub.RoseyPictureDecoder |
+
diff --git a/src/main/java/ru/r2cloud/jradio/sharjahsat/Sharjahsat1PictureDecoder.java b/src/main/java/ru/r2cloud/jradio/sharjahsat/Sharjahsat1PictureDecoder.java
index 92a2ff09..3cd16bb7 100644
--- a/src/main/java/ru/r2cloud/jradio/sharjahsat/Sharjahsat1PictureDecoder.java
+++ b/src/main/java/ru/r2cloud/jradio/sharjahsat/Sharjahsat1PictureDecoder.java
@@ -28,7 +28,12 @@ public Sharjahsat1PictureDecoder(List beacons) {
Collections.sort(beacons, new Comparator() {
@Override
public int compare(Sharjahsat1Beacon o1, Sharjahsat1Beacon o2) {
- return Long.compare(o2.getSharjahsat1Header().getPacketCounter(), o1.getSharjahsat1Header().getPacketCounter());
+ Sharjahsat1Header o2Header = o2.getSharjahsat1Header();
+ Sharjahsat1Header o1Header = o1.getSharjahsat1Header();
+ if (o2Header == null || o1Header == null) {
+ return 0;
+ }
+ return Long.compare(o2Header.getPacketCounter(), o1Header.getPacketCounter());
}
});
}
diff --git a/src/test/resources/sharjahsat1_beacons.txt b/src/test/resources/sharjahsat1_beacons.txt
index e39f73f4..304feac3 100644
--- a/src/test/resources/sharjahsat1_beacons.txt
+++ b/src/test/resources/sharjahsat1_beacons.txt
@@ -1,3 +1,4 @@
+826C64AA9EA6E0826C60AA9EA66103F04553455250F6000000
826C64AA9EA6E0826C60AA9EA66103F04553455241F60E000000494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFC000110800F0014003012100021101031101FFDA000C03010002110311003F00EECF4A85EB03DB2B3D567A60446A16A4044D509C532461A88D32461A6D310CA6D0409494C42525218945020A5A02E2D2D050EA5CD218EA70A432415229A4512AD4AB4164CB532D22C9D0D594A451650D598CD228B919A9D8FEE8D219879A85CD6C7315D8D577340109A89A8111354469888DAA
826C64AA9EA6E0826C60AA9EA66103F04553455241F60F000000627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748
826C64AA9EA6E0826C60AA9EA66103F04553455241F610000000FFD8FFE000104A46494600010101000000000000FFDB0043000403030403030404030405040405060A07060606060C0909070A0F0D0F0F0E0D0E0E10121714101116110E0E141B141618191A1A1A10131C1E1C191E17191A19FFDB0043010405050605060C07070C19110E111919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433