diff --git a/README.md b/README.md
index 6f8392a6..a6e27e33 100644
--- a/README.md
+++ b/README.md
@@ -614,6 +614,11 @@ jradio has lots of built-in satellite decoders. Some of them have non standard d
58470 |
ru.r2cloud.jradio.enso.EnsoBeacon |
+
+ EIRSAT-1 |
+ 58472 |
+ ru.r2cloud.jradio.eirsat.EirsatBeacon |
+
diff --git a/src/main/java/ru/r2cloud/jradio/ccsds/PacketSecondaryHeader.java b/src/main/java/ru/r2cloud/jradio/ccsds/PacketSecondaryHeader.java
index 856411d6..2a11a9be 100644
--- a/src/main/java/ru/r2cloud/jradio/ccsds/PacketSecondaryHeader.java
+++ b/src/main/java/ru/r2cloud/jradio/ccsds/PacketSecondaryHeader.java
@@ -6,7 +6,11 @@
public class PacketSecondaryHeader {
- private int pusHeader;
+ public static final int SIZE_BYTES = 3;
+
+ private Boolean ccsdsSecondaryHeader;
+ private int pusVersion;
+ private Integer ack;
private int serviceType;
private int serviceSubType;
@@ -14,18 +18,44 @@ public PacketSecondaryHeader() {
// do nothing
}
- public PacketSecondaryHeader(BitInputStream bis) throws IOException {
- pusHeader = bis.readUnsignedByte();
+ public PacketSecondaryHeader(BitInputStream bis, boolean telemetry) throws IOException {
+ if (telemetry) {
+ bis.skipBits(1);
+ } else {
+ ccsdsSecondaryHeader = bis.readBoolean();
+ }
+ pusVersion = bis.readUnsignedInt(3);
+ if (telemetry) {
+ bis.skipBits(4);
+ } else {
+ ack = bis.readUnsignedInt(4);
+ }
serviceType = bis.readUnsignedByte();
serviceSubType = bis.readUnsignedByte();
}
- public int getPusHeader() {
- return pusHeader;
+ public Boolean getCcsdsSecondaryHeader() {
+ return ccsdsSecondaryHeader;
+ }
+
+ public void setCcsdsSecondaryHeader(Boolean ccsdsSecondaryHeader) {
+ this.ccsdsSecondaryHeader = ccsdsSecondaryHeader;
+ }
+
+ public int getPusVersion() {
+ return pusVersion;
+ }
+
+ public void setPusVersion(int pusVersion) {
+ this.pusVersion = pusVersion;
+ }
+
+ public Integer getAck() {
+ return ack;
}
- public void setPusHeader(int pusHeader) {
- this.pusHeader = pusHeader;
+ public void setAck(Integer ack) {
+ this.ack = ack;
}
public int getServiceType() {
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Adcs.java b/src/main/java/ru/r2cloud/jradio/eirsat/Adcs.java
new file mode 100644
index 00000000..ee9ea6ae
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Adcs.java
@@ -0,0 +1,87 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Adcs {
+
+ private AdcsMode packedadcsmode0;
+ private int executioncount0;
+ private float rawgyrorate0;
+ private float rawgyrorate1;
+ private float rawgyrorate2;
+ private float fss1alphaangle0;
+ private float fss1betaangle0;
+
+ public Adcs() {
+ // do nothing
+ }
+
+ public Adcs(BitInputStream dis) throws IOException {
+ packedadcsmode0 = AdcsMode.valueOfCode(dis.readUnsignedByte());
+ executioncount0 = dis.readUnsignedShort();
+ rawgyrorate0 = dis.readShort() * -0.0104166f;
+ rawgyrorate1 = dis.readShort() * -0.0104166f;
+ rawgyrorate2 = dis.readShort() * -0.0104166f;
+ fss1alphaangle0 = dis.readFloat();
+ fss1betaangle0 = dis.readFloat();
+ }
+
+ public AdcsMode getPackedadcsmode0() {
+ return packedadcsmode0;
+ }
+
+ public void setPackedadcsmode0(AdcsMode packedadcsmode0) {
+ this.packedadcsmode0 = packedadcsmode0;
+ }
+
+ public int getExecutioncount0() {
+ return executioncount0;
+ }
+
+ public void setExecutioncount0(int executioncount0) {
+ this.executioncount0 = executioncount0;
+ }
+
+ public float getRawgyrorate0() {
+ return rawgyrorate0;
+ }
+
+ public void setRawgyrorate0(float rawgyrorate0) {
+ this.rawgyrorate0 = rawgyrorate0;
+ }
+
+ public float getRawgyrorate1() {
+ return rawgyrorate1;
+ }
+
+ public void setRawgyrorate1(float rawgyrorate1) {
+ this.rawgyrorate1 = rawgyrorate1;
+ }
+
+ public float getRawgyrorate2() {
+ return rawgyrorate2;
+ }
+
+ public void setRawgyrorate2(float rawgyrorate2) {
+ this.rawgyrorate2 = rawgyrorate2;
+ }
+
+ public float getFss1alphaangle0() {
+ return fss1alphaangle0;
+ }
+
+ public void setFss1alphaangle0(float fss1alphaangle0) {
+ this.fss1alphaangle0 = fss1alphaangle0;
+ }
+
+ public float getFss1betaangle0() {
+ return fss1betaangle0;
+ }
+
+ public void setFss1betaangle0(float fss1betaangle0) {
+ this.fss1betaangle0 = fss1betaangle0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/AdcsArray.java b/src/main/java/ru/r2cloud/jradio/eirsat/AdcsArray.java
new file mode 100644
index 00000000..86ac544d
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/AdcsArray.java
@@ -0,0 +1,57 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class AdcsArray {
+
+ private float temperature1Plusx;
+ private float temperature4Minusx;
+ private float temperature3Plusy;
+ private float temperature2Minusy;
+
+ public AdcsArray() {
+ // do nothing
+ }
+
+ public AdcsArray(BitInputStream dis) throws IOException {
+ temperature1Plusx = dis.readUnsignedShort() * 0.007629f - 272.15f;
+ temperature4Minusx = dis.readUnsignedShort() * 0.007629f - 272.15f;
+ temperature3Plusy = dis.readUnsignedShort() * 0.007629f - 272.15f;
+ temperature2Minusy = dis.readUnsignedShort() * 0.007629f - 272.15f;
+ }
+
+ public float getTemperature1Plusx() {
+ return temperature1Plusx;
+ }
+
+ public void setTemperature1Plusx(float temperature1Plusx) {
+ this.temperature1Plusx = temperature1Plusx;
+ }
+
+ public float getTemperature4Minusx() {
+ return temperature4Minusx;
+ }
+
+ public void setTemperature4Minusx(float temperature4Minusx) {
+ this.temperature4Minusx = temperature4Minusx;
+ }
+
+ public float getTemperature3Plusy() {
+ return temperature3Plusy;
+ }
+
+ public void setTemperature3Plusy(float temperature3Plusy) {
+ this.temperature3Plusy = temperature3Plusy;
+ }
+
+ public float getTemperature2Minusy() {
+ return temperature2Minusy;
+ }
+
+ public void setTemperature2Minusy(float temperature2Minusy) {
+ this.temperature2Minusy = temperature2Minusy;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/AdcsMode.java b/src/main/java/ru/r2cloud/jradio/eirsat/AdcsMode.java
new file mode 100644
index 00000000..d8609666
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/AdcsMode.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum AdcsMode {
+
+ STANDBY(0), DETUMBLE(1), STABILISED(2), TEST(85), UNKNOWN(255);
+
+ private final int code;
+
+ private AdcsMode(int code) {
+ this.code = code;
+ }
+
+ public static AdcsMode valueOfCode(int code) {
+ for (AdcsMode cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Bat.java b/src/main/java/ru/r2cloud/jradio/eirsat/Bat.java
new file mode 100644
index 00000000..af590bcb
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Bat.java
@@ -0,0 +1,107 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Bat {
+
+ private float batterycurrent2;
+ private float batteryvoltage2;
+ private float batterytemperature0;
+ private float batterytemperature1;
+ private float batterytemperature2;
+ private boolean batterycurrentdir0;
+ private boolean packedheaterstatus0;
+ private boolean packedheaterstatus1;
+ private boolean packedheaterstatus2;
+
+ public Bat() {
+ // do nothing
+ }
+
+ public Bat(BitInputStream dis) throws IOException {
+ batterycurrent2 = dis.readUnsignedInt(10) * 14.662757f;
+ batteryvoltage2 = dis.readUnsignedInt(10) * 0.008993f;
+ batterytemperature0 = dis.readUnsignedInt(10) * 0.3976f - 238.57f;
+ batterytemperature1 = dis.readUnsignedInt(10) * 0.3976f - 238.57f;
+ batterytemperature2 = dis.readUnsignedInt(10) * 0.3976f - 238.57f;
+ batterycurrentdir0 = dis.readBoolean();
+ packedheaterstatus0 = dis.readBoolean();
+ packedheaterstatus1 = dis.readBoolean();
+ packedheaterstatus2 = dis.readBoolean();
+ }
+
+ public float getBatterycurrent2() {
+ return batterycurrent2;
+ }
+
+ public void setBatterycurrent2(float batterycurrent2) {
+ this.batterycurrent2 = batterycurrent2;
+ }
+
+ public float getBatteryvoltage2() {
+ return batteryvoltage2;
+ }
+
+ public void setBatteryvoltage2(float batteryvoltage2) {
+ this.batteryvoltage2 = batteryvoltage2;
+ }
+
+ public float getBatterytemperature0() {
+ return batterytemperature0;
+ }
+
+ public void setBatterytemperature0(float batterytemperature0) {
+ this.batterytemperature0 = batterytemperature0;
+ }
+
+ public float getBatterytemperature1() {
+ return batterytemperature1;
+ }
+
+ public void setBatterytemperature1(float batterytemperature1) {
+ this.batterytemperature1 = batterytemperature1;
+ }
+
+ public float getBatterytemperature2() {
+ return batterytemperature2;
+ }
+
+ public void setBatterytemperature2(float batterytemperature2) {
+ this.batterytemperature2 = batterytemperature2;
+ }
+
+ public boolean isBatterycurrentdir0() {
+ return batterycurrentdir0;
+ }
+
+ public void setBatterycurrentdir0(boolean batterycurrentdir0) {
+ this.batterycurrentdir0 = batterycurrentdir0;
+ }
+
+ public boolean isPackedheaterstatus0() {
+ return packedheaterstatus0;
+ }
+
+ public void setPackedheaterstatus0(boolean packedheaterstatus0) {
+ this.packedheaterstatus0 = packedheaterstatus0;
+ }
+
+ public boolean isPackedheaterstatus1() {
+ return packedheaterstatus1;
+ }
+
+ public void setPackedheaterstatus1(boolean packedheaterstatus1) {
+ this.packedheaterstatus1 = packedheaterstatus1;
+ }
+
+ public boolean isPackedheaterstatus2() {
+ return packedheaterstatus2;
+ }
+
+ public void setPackedheaterstatus2(boolean packedheaterstatus2) {
+ this.packedheaterstatus2 = packedheaterstatus2;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/BootImage.java b/src/main/java/ru/r2cloud/jradio/eirsat/BootImage.java
new file mode 100644
index 00000000..50995cad
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/BootImage.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum BootImage {
+
+ FAILSAFE(0), PRIMARY1(1), PRIMARY2(2), UNKNOWN(255);
+
+ private final int code;
+
+ private BootImage(int code) {
+ this.code = code;
+ }
+
+ public static BootImage valueOfCode(int code) {
+ for (BootImage cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Cmc.java b/src/main/java/ru/r2cloud/jradio/eirsat/Cmc.java
new file mode 100644
index 00000000..fd866164
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Cmc.java
@@ -0,0 +1,157 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Cmc {
+
+ private int mode0;
+ private boolean beaconenable0;
+ private boolean txtransparent0;
+ private boolean txconvenabled0;
+ private float txpower0;
+ private boolean rxlock0;
+ private int rxrssi0;
+ private float rxfrequencyoffset0;
+ private int rxpacketcount0;
+ private byte temperaturepa0;
+ private float current5v0;
+ private float voltage5v0;
+ private int rxcrcerrorcount0;
+
+ public Cmc() {
+ // do nothing
+ }
+
+ public Cmc(BitInputStream dis) throws IOException {
+ mode0 = dis.readUnsignedInt(2);
+ beaconenable0 = dis.readBoolean();
+ txtransparent0 = dis.readBoolean();
+ txconvenabled0 = dis.readBoolean();
+ switch (dis.readUnsignedInt(2)) {
+ case 0:
+ txpower0 = 0.5f;
+ break;
+ case 1:
+ txpower0 = 1.0f;
+ break;
+ case 2:
+ txpower0 = 2.0f;
+ break;
+ }
+ rxlock0 = dis.readBoolean();
+ rxrssi0 = dis.readUnsignedInt(12);
+ rxfrequencyoffset0 = dis.readUnsignedInt(10) * 0.0125f + 140;
+ rxpacketcount0 = dis.readUnsignedShort();
+ temperaturepa0 = dis.readByte();
+ current5v0 = dis.readShort() * 0.000062f;
+ voltage5v0 = dis.readUnsignedInt(13) * 0.004f;
+ rxcrcerrorcount0 = dis.readUnsignedShort();
+ }
+
+ public int getMode0() {
+ return mode0;
+ }
+
+ public void setMode0(int mode0) {
+ this.mode0 = mode0;
+ }
+
+ public boolean isBeaconenable0() {
+ return beaconenable0;
+ }
+
+ public void setBeaconenable0(boolean beaconenable0) {
+ this.beaconenable0 = beaconenable0;
+ }
+
+ public boolean isTxtransparent0() {
+ return txtransparent0;
+ }
+
+ public void setTxtransparent0(boolean txtransparent0) {
+ this.txtransparent0 = txtransparent0;
+ }
+
+ public boolean isTxconvenabled0() {
+ return txconvenabled0;
+ }
+
+ public void setTxconvenabled0(boolean txconvenabled0) {
+ this.txconvenabled0 = txconvenabled0;
+ }
+
+ public float getTxpower0() {
+ return txpower0;
+ }
+
+ public void setTxpower0(float txpower0) {
+ this.txpower0 = txpower0;
+ }
+
+ public boolean isRxlock0() {
+ return rxlock0;
+ }
+
+ public void setRxlock0(boolean rxlock0) {
+ this.rxlock0 = rxlock0;
+ }
+
+ public int getRxrssi0() {
+ return rxrssi0;
+ }
+
+ public void setRxrssi0(int rxrssi0) {
+ this.rxrssi0 = rxrssi0;
+ }
+
+ public float getRxfrequencyoffset0() {
+ return rxfrequencyoffset0;
+ }
+
+ public void setRxfrequencyoffset0(float rxfrequencyoffset0) {
+ this.rxfrequencyoffset0 = rxfrequencyoffset0;
+ }
+
+ public int getRxpacketcount0() {
+ return rxpacketcount0;
+ }
+
+ public void setRxpacketcount0(int rxpacketcount0) {
+ this.rxpacketcount0 = rxpacketcount0;
+ }
+
+ public byte getTemperaturepa0() {
+ return temperaturepa0;
+ }
+
+ public void setTemperaturepa0(byte temperaturepa0) {
+ this.temperaturepa0 = temperaturepa0;
+ }
+
+ public float getCurrent5v0() {
+ return current5v0;
+ }
+
+ public void setCurrent5v0(float current5v0) {
+ this.current5v0 = current5v0;
+ }
+
+ public float getVoltage5v0() {
+ return voltage5v0;
+ }
+
+ public void setVoltage5v0(float voltage5v0) {
+ this.voltage5v0 = voltage5v0;
+ }
+
+ public int getRxcrcerrorcount0() {
+ return rxcrcerrorcount0;
+ }
+
+ public void setRxcrcerrorcount0(int rxcrcerrorcount0) {
+ this.rxcrcerrorcount0 = rxcrcerrorcount0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/CoreEvent.java b/src/main/java/ru/r2cloud/jradio/eirsat/CoreEvent.java
new file mode 100644
index 00000000..3610d888
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/CoreEvent.java
@@ -0,0 +1,67 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class CoreEvent {
+
+ private long eventcount0;
+ private int lastevent0Severity;
+ private int lastevent0EventId;
+ private int lastevent0EventSourceId;
+ private long lastevent0Info;
+
+ public CoreEvent() {
+ // do nothing
+ }
+
+ public CoreEvent(BitInputStream dis) throws IOException {
+ eventcount0 = dis.readUnsignedLong(32);
+ lastevent0Severity = dis.readUnsignedInt(2);
+ lastevent0EventId = dis.readUnsignedInt(14);
+ lastevent0EventSourceId = dis.readUnsignedShort();
+ lastevent0Info = dis.readUnsignedLong(32);
+ }
+
+ public long getEventcount0() {
+ return eventcount0;
+ }
+
+ public void setEventcount0(long eventcount0) {
+ this.eventcount0 = eventcount0;
+ }
+
+ public int getLastevent0Severity() {
+ return lastevent0Severity;
+ }
+
+ public void setLastevent0Severity(int lastevent0Severity) {
+ this.lastevent0Severity = lastevent0Severity;
+ }
+
+ public int getLastevent0EventId() {
+ return lastevent0EventId;
+ }
+
+ public void setLastevent0EventId(int lastevent0EventId) {
+ this.lastevent0EventId = lastevent0EventId;
+ }
+
+ public int getLastevent0EventSourceId() {
+ return lastevent0EventSourceId;
+ }
+
+ public void setLastevent0EventSourceId(int lastevent0EventSourceId) {
+ this.lastevent0EventSourceId = lastevent0EventSourceId;
+ }
+
+ public long getLastevent0Info() {
+ return lastevent0Info;
+ }
+
+ public void setLastevent0Info(long lastevent0Info) {
+ this.lastevent0Info = lastevent0Info;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Datapool.java b/src/main/java/ru/r2cloud/jradio/eirsat/Datapool.java
new file mode 100644
index 00000000..fd62518c
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Datapool.java
@@ -0,0 +1,557 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Datapool {
+
+ private boolean paramvalid170;
+ private boolean paramvalid43;
+ private boolean paramvalid44;
+ private boolean paramvalid46;
+ private boolean paramvalid42;
+ private boolean paramvalid56;
+ private boolean paramvalid73;
+ private boolean paramvalid74;
+ private boolean paramvalid77;
+ private boolean paramvalid85;
+ private boolean paramvalid86;
+ private boolean paramvalid129;
+ private boolean paramvalid80;
+ private boolean paramvalid84;
+ private boolean paramvalid130;
+ private boolean paramvalid131;
+ private boolean paramvalid89;
+ private boolean paramvalid95;
+ private boolean paramvalid96;
+ private boolean paramvalid2;
+ private boolean paramvalid3;
+ private boolean paramvalid7;
+ private boolean paramvalid8;
+ private boolean paramvalid11;
+ private boolean paramvalid20;
+ private boolean paramvalid22;
+ private boolean paramvalid19;
+ private boolean paramvalid26;
+ private boolean paramvalid32;
+ private boolean paramvalid36;
+ private boolean paramvalid34;
+ private boolean paramvalid28;
+ private boolean paramvalid142;
+ private boolean paramvalid141;
+ private boolean paramvalid143;
+ private boolean paramvalid139;
+ private boolean paramvalid140;
+ private boolean paramvalid149;
+ private boolean paramvalid148;
+ private boolean paramvalid150;
+ private boolean paramvalid151;
+ private boolean paramvalid144;
+ private boolean paramvalid152;
+ private boolean paramvalid153;
+ private boolean paramvalid145;
+ private boolean paramvalid154;
+ private boolean paramvalid155;
+ private boolean paramvalid156;
+ private boolean paramvalid157;
+ private boolean paramvalid158;
+ private boolean paramvalid146;
+ private boolean paramvalid147;
+ private boolean paramvalid168;
+ private boolean paramvalid169;
+
+ public Datapool() {
+ // do nothing
+ }
+
+ public Datapool(BitInputStream dis) throws IOException {
+ paramvalid170 = dis.readBoolean();
+ paramvalid43 = dis.readBoolean();
+ paramvalid44 = dis.readBoolean();
+ paramvalid46 = dis.readBoolean();
+ paramvalid42 = dis.readBoolean();
+ paramvalid56 = dis.readBoolean();
+ paramvalid73 = dis.readBoolean();
+ paramvalid74 = dis.readBoolean();
+ paramvalid77 = dis.readBoolean();
+ paramvalid85 = dis.readBoolean();
+ paramvalid86 = dis.readBoolean();
+ paramvalid129 = dis.readBoolean();
+ paramvalid80 = dis.readBoolean();
+ paramvalid84 = dis.readBoolean();
+ paramvalid130 = dis.readBoolean();
+ paramvalid131 = dis.readBoolean();
+ paramvalid89 = dis.readBoolean();
+ paramvalid95 = dis.readBoolean();
+ paramvalid96 = dis.readBoolean();
+ paramvalid2 = dis.readBoolean();
+ paramvalid3 = dis.readBoolean();
+ paramvalid7 = dis.readBoolean();
+ paramvalid8 = dis.readBoolean();
+ paramvalid11 = dis.readBoolean();
+ paramvalid20 = dis.readBoolean();
+ paramvalid22 = dis.readBoolean();
+ paramvalid19 = dis.readBoolean();
+ paramvalid26 = dis.readBoolean();
+ paramvalid32 = dis.readBoolean();
+ paramvalid36 = dis.readBoolean();
+ paramvalid34 = dis.readBoolean();
+ paramvalid28 = dis.readBoolean();
+ paramvalid142 = dis.readBoolean();
+ paramvalid141 = dis.readBoolean();
+ paramvalid143 = dis.readBoolean();
+ paramvalid139 = dis.readBoolean();
+ paramvalid140 = dis.readBoolean();
+ paramvalid149 = dis.readBoolean();
+ paramvalid148 = dis.readBoolean();
+ paramvalid150 = dis.readBoolean();
+ paramvalid151 = dis.readBoolean();
+ paramvalid144 = dis.readBoolean();
+ paramvalid152 = dis.readBoolean();
+ paramvalid153 = dis.readBoolean();
+ paramvalid145 = dis.readBoolean();
+ paramvalid154 = dis.readBoolean();
+ paramvalid155 = dis.readBoolean();
+ paramvalid156 = dis.readBoolean();
+ paramvalid157 = dis.readBoolean();
+ paramvalid158 = dis.readBoolean();
+ paramvalid146 = dis.readBoolean();
+ paramvalid147 = dis.readBoolean();
+ paramvalid168 = dis.readBoolean();
+ paramvalid169 = dis.readBoolean();
+ }
+
+ public boolean isParamvalid170() {
+ return paramvalid170;
+ }
+
+ public void setParamvalid170(boolean paramvalid170) {
+ this.paramvalid170 = paramvalid170;
+ }
+
+ public boolean isParamvalid43() {
+ return paramvalid43;
+ }
+
+ public void setParamvalid43(boolean paramvalid43) {
+ this.paramvalid43 = paramvalid43;
+ }
+
+ public boolean isParamvalid44() {
+ return paramvalid44;
+ }
+
+ public void setParamvalid44(boolean paramvalid44) {
+ this.paramvalid44 = paramvalid44;
+ }
+
+ public boolean isParamvalid46() {
+ return paramvalid46;
+ }
+
+ public void setParamvalid46(boolean paramvalid46) {
+ this.paramvalid46 = paramvalid46;
+ }
+
+ public boolean isParamvalid42() {
+ return paramvalid42;
+ }
+
+ public void setParamvalid42(boolean paramvalid42) {
+ this.paramvalid42 = paramvalid42;
+ }
+
+ public boolean isParamvalid56() {
+ return paramvalid56;
+ }
+
+ public void setParamvalid56(boolean paramvalid56) {
+ this.paramvalid56 = paramvalid56;
+ }
+
+ public boolean isParamvalid73() {
+ return paramvalid73;
+ }
+
+ public void setParamvalid73(boolean paramvalid73) {
+ this.paramvalid73 = paramvalid73;
+ }
+
+ public boolean isParamvalid74() {
+ return paramvalid74;
+ }
+
+ public void setParamvalid74(boolean paramvalid74) {
+ this.paramvalid74 = paramvalid74;
+ }
+
+ public boolean isParamvalid77() {
+ return paramvalid77;
+ }
+
+ public void setParamvalid77(boolean paramvalid77) {
+ this.paramvalid77 = paramvalid77;
+ }
+
+ public boolean isParamvalid85() {
+ return paramvalid85;
+ }
+
+ public void setParamvalid85(boolean paramvalid85) {
+ this.paramvalid85 = paramvalid85;
+ }
+
+ public boolean isParamvalid86() {
+ return paramvalid86;
+ }
+
+ public void setParamvalid86(boolean paramvalid86) {
+ this.paramvalid86 = paramvalid86;
+ }
+
+ public boolean isParamvalid129() {
+ return paramvalid129;
+ }
+
+ public void setParamvalid129(boolean paramvalid129) {
+ this.paramvalid129 = paramvalid129;
+ }
+
+ public boolean isParamvalid80() {
+ return paramvalid80;
+ }
+
+ public void setParamvalid80(boolean paramvalid80) {
+ this.paramvalid80 = paramvalid80;
+ }
+
+ public boolean isParamvalid84() {
+ return paramvalid84;
+ }
+
+ public void setParamvalid84(boolean paramvalid84) {
+ this.paramvalid84 = paramvalid84;
+ }
+
+ public boolean isParamvalid130() {
+ return paramvalid130;
+ }
+
+ public void setParamvalid130(boolean paramvalid130) {
+ this.paramvalid130 = paramvalid130;
+ }
+
+ public boolean isParamvalid131() {
+ return paramvalid131;
+ }
+
+ public void setParamvalid131(boolean paramvalid131) {
+ this.paramvalid131 = paramvalid131;
+ }
+
+ public boolean isParamvalid89() {
+ return paramvalid89;
+ }
+
+ public void setParamvalid89(boolean paramvalid89) {
+ this.paramvalid89 = paramvalid89;
+ }
+
+ public boolean isParamvalid95() {
+ return paramvalid95;
+ }
+
+ public void setParamvalid95(boolean paramvalid95) {
+ this.paramvalid95 = paramvalid95;
+ }
+
+ public boolean isParamvalid96() {
+ return paramvalid96;
+ }
+
+ public void setParamvalid96(boolean paramvalid96) {
+ this.paramvalid96 = paramvalid96;
+ }
+
+ public boolean isParamvalid2() {
+ return paramvalid2;
+ }
+
+ public void setParamvalid2(boolean paramvalid2) {
+ this.paramvalid2 = paramvalid2;
+ }
+
+ public boolean isParamvalid3() {
+ return paramvalid3;
+ }
+
+ public void setParamvalid3(boolean paramvalid3) {
+ this.paramvalid3 = paramvalid3;
+ }
+
+ public boolean isParamvalid7() {
+ return paramvalid7;
+ }
+
+ public void setParamvalid7(boolean paramvalid7) {
+ this.paramvalid7 = paramvalid7;
+ }
+
+ public boolean isParamvalid8() {
+ return paramvalid8;
+ }
+
+ public void setParamvalid8(boolean paramvalid8) {
+ this.paramvalid8 = paramvalid8;
+ }
+
+ public boolean isParamvalid11() {
+ return paramvalid11;
+ }
+
+ public void setParamvalid11(boolean paramvalid11) {
+ this.paramvalid11 = paramvalid11;
+ }
+
+ public boolean isParamvalid20() {
+ return paramvalid20;
+ }
+
+ public void setParamvalid20(boolean paramvalid20) {
+ this.paramvalid20 = paramvalid20;
+ }
+
+ public boolean isParamvalid22() {
+ return paramvalid22;
+ }
+
+ public void setParamvalid22(boolean paramvalid22) {
+ this.paramvalid22 = paramvalid22;
+ }
+
+ public boolean isParamvalid19() {
+ return paramvalid19;
+ }
+
+ public void setParamvalid19(boolean paramvalid19) {
+ this.paramvalid19 = paramvalid19;
+ }
+
+ public boolean isParamvalid26() {
+ return paramvalid26;
+ }
+
+ public void setParamvalid26(boolean paramvalid26) {
+ this.paramvalid26 = paramvalid26;
+ }
+
+ public boolean isParamvalid32() {
+ return paramvalid32;
+ }
+
+ public void setParamvalid32(boolean paramvalid32) {
+ this.paramvalid32 = paramvalid32;
+ }
+
+ public boolean isParamvalid36() {
+ return paramvalid36;
+ }
+
+ public void setParamvalid36(boolean paramvalid36) {
+ this.paramvalid36 = paramvalid36;
+ }
+
+ public boolean isParamvalid34() {
+ return paramvalid34;
+ }
+
+ public void setParamvalid34(boolean paramvalid34) {
+ this.paramvalid34 = paramvalid34;
+ }
+
+ public boolean isParamvalid28() {
+ return paramvalid28;
+ }
+
+ public void setParamvalid28(boolean paramvalid28) {
+ this.paramvalid28 = paramvalid28;
+ }
+
+ public boolean isParamvalid142() {
+ return paramvalid142;
+ }
+
+ public void setParamvalid142(boolean paramvalid142) {
+ this.paramvalid142 = paramvalid142;
+ }
+
+ public boolean isParamvalid141() {
+ return paramvalid141;
+ }
+
+ public void setParamvalid141(boolean paramvalid141) {
+ this.paramvalid141 = paramvalid141;
+ }
+
+ public boolean isParamvalid143() {
+ return paramvalid143;
+ }
+
+ public void setParamvalid143(boolean paramvalid143) {
+ this.paramvalid143 = paramvalid143;
+ }
+
+ public boolean isParamvalid139() {
+ return paramvalid139;
+ }
+
+ public void setParamvalid139(boolean paramvalid139) {
+ this.paramvalid139 = paramvalid139;
+ }
+
+ public boolean isParamvalid140() {
+ return paramvalid140;
+ }
+
+ public void setParamvalid140(boolean paramvalid140) {
+ this.paramvalid140 = paramvalid140;
+ }
+
+ public boolean isParamvalid149() {
+ return paramvalid149;
+ }
+
+ public void setParamvalid149(boolean paramvalid149) {
+ this.paramvalid149 = paramvalid149;
+ }
+
+ public boolean isParamvalid148() {
+ return paramvalid148;
+ }
+
+ public void setParamvalid148(boolean paramvalid148) {
+ this.paramvalid148 = paramvalid148;
+ }
+
+ public boolean isParamvalid150() {
+ return paramvalid150;
+ }
+
+ public void setParamvalid150(boolean paramvalid150) {
+ this.paramvalid150 = paramvalid150;
+ }
+
+ public boolean isParamvalid151() {
+ return paramvalid151;
+ }
+
+ public void setParamvalid151(boolean paramvalid151) {
+ this.paramvalid151 = paramvalid151;
+ }
+
+ public boolean isParamvalid144() {
+ return paramvalid144;
+ }
+
+ public void setParamvalid144(boolean paramvalid144) {
+ this.paramvalid144 = paramvalid144;
+ }
+
+ public boolean isParamvalid152() {
+ return paramvalid152;
+ }
+
+ public void setParamvalid152(boolean paramvalid152) {
+ this.paramvalid152 = paramvalid152;
+ }
+
+ public boolean isParamvalid153() {
+ return paramvalid153;
+ }
+
+ public void setParamvalid153(boolean paramvalid153) {
+ this.paramvalid153 = paramvalid153;
+ }
+
+ public boolean isParamvalid145() {
+ return paramvalid145;
+ }
+
+ public void setParamvalid145(boolean paramvalid145) {
+ this.paramvalid145 = paramvalid145;
+ }
+
+ public boolean isParamvalid154() {
+ return paramvalid154;
+ }
+
+ public void setParamvalid154(boolean paramvalid154) {
+ this.paramvalid154 = paramvalid154;
+ }
+
+ public boolean isParamvalid155() {
+ return paramvalid155;
+ }
+
+ public void setParamvalid155(boolean paramvalid155) {
+ this.paramvalid155 = paramvalid155;
+ }
+
+ public boolean isParamvalid156() {
+ return paramvalid156;
+ }
+
+ public void setParamvalid156(boolean paramvalid156) {
+ this.paramvalid156 = paramvalid156;
+ }
+
+ public boolean isParamvalid157() {
+ return paramvalid157;
+ }
+
+ public void setParamvalid157(boolean paramvalid157) {
+ this.paramvalid157 = paramvalid157;
+ }
+
+ public boolean isParamvalid158() {
+ return paramvalid158;
+ }
+
+ public void setParamvalid158(boolean paramvalid158) {
+ this.paramvalid158 = paramvalid158;
+ }
+
+ public boolean isParamvalid146() {
+ return paramvalid146;
+ }
+
+ public void setParamvalid146(boolean paramvalid146) {
+ this.paramvalid146 = paramvalid146;
+ }
+
+ public boolean isParamvalid147() {
+ return paramvalid147;
+ }
+
+ public void setParamvalid147(boolean paramvalid147) {
+ this.paramvalid147 = paramvalid147;
+ }
+
+ public boolean isParamvalid168() {
+ return paramvalid168;
+ }
+
+ public void setParamvalid168(boolean paramvalid168) {
+ this.paramvalid168 = paramvalid168;
+ }
+
+ public boolean isParamvalid169() {
+ return paramvalid169;
+ }
+
+ public void setParamvalid169(boolean paramvalid169) {
+ this.paramvalid169 = paramvalid169;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/EirsatBeacon.java b/src/main/java/ru/r2cloud/jradio/eirsat/EirsatBeacon.java
new file mode 100644
index 00000000..7823fd22
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/EirsatBeacon.java
@@ -0,0 +1,47 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import ru.r2cloud.jradio.ccsds.TransferFrame;
+import ru.r2cloud.jradio.fec.ccsds.UncorrectableException;
+
+public class EirsatBeacon extends TransferFrame {
+
+ private List packets = new ArrayList<>();
+
+ @Override
+ public void readBeacon(DataInputStream dis) throws IOException, UncorrectableException {
+ if (getHeader().getFieldStatus().getFirstHeaderPointer() != 0) {
+ byte[] payload = new byte[getHeader().getFieldStatus().getFirstHeaderPointer()];
+ dis.readFully(payload);
+ Packet partial = new Packet();
+ partial.setPayload(payload);
+ packets.add(partial);
+ }
+ while (!Thread.currentThread().isInterrupted()) {
+ try {
+ packets.add(new Packet(dis));
+ } catch (UncorrectableException e) {
+ // at least one packet was recovered
+ if (packets.size() > 0) {
+ break;
+ }
+ throw e;
+ } catch (EOFException e) {
+ break;
+ }
+ }
+ }
+
+ public List getPackets() {
+ return packets;
+ }
+
+ public void setPackets(List packets) {
+ this.packets = packets;
+ }
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Emod.java b/src/main/java/ru/r2cloud/jradio/eirsat/Emod.java
new file mode 100644
index 00000000..60bf39ad
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Emod.java
@@ -0,0 +1,67 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Emod {
+
+ private int dpResetcounter0;
+ private EmodMode dpEmodmode0;
+ private int dpLastpageaddr0;
+ private boolean autopollpages0;
+ private int nextpageaddrtopoll0;
+
+ public Emod() {
+ // do nothing
+ }
+
+ public Emod(BitInputStream dis) throws IOException {
+ dpResetcounter0 = dis.readUnsignedByte();
+ dpEmodmode0 = EmodMode.valueOfCode(dis.readUnsignedInt(2));
+ dpLastpageaddr0 = dis.readUnsignedInt(24);
+ autopollpages0 = dis.readBoolean();
+ nextpageaddrtopoll0 = dis.readUnsignedShort();
+ }
+
+ public int getDpResetcounter0() {
+ return dpResetcounter0;
+ }
+
+ public void setDpResetcounter0(int dpResetcounter0) {
+ this.dpResetcounter0 = dpResetcounter0;
+ }
+
+ public EmodMode getDpEmodmode0() {
+ return dpEmodmode0;
+ }
+
+ public void setDpEmodmode0(EmodMode dpEmodmode0) {
+ this.dpEmodmode0 = dpEmodmode0;
+ }
+
+ public int getDpLastpageaddr0() {
+ return dpLastpageaddr0;
+ }
+
+ public void setDpLastpageaddr0(int dpLastpageaddr0) {
+ this.dpLastpageaddr0 = dpLastpageaddr0;
+ }
+
+ public boolean isAutopollpages0() {
+ return autopollpages0;
+ }
+
+ public void setAutopollpages0(boolean autopollpages0) {
+ this.autopollpages0 = autopollpages0;
+ }
+
+ public int getNextpageaddrtopoll0() {
+ return nextpageaddrtopoll0;
+ }
+
+ public void setNextpageaddrtopoll0(int nextpageaddrtopoll0) {
+ this.nextpageaddrtopoll0 = nextpageaddrtopoll0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/EmodMode.java b/src/main/java/ru/r2cloud/jradio/eirsat/EmodMode.java
new file mode 100644
index 00000000..5bb0730c
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/EmodMode.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum EmodMode {
+
+ IDLE(1), EXPERIMENT(2), OFF(3), UNKNOWN(255);
+
+ private final int code;
+
+ private EmodMode(int code) {
+ this.code = code;
+ }
+
+ public static EmodMode valueOfCode(int code) {
+ for (EmodMode cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Eps.java b/src/main/java/ru/r2cloud/jradio/eirsat/Eps.java
new file mode 100644
index 00000000..ca05312a
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Eps.java
@@ -0,0 +1,307 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Eps {
+
+ private boolean actualswitchstatesbitmap09;
+ private boolean actualswitchstatesbitmap08;
+ private boolean actualswitchstatesbitmap07;
+ private boolean actualswitchstatesbitmap06;
+ private boolean actualswitchstatesbitmap05;
+ private boolean actualswitchstatesbitmap04;
+ private boolean actualswitchstatesbitmap03;
+ private boolean actualswitchstatesbitmap02;
+ private boolean actualswitchstatesbitmap01;
+ private boolean actualswitchstatesbitmap00;
+ private boolean switchovercurrentbitmap09;
+ private boolean switchovercurrentbitmap08;
+ private boolean switchovercurrentbitmap07;
+ private boolean switchovercurrentbitmap06;
+ private boolean switchovercurrentbitmap05;
+ private boolean switchovercurrentbitmap04;
+ private boolean switchovercurrentbitmap03;
+ private boolean switchovercurrentbitmap02;
+ private boolean switchovercurrentbitmap01;
+ private boolean switchovercurrentbitmap00;
+ private float boardTemperature0;
+ private float busVoltages0Battery;
+ private float busVoltages13v3;
+ private float busVoltages25v;
+ private float busVoltages312v;
+ private float busCurrents0Battery;
+ private float busCurrents13v3;
+ private float busCurrents25v;
+ private float busCurrents312v;
+
+ public Eps() {
+ // do nothing
+ }
+
+ public Eps(BitInputStream dis) throws IOException {
+ actualswitchstatesbitmap09 = dis.readBoolean();
+ actualswitchstatesbitmap08 = dis.readBoolean();
+ actualswitchstatesbitmap07 = dis.readBoolean();
+ actualswitchstatesbitmap06 = dis.readBoolean();
+ actualswitchstatesbitmap05 = dis.readBoolean();
+ actualswitchstatesbitmap04 = dis.readBoolean();
+ actualswitchstatesbitmap03 = dis.readBoolean();
+ actualswitchstatesbitmap02 = dis.readBoolean();
+ actualswitchstatesbitmap01 = dis.readBoolean();
+ actualswitchstatesbitmap00 = dis.readBoolean();
+ switchovercurrentbitmap09 = dis.readBoolean();
+ switchovercurrentbitmap08 = dis.readBoolean();
+ switchovercurrentbitmap07 = dis.readBoolean();
+ switchovercurrentbitmap06 = dis.readBoolean();
+ switchovercurrentbitmap05 = dis.readBoolean();
+ switchovercurrentbitmap04 = dis.readBoolean();
+ switchovercurrentbitmap03 = dis.readBoolean();
+ switchovercurrentbitmap02 = dis.readBoolean();
+ switchovercurrentbitmap01 = dis.readBoolean();
+ switchovercurrentbitmap00 = dis.readBoolean();
+ boardTemperature0 = dis.readUnsignedInt(10) * 0.372434f - 273.15f;
+ busVoltages0Battery = dis.readUnsignedInt(10) * 0.008978f;
+ busVoltages13v3 = dis.readUnsignedInt(10) * 0.004311f;
+ busVoltages25v = dis.readUnsignedInt(10) * 0.005865f;
+ busVoltages312v = dis.readUnsignedInt(10) * 0.01349f;
+ busCurrents0Battery = dis.readUnsignedInt(10) * 0.005237f;
+ busCurrents13v3 = dis.readUnsignedInt(10) * 0.005237f;
+ busCurrents25v = dis.readUnsignedInt(10) * 0.005237f;
+ busCurrents312v = dis.readUnsignedInt(10) * 0.00207f;
+ }
+
+ public boolean isActualswitchstatesbitmap09() {
+ return actualswitchstatesbitmap09;
+ }
+
+ public void setActualswitchstatesbitmap09(boolean actualswitchstatesbitmap09) {
+ this.actualswitchstatesbitmap09 = actualswitchstatesbitmap09;
+ }
+
+ public boolean isActualswitchstatesbitmap08() {
+ return actualswitchstatesbitmap08;
+ }
+
+ public void setActualswitchstatesbitmap08(boolean actualswitchstatesbitmap08) {
+ this.actualswitchstatesbitmap08 = actualswitchstatesbitmap08;
+ }
+
+ public boolean isActualswitchstatesbitmap07() {
+ return actualswitchstatesbitmap07;
+ }
+
+ public void setActualswitchstatesbitmap07(boolean actualswitchstatesbitmap07) {
+ this.actualswitchstatesbitmap07 = actualswitchstatesbitmap07;
+ }
+
+ public boolean isActualswitchstatesbitmap06() {
+ return actualswitchstatesbitmap06;
+ }
+
+ public void setActualswitchstatesbitmap06(boolean actualswitchstatesbitmap06) {
+ this.actualswitchstatesbitmap06 = actualswitchstatesbitmap06;
+ }
+
+ public boolean isActualswitchstatesbitmap05() {
+ return actualswitchstatesbitmap05;
+ }
+
+ public void setActualswitchstatesbitmap05(boolean actualswitchstatesbitmap05) {
+ this.actualswitchstatesbitmap05 = actualswitchstatesbitmap05;
+ }
+
+ public boolean isActualswitchstatesbitmap04() {
+ return actualswitchstatesbitmap04;
+ }
+
+ public void setActualswitchstatesbitmap04(boolean actualswitchstatesbitmap04) {
+ this.actualswitchstatesbitmap04 = actualswitchstatesbitmap04;
+ }
+
+ public boolean isActualswitchstatesbitmap03() {
+ return actualswitchstatesbitmap03;
+ }
+
+ public void setActualswitchstatesbitmap03(boolean actualswitchstatesbitmap03) {
+ this.actualswitchstatesbitmap03 = actualswitchstatesbitmap03;
+ }
+
+ public boolean isActualswitchstatesbitmap02() {
+ return actualswitchstatesbitmap02;
+ }
+
+ public void setActualswitchstatesbitmap02(boolean actualswitchstatesbitmap02) {
+ this.actualswitchstatesbitmap02 = actualswitchstatesbitmap02;
+ }
+
+ public boolean isActualswitchstatesbitmap01() {
+ return actualswitchstatesbitmap01;
+ }
+
+ public void setActualswitchstatesbitmap01(boolean actualswitchstatesbitmap01) {
+ this.actualswitchstatesbitmap01 = actualswitchstatesbitmap01;
+ }
+
+ public boolean isActualswitchstatesbitmap00() {
+ return actualswitchstatesbitmap00;
+ }
+
+ public void setActualswitchstatesbitmap00(boolean actualswitchstatesbitmap00) {
+ this.actualswitchstatesbitmap00 = actualswitchstatesbitmap00;
+ }
+
+ public boolean isSwitchovercurrentbitmap09() {
+ return switchovercurrentbitmap09;
+ }
+
+ public void setSwitchovercurrentbitmap09(boolean switchovercurrentbitmap09) {
+ this.switchovercurrentbitmap09 = switchovercurrentbitmap09;
+ }
+
+ public boolean isSwitchovercurrentbitmap08() {
+ return switchovercurrentbitmap08;
+ }
+
+ public void setSwitchovercurrentbitmap08(boolean switchovercurrentbitmap08) {
+ this.switchovercurrentbitmap08 = switchovercurrentbitmap08;
+ }
+
+ public boolean isSwitchovercurrentbitmap07() {
+ return switchovercurrentbitmap07;
+ }
+
+ public void setSwitchovercurrentbitmap07(boolean switchovercurrentbitmap07) {
+ this.switchovercurrentbitmap07 = switchovercurrentbitmap07;
+ }
+
+ public boolean isSwitchovercurrentbitmap06() {
+ return switchovercurrentbitmap06;
+ }
+
+ public void setSwitchovercurrentbitmap06(boolean switchovercurrentbitmap06) {
+ this.switchovercurrentbitmap06 = switchovercurrentbitmap06;
+ }
+
+ public boolean isSwitchovercurrentbitmap05() {
+ return switchovercurrentbitmap05;
+ }
+
+ public void setSwitchovercurrentbitmap05(boolean switchovercurrentbitmap05) {
+ this.switchovercurrentbitmap05 = switchovercurrentbitmap05;
+ }
+
+ public boolean isSwitchovercurrentbitmap04() {
+ return switchovercurrentbitmap04;
+ }
+
+ public void setSwitchovercurrentbitmap04(boolean switchovercurrentbitmap04) {
+ this.switchovercurrentbitmap04 = switchovercurrentbitmap04;
+ }
+
+ public boolean isSwitchovercurrentbitmap03() {
+ return switchovercurrentbitmap03;
+ }
+
+ public void setSwitchovercurrentbitmap03(boolean switchovercurrentbitmap03) {
+ this.switchovercurrentbitmap03 = switchovercurrentbitmap03;
+ }
+
+ public boolean isSwitchovercurrentbitmap02() {
+ return switchovercurrentbitmap02;
+ }
+
+ public void setSwitchovercurrentbitmap02(boolean switchovercurrentbitmap02) {
+ this.switchovercurrentbitmap02 = switchovercurrentbitmap02;
+ }
+
+ public boolean isSwitchovercurrentbitmap01() {
+ return switchovercurrentbitmap01;
+ }
+
+ public void setSwitchovercurrentbitmap01(boolean switchovercurrentbitmap01) {
+ this.switchovercurrentbitmap01 = switchovercurrentbitmap01;
+ }
+
+ public boolean isSwitchovercurrentbitmap00() {
+ return switchovercurrentbitmap00;
+ }
+
+ public void setSwitchovercurrentbitmap00(boolean switchovercurrentbitmap00) {
+ this.switchovercurrentbitmap00 = switchovercurrentbitmap00;
+ }
+
+ public float getBoardTemperature0() {
+ return boardTemperature0;
+ }
+
+ public void setBoardTemperature0(float boardTemperature0) {
+ this.boardTemperature0 = boardTemperature0;
+ }
+
+ public float getBusVoltages0Battery() {
+ return busVoltages0Battery;
+ }
+
+ public void setBusVoltages0Battery(float busVoltages0Battery) {
+ this.busVoltages0Battery = busVoltages0Battery;
+ }
+
+ public float getBusVoltages13v3() {
+ return busVoltages13v3;
+ }
+
+ public void setBusVoltages13v3(float busVoltages13v3) {
+ this.busVoltages13v3 = busVoltages13v3;
+ }
+
+ public float getBusVoltages25v() {
+ return busVoltages25v;
+ }
+
+ public void setBusVoltages25v(float busVoltages25v) {
+ this.busVoltages25v = busVoltages25v;
+ }
+
+ public float getBusVoltages312v() {
+ return busVoltages312v;
+ }
+
+ public void setBusVoltages312v(float busVoltages312v) {
+ this.busVoltages312v = busVoltages312v;
+ }
+
+ public float getBusCurrents0Battery() {
+ return busCurrents0Battery;
+ }
+
+ public void setBusCurrents0Battery(float busCurrents0Battery) {
+ this.busCurrents0Battery = busCurrents0Battery;
+ }
+
+ public float getBusCurrents13v3() {
+ return busCurrents13v3;
+ }
+
+ public void setBusCurrents13v3(float busCurrents13v3) {
+ this.busCurrents13v3 = busCurrents13v3;
+ }
+
+ public float getBusCurrents25v() {
+ return busCurrents25v;
+ }
+
+ public void setBusCurrents25v(float busCurrents25v) {
+ this.busCurrents25v = busCurrents25v;
+ }
+
+ public float getBusCurrents312v() {
+ return busCurrents312v;
+ }
+
+ public void setBusCurrents312v(float busCurrents312v) {
+ this.busCurrents312v = busCurrents312v;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/EpsSolar.java b/src/main/java/ru/r2cloud/jradio/eirsat/EpsSolar.java
new file mode 100644
index 00000000..daf08e1b
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/EpsSolar.java
@@ -0,0 +1,87 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class EpsSolar {
+
+ private float currents1Plusx;
+ private float currents4Minusx;
+ private float currents3Plusy;
+ private float currents2Minusy;
+ private float voltages0;
+ private float voltages1;
+ private float voltages2;
+
+ public EpsSolar() {
+ // do nothing
+ }
+
+ public EpsSolar(BitInputStream dis) throws IOException {
+ currents1Plusx = dis.readUnsignedInt(10) * 0.0009775f;
+ currents4Minusx = dis.readUnsignedInt(10) * 0.0009775f;
+ currents3Plusy = dis.readUnsignedInt(10) * 0.0009775f;
+ currents2Minusy = dis.readUnsignedInt(10) * 0.0009775f;
+ voltages0 = dis.readUnsignedInt(10) * 0.0322581f;
+ voltages1 = dis.readUnsignedInt(10) * 0.0322581f;
+ voltages2 = dis.readUnsignedInt(10) * 0.0322581f;
+ }
+
+ public float getCurrents1Plusx() {
+ return currents1Plusx;
+ }
+
+ public void setCurrents1Plusx(float currents1Plusx) {
+ this.currents1Plusx = currents1Plusx;
+ }
+
+ public float getCurrents4Minusx() {
+ return currents4Minusx;
+ }
+
+ public void setCurrents4Minusx(float currents4Minusx) {
+ this.currents4Minusx = currents4Minusx;
+ }
+
+ public float getCurrents3Plusy() {
+ return currents3Plusy;
+ }
+
+ public void setCurrents3Plusy(float currents3Plusy) {
+ this.currents3Plusy = currents3Plusy;
+ }
+
+ public float getCurrents2Minusy() {
+ return currents2Minusy;
+ }
+
+ public void setCurrents2Minusy(float currents2Minusy) {
+ this.currents2Minusy = currents2Minusy;
+ }
+
+ public float getVoltages0() {
+ return voltages0;
+ }
+
+ public void setVoltages0(float voltages0) {
+ this.voltages0 = voltages0;
+ }
+
+ public float getVoltages1() {
+ return voltages1;
+ }
+
+ public void setVoltages1(float voltages1) {
+ this.voltages1 = voltages1;
+ }
+
+ public float getVoltages2() {
+ return voltages2;
+ }
+
+ public void setVoltages2(float voltages2) {
+ this.voltages2 = voltages2;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Gmod.java b/src/main/java/ru/r2cloud/jradio/eirsat/Gmod.java
new file mode 100644
index 00000000..2888d3f9
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Gmod.java
@@ -0,0 +1,167 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Gmod {
+
+ private int dpResetcounter0;
+ private GmodMode dpGmodmode0;
+ private int dpLastpagesumaddr0;
+ private StreamStatus dpStreamsumchstatus0;
+ private int lastpagesumaddrrx0;
+ private int dpLastpage16addr0;
+ private StreamStatus dpStream16chstatus0;
+ private int lastpage16addrrx0;
+ private int dpBiasvoltage0;
+ private int dpBiasoffsetvalue0;
+ private StreamStatus dpBoostconverterenable0;
+ private int dpBiasoffsetvoltage0;
+ private StreamStatus dpBiasoffsetenable0;
+ private boolean grbtriggeringenabled0;
+ private int grbtriggercount0;
+
+ public Gmod() {
+ // do nothing
+ }
+
+ public Gmod(BitInputStream dis) throws IOException {
+ dpResetcounter0 = dis.readUnsignedByte();
+ dpGmodmode0 = GmodMode.valueOfCode(dis.readUnsignedInt(4));
+ dpLastpagesumaddr0 = dis.readUnsignedInt(24);
+ dpStreamsumchstatus0 = StreamStatus.valueOfCode(dis.readUnsignedInt(2));
+ lastpagesumaddrrx0 = dis.readUnsignedShort();
+ dpLastpage16addr0 = dis.readUnsignedInt(24);
+ dpStream16chstatus0 = StreamStatus.valueOfCode(dis.readUnsignedInt(2));
+ lastpage16addrrx0 = dis.readUnsignedShort();
+ dpBiasvoltage0 = dis.readUnsignedShort();
+ dpBiasoffsetvalue0 = dis.readUnsignedShort();
+ dpBoostconverterenable0 = StreamStatus.valueOfCode(dis.readUnsignedInt(2));
+ dpBiasoffsetvoltage0 = dis.readUnsignedShort();
+ dpBiasoffsetenable0 = StreamStatus.valueOfCode(dis.readUnsignedInt(2));
+ grbtriggeringenabled0 = dis.readBoolean();
+ grbtriggercount0 = dis.readUnsignedShort();
+ }
+
+ public int getDpResetcounter0() {
+ return dpResetcounter0;
+ }
+
+ public void setDpResetcounter0(int dpResetcounter0) {
+ this.dpResetcounter0 = dpResetcounter0;
+ }
+
+ public GmodMode getDpGmodmode0() {
+ return dpGmodmode0;
+ }
+
+ public void setDpGmodmode0(GmodMode dpGmodmode0) {
+ this.dpGmodmode0 = dpGmodmode0;
+ }
+
+ public int getDpLastpagesumaddr0() {
+ return dpLastpagesumaddr0;
+ }
+
+ public void setDpLastpagesumaddr0(int dpLastpagesumaddr0) {
+ this.dpLastpagesumaddr0 = dpLastpagesumaddr0;
+ }
+
+ public StreamStatus getDpStreamsumchstatus0() {
+ return dpStreamsumchstatus0;
+ }
+
+ public void setDpStreamsumchstatus0(StreamStatus dpStreamsumchstatus0) {
+ this.dpStreamsumchstatus0 = dpStreamsumchstatus0;
+ }
+
+ public int getLastpagesumaddrrx0() {
+ return lastpagesumaddrrx0;
+ }
+
+ public void setLastpagesumaddrrx0(int lastpagesumaddrrx0) {
+ this.lastpagesumaddrrx0 = lastpagesumaddrrx0;
+ }
+
+ public int getDpLastpage16addr0() {
+ return dpLastpage16addr0;
+ }
+
+ public void setDpLastpage16addr0(int dpLastpage16addr0) {
+ this.dpLastpage16addr0 = dpLastpage16addr0;
+ }
+
+ public StreamStatus getDpStream16chstatus0() {
+ return dpStream16chstatus0;
+ }
+
+ public void setDpStream16chstatus0(StreamStatus dpStream16chstatus0) {
+ this.dpStream16chstatus0 = dpStream16chstatus0;
+ }
+
+ public int getLastpage16addrrx0() {
+ return lastpage16addrrx0;
+ }
+
+ public void setLastpage16addrrx0(int lastpage16addrrx0) {
+ this.lastpage16addrrx0 = lastpage16addrrx0;
+ }
+
+ public int getDpBiasvoltage0() {
+ return dpBiasvoltage0;
+ }
+
+ public void setDpBiasvoltage0(int dpBiasvoltage0) {
+ this.dpBiasvoltage0 = dpBiasvoltage0;
+ }
+
+ public int getDpBiasoffsetvalue0() {
+ return dpBiasoffsetvalue0;
+ }
+
+ public void setDpBiasoffsetvalue0(int dpBiasoffsetvalue0) {
+ this.dpBiasoffsetvalue0 = dpBiasoffsetvalue0;
+ }
+
+ public StreamStatus getDpBoostconverterenable0() {
+ return dpBoostconverterenable0;
+ }
+
+ public void setDpBoostconverterenable0(StreamStatus dpBoostconverterenable0) {
+ this.dpBoostconverterenable0 = dpBoostconverterenable0;
+ }
+
+ public int getDpBiasoffsetvoltage0() {
+ return dpBiasoffsetvoltage0;
+ }
+
+ public void setDpBiasoffsetvoltage0(int dpBiasoffsetvoltage0) {
+ this.dpBiasoffsetvoltage0 = dpBiasoffsetvoltage0;
+ }
+
+ public StreamStatus getDpBiasoffsetenable0() {
+ return dpBiasoffsetenable0;
+ }
+
+ public void setDpBiasoffsetenable0(StreamStatus dpBiasoffsetenable0) {
+ this.dpBiasoffsetenable0 = dpBiasoffsetenable0;
+ }
+
+ public boolean isGrbtriggeringenabled0() {
+ return grbtriggeringenabled0;
+ }
+
+ public void setGrbtriggeringenabled0(boolean grbtriggeringenabled0) {
+ this.grbtriggeringenabled0 = grbtriggeringenabled0;
+ }
+
+ public int getGrbtriggercount0() {
+ return grbtriggercount0;
+ }
+
+ public void setGrbtriggercount0(int grbtriggercount0) {
+ this.grbtriggercount0 = grbtriggercount0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/GmodMode.java b/src/main/java/ru/r2cloud/jradio/eirsat/GmodMode.java
new file mode 100644
index 00000000..1cd4f74d
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/GmodMode.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum GmodMode {
+
+ IDLE(1), EXPERIMENT(2), CPLD_REPROGRAM(3), SAFE(4), EXPERIMENT_16(5), OFF(15), UNKNOWN(255);
+
+ private final int code;
+
+ private GmodMode(int code) {
+ this.code = code;
+ }
+
+ public static GmodMode valueOfCode(int code) {
+ for (GmodMode cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct00.java b/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct00.java
new file mode 100644
index 00000000..96f1a949
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct00.java
@@ -0,0 +1,143 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class HkStruct00 {
+
+ private String versionSatellitestring0;
+ private String versionMessagestring0;
+ private long coreObtTime0;
+ private long coreObtUptime0;
+ private Separationsequence separationSequence;
+ private Bat bat;
+ private Eps eps;
+ private AdcsArray adcsArray;
+ private EpsSolar epsSolar;
+ private Adcs adcs;
+ private Cmc cmc;
+ private CoreEvent coreEvent;
+
+ public HkStruct00() {
+ // do nothing
+ }
+
+ public HkStruct00(BitInputStream dis) throws IOException {
+ byte[] versionSatellitestring0Bytes = new byte[8];
+ dis.readFully(versionSatellitestring0Bytes);
+ versionSatellitestring0 = new String(versionSatellitestring0Bytes, StandardCharsets.US_ASCII).trim();
+ byte[] versionMessagestring0Bytes = new byte[32];
+ dis.readFully(versionMessagestring0Bytes);
+ versionMessagestring0 = new String(versionMessagestring0Bytes, StandardCharsets.US_ASCII).trim();
+ coreObtTime0 = dis.readUnsignedInt(32);
+ coreObtUptime0 = dis.readUnsignedInt(32);
+ separationSequence = new Separationsequence(dis);
+ bat = new Bat(dis);
+ eps = new Eps(dis);
+ adcsArray = new AdcsArray(dis);
+ epsSolar = new EpsSolar(dis);
+ adcs = new Adcs(dis);
+ cmc = new Cmc(dis);
+ coreEvent = new CoreEvent(dis);
+ dis.skipBits(7);
+ }
+
+ public String getVersionSatellitestring0() {
+ return versionSatellitestring0;
+ }
+
+ public void setVersionSatellitestring0(String versionSatellitestring0) {
+ this.versionSatellitestring0 = versionSatellitestring0;
+ }
+
+ public String getVersionMessagestring0() {
+ return versionMessagestring0;
+ }
+
+ public void setVersionMessagestring0(String versionMessagestring0) {
+ this.versionMessagestring0 = versionMessagestring0;
+ }
+
+ public long getCoreObtTime0() {
+ return coreObtTime0;
+ }
+
+ public void setCoreObtTime0(long coreObtTime0) {
+ this.coreObtTime0 = coreObtTime0;
+ }
+
+ public long getCoreObtUptime0() {
+ return coreObtUptime0;
+ }
+
+ public void setCoreObtUptime0(long coreObtUptime0) {
+ this.coreObtUptime0 = coreObtUptime0;
+ }
+
+ public Separationsequence getSeparationSequence() {
+ return separationSequence;
+ }
+
+ public void setSeparationSequence(Separationsequence separationSequence) {
+ this.separationSequence = separationSequence;
+ }
+
+ public Bat getBat() {
+ return bat;
+ }
+
+ public void setBat(Bat bat) {
+ this.bat = bat;
+ }
+
+ public Eps getEps() {
+ return eps;
+ }
+
+ public void setEps(Eps eps) {
+ this.eps = eps;
+ }
+
+ public AdcsArray getAdcsArray() {
+ return adcsArray;
+ }
+
+ public void setAdcsArray(AdcsArray adcsArray) {
+ this.adcsArray = adcsArray;
+ }
+
+ public EpsSolar getEpsSolar() {
+ return epsSolar;
+ }
+
+ public void setEpsSolar(EpsSolar epsSolar) {
+ this.epsSolar = epsSolar;
+ }
+
+ public Adcs getAdcs() {
+ return adcs;
+ }
+
+ public void setAdcs(Adcs adcs) {
+ this.adcs = adcs;
+ }
+
+ public Cmc getCmc() {
+ return cmc;
+ }
+
+ public void setCmc(Cmc cmc) {
+ this.cmc = cmc;
+ }
+
+ public CoreEvent getCoreEvent() {
+ return coreEvent;
+ }
+
+ public void setCoreEvent(CoreEvent coreEvent) {
+ this.coreEvent = coreEvent;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct02.java b/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct02.java
new file mode 100644
index 00000000..c6bf21f8
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/HkStruct02.java
@@ -0,0 +1,202 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class HkStruct02 {
+
+ private String versionSatellitestring0;
+ private String versionMessagestring0;
+ private long coreObtTime0;
+ private long coreObtUptime0;
+ private SatelliteMode mode;
+ private Separationsequence separationSequence;
+ private Obc obc;
+ private Bat bat;
+ private Eps eps;
+ private AdcsArray adcsArray;
+ private EpsSolar epsSolar;
+ private Adcs adcs;
+ private Cmc cmc;
+ private Emod emod;
+ private Gmod gmod;
+ private Wbc wbc;
+ private CoreEvent coreEvent;
+ private Datapool datapool;
+
+ public HkStruct02() {
+ // do nothing
+ }
+
+ public HkStruct02(BitInputStream dis) throws IOException {
+ byte[] versionSatellitestring0Bytes = new byte[8];
+ dis.readFully(versionSatellitestring0Bytes);
+ versionSatellitestring0 = new String(versionSatellitestring0Bytes, StandardCharsets.US_ASCII).trim();
+ byte[] versionMessagestring0Bytes = new byte[32];
+ dis.readFully(versionMessagestring0Bytes);
+ versionMessagestring0 = new String(versionMessagestring0Bytes, StandardCharsets.US_ASCII).trim();
+ coreObtTime0 = dis.readUnsignedLong(32);
+ coreObtUptime0 = dis.readUnsignedLong(32);
+ mode = SatelliteMode.valueOfCode(dis.readUnsignedInt(4));
+ separationSequence = new Separationsequence(dis);
+ obc = new Obc(dis);
+ bat = new Bat(dis);
+ eps = new Eps(dis);
+ adcsArray = new AdcsArray(dis);
+ epsSolar = new EpsSolar(dis);
+ adcs = new Adcs(dis);
+ cmc = new Cmc(dis);
+ emod = new Emod(dis);
+ gmod = new Gmod(dis);
+ wbc = new Wbc(dis);
+ coreEvent = new CoreEvent(dis);
+ datapool = new Datapool(dis);
+ }
+
+ public String getVersionSatellitestring0() {
+ return versionSatellitestring0;
+ }
+
+ public void setVersionSatellitestring0(String versionSatellitestring0) {
+ this.versionSatellitestring0 = versionSatellitestring0;
+ }
+
+ public String getVersionMessagestring0() {
+ return versionMessagestring0;
+ }
+
+ public void setVersionMessagestring0(String versionMessagestring0) {
+ this.versionMessagestring0 = versionMessagestring0;
+ }
+
+ public long getCoreObtTime0() {
+ return coreObtTime0;
+ }
+
+ public void setCoreObtTime0(long coreObtTime0) {
+ this.coreObtTime0 = coreObtTime0;
+ }
+
+ public long getCoreObtUptime0() {
+ return coreObtUptime0;
+ }
+
+ public void setCoreObtUptime0(long coreObtUptime0) {
+ this.coreObtUptime0 = coreObtUptime0;
+ }
+
+ public SatelliteMode getMode() {
+ return mode;
+ }
+
+ public void setMode(SatelliteMode mode) {
+ this.mode = mode;
+ }
+
+ public Separationsequence getSeparationSequence() {
+ return separationSequence;
+ }
+
+ public void setSeparationSequence(Separationsequence separationSequence) {
+ this.separationSequence = separationSequence;
+ }
+
+ public Obc getObc() {
+ return obc;
+ }
+
+ public void setObc(Obc obc) {
+ this.obc = obc;
+ }
+
+ public Bat getBat() {
+ return bat;
+ }
+
+ public void setBat(Bat bat) {
+ this.bat = bat;
+ }
+
+ public Eps getEps() {
+ return eps;
+ }
+
+ public void setEps(Eps eps) {
+ this.eps = eps;
+ }
+
+ public AdcsArray getAdcsArray() {
+ return adcsArray;
+ }
+
+ public void setAdcsArray(AdcsArray adcsArray) {
+ this.adcsArray = adcsArray;
+ }
+
+ public EpsSolar getEpsSolar() {
+ return epsSolar;
+ }
+
+ public void setEpsSolar(EpsSolar epsSolar) {
+ this.epsSolar = epsSolar;
+ }
+
+ public Adcs getAdcs() {
+ return adcs;
+ }
+
+ public void setAdcs(Adcs adcs) {
+ this.adcs = adcs;
+ }
+
+ public Cmc getCmc() {
+ return cmc;
+ }
+
+ public void setCmc(Cmc cmc) {
+ this.cmc = cmc;
+ }
+
+ public Emod getEmod() {
+ return emod;
+ }
+
+ public void setEmod(Emod emod) {
+ this.emod = emod;
+ }
+
+ public Gmod getGmod() {
+ return gmod;
+ }
+
+ public void setGmod(Gmod gmod) {
+ this.gmod = gmod;
+ }
+
+ public Wbc getWbc() {
+ return wbc;
+ }
+
+ public void setWbc(Wbc wbc) {
+ this.wbc = wbc;
+ }
+
+ public CoreEvent getCoreEvent() {
+ return coreEvent;
+ }
+
+ public void setCoreEvent(CoreEvent coreEvent) {
+ this.coreEvent = coreEvent;
+ }
+
+ public Datapool getDatapool() {
+ return datapool;
+ }
+
+ public void setDatapool(Datapool datapool) {
+ this.datapool = datapool;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Housekeeping.java b/src/main/java/ru/r2cloud/jradio/eirsat/Housekeeping.java
new file mode 100644
index 00000000..a4849441
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Housekeeping.java
@@ -0,0 +1,65 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Housekeeping {
+
+ private int structureId;
+ private HkStruct00 struct00;
+ private HkStruct02 struct02;
+ private byte[] unknown;
+
+ public Housekeeping() {
+ // do nothing
+ }
+
+ public Housekeeping(BitInputStream bis) throws IOException {
+ structureId = bis.readUnsignedByte();
+ switch (structureId) {
+ case 0:
+ struct00 = new HkStruct00(bis);
+ break;
+ case 2:
+ struct02 = new HkStruct02(bis);
+ break;
+ default:
+ unknown = new byte[bis.available()];
+ bis.readFully(unknown);
+ }
+ }
+
+ public int getStructureId() {
+ return structureId;
+ }
+
+ public void setStructureId(int structureId) {
+ this.structureId = structureId;
+ }
+
+ public HkStruct00 getStruct00() {
+ return struct00;
+ }
+
+ public void setStruct00(HkStruct00 struct00) {
+ this.struct00 = struct00;
+ }
+
+ public HkStruct02 getStruct02() {
+ return struct02;
+ }
+
+ public void setStruct02(HkStruct02 struct02) {
+ this.struct02 = struct02;
+ }
+
+ public byte[] getUnknown() {
+ return unknown;
+ }
+
+ public void setUnknown(byte[] unknown) {
+ this.unknown = unknown;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Obc.java b/src/main/java/ru/r2cloud/jradio/eirsat/Obc.java
new file mode 100644
index 00000000..96ce2638
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Obc.java
@@ -0,0 +1,147 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Obc {
+
+ private float telemetryadcbChanneloutput7Obctemperature;
+ private long gpsLastvalidstatevec0Locktime;
+ private long gpsLastvalidstatevec0Lockfinetime;
+ private float gpsLastvalidstatevec0Ecefpositionx;
+ private float gpsLastvalidstatevec0Ecefpositiony;
+ private float gpsLastvalidstatevec0Ecefpositionz;
+ private float gpsLastvalidstatevec0Ecefvelocityx;
+ private float gpsLastvalidstatevec0Ecefvelocityy;
+ private float gpsLastvalidstatevec0Ecefvelocityz;
+ private int gpsLastvalidstatevec0Hours;
+ private int gpsLastvalidstatevec0Minutes;
+ private int gpsLastvalidstatevec0Seconds;
+ private int gpsLastvalidstatevec0Milliseconds;
+
+ public Obc() {
+ // do nothing
+ }
+
+ public Obc(BitInputStream dis) throws IOException {
+ telemetryadcbChanneloutput7Obctemperature = dis.readUnsignedLong(12) * 0.048828f - 60;
+ gpsLastvalidstatevec0Locktime = dis.readUnsignedLong(32);
+ gpsLastvalidstatevec0Lockfinetime = dis.readUnsignedLong(32);
+ gpsLastvalidstatevec0Ecefpositionx = dis.readFloat();
+ gpsLastvalidstatevec0Ecefpositiony = dis.readFloat();
+ gpsLastvalidstatevec0Ecefpositionz = dis.readFloat();
+ gpsLastvalidstatevec0Ecefvelocityx = dis.readFloat();
+ gpsLastvalidstatevec0Ecefvelocityy = dis.readFloat();
+ gpsLastvalidstatevec0Ecefvelocityz = dis.readFloat();
+ gpsLastvalidstatevec0Hours = dis.readUnsignedByte();
+ gpsLastvalidstatevec0Minutes = dis.readUnsignedByte();
+ gpsLastvalidstatevec0Seconds = dis.readUnsignedByte();
+ gpsLastvalidstatevec0Milliseconds = dis.readUnsignedShort();
+ }
+
+ public float getTelemetryadcbChanneloutput7Obctemperature() {
+ return telemetryadcbChanneloutput7Obctemperature;
+ }
+
+ public void setTelemetryadcbChanneloutput7Obctemperature(float telemetryadcbChanneloutput7Obctemperature) {
+ this.telemetryadcbChanneloutput7Obctemperature = telemetryadcbChanneloutput7Obctemperature;
+ }
+
+ public long getGpsLastvalidstatevec0Locktime() {
+ return gpsLastvalidstatevec0Locktime;
+ }
+
+ public void setGpsLastvalidstatevec0Locktime(long gpsLastvalidstatevec0Locktime) {
+ this.gpsLastvalidstatevec0Locktime = gpsLastvalidstatevec0Locktime;
+ }
+
+ public long getGpsLastvalidstatevec0Lockfinetime() {
+ return gpsLastvalidstatevec0Lockfinetime;
+ }
+
+ public void setGpsLastvalidstatevec0Lockfinetime(long gpsLastvalidstatevec0Lockfinetime) {
+ this.gpsLastvalidstatevec0Lockfinetime = gpsLastvalidstatevec0Lockfinetime;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefpositionx() {
+ return gpsLastvalidstatevec0Ecefpositionx;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefpositionx(float gpsLastvalidstatevec0Ecefpositionx) {
+ this.gpsLastvalidstatevec0Ecefpositionx = gpsLastvalidstatevec0Ecefpositionx;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefpositiony() {
+ return gpsLastvalidstatevec0Ecefpositiony;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefpositiony(float gpsLastvalidstatevec0Ecefpositiony) {
+ this.gpsLastvalidstatevec0Ecefpositiony = gpsLastvalidstatevec0Ecefpositiony;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefpositionz() {
+ return gpsLastvalidstatevec0Ecefpositionz;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefpositionz(float gpsLastvalidstatevec0Ecefpositionz) {
+ this.gpsLastvalidstatevec0Ecefpositionz = gpsLastvalidstatevec0Ecefpositionz;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefvelocityx() {
+ return gpsLastvalidstatevec0Ecefvelocityx;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefvelocityx(float gpsLastvalidstatevec0Ecefvelocityx) {
+ this.gpsLastvalidstatevec0Ecefvelocityx = gpsLastvalidstatevec0Ecefvelocityx;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefvelocityy() {
+ return gpsLastvalidstatevec0Ecefvelocityy;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefvelocityy(float gpsLastvalidstatevec0Ecefvelocityy) {
+ this.gpsLastvalidstatevec0Ecefvelocityy = gpsLastvalidstatevec0Ecefvelocityy;
+ }
+
+ public float getGpsLastvalidstatevec0Ecefvelocityz() {
+ return gpsLastvalidstatevec0Ecefvelocityz;
+ }
+
+ public void setGpsLastvalidstatevec0Ecefvelocityz(float gpsLastvalidstatevec0Ecefvelocityz) {
+ this.gpsLastvalidstatevec0Ecefvelocityz = gpsLastvalidstatevec0Ecefvelocityz;
+ }
+
+ public int getGpsLastvalidstatevec0Hours() {
+ return gpsLastvalidstatevec0Hours;
+ }
+
+ public void setGpsLastvalidstatevec0Hours(int gpsLastvalidstatevec0Hours) {
+ this.gpsLastvalidstatevec0Hours = gpsLastvalidstatevec0Hours;
+ }
+
+ public int getGpsLastvalidstatevec0Minutes() {
+ return gpsLastvalidstatevec0Minutes;
+ }
+
+ public void setGpsLastvalidstatevec0Minutes(int gpsLastvalidstatevec0Minutes) {
+ this.gpsLastvalidstatevec0Minutes = gpsLastvalidstatevec0Minutes;
+ }
+
+ public int getGpsLastvalidstatevec0Seconds() {
+ return gpsLastvalidstatevec0Seconds;
+ }
+
+ public void setGpsLastvalidstatevec0Seconds(int gpsLastvalidstatevec0Seconds) {
+ this.gpsLastvalidstatevec0Seconds = gpsLastvalidstatevec0Seconds;
+ }
+
+ public int getGpsLastvalidstatevec0Milliseconds() {
+ return gpsLastvalidstatevec0Milliseconds;
+ }
+
+ public void setGpsLastvalidstatevec0Milliseconds(int gpsLastvalidstatevec0Milliseconds) {
+ this.gpsLastvalidstatevec0Milliseconds = gpsLastvalidstatevec0Milliseconds;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Packet.java b/src/main/java/ru/r2cloud/jradio/eirsat/Packet.java
new file mode 100644
index 00000000..4d463d85
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Packet.java
@@ -0,0 +1,103 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import ru.r2cloud.jradio.ccsds.PacketPrimaryHeader;
+import ru.r2cloud.jradio.ccsds.PacketSecondaryHeader;
+import ru.r2cloud.jradio.crc.Crc16CcittFalse;
+import ru.r2cloud.jradio.fec.ccsds.UncorrectableException;
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Packet {
+
+ private PacketPrimaryHeader header;
+ private PacketSecondaryHeader secondaryHeader;
+ private Housekeeping housekeeping;
+ private byte[] payload;
+
+ public Packet() {
+ // do nothing
+ }
+
+ public Packet(DataInputStream dis) throws IOException, UncorrectableException {
+ // partial packet. keep payload
+ if (PacketPrimaryHeader.LENGTH_BYTES > dis.available()) {
+ this.payload = new byte[dis.available()];
+ dis.readFully(this.payload);
+ return;
+ }
+ byte[] headerBytes = new byte[PacketPrimaryHeader.LENGTH_BYTES];
+ dis.readFully(headerBytes);
+ BitInputStream bis = new BitInputStream(headerBytes);
+ header = new PacketPrimaryHeader(bis);
+
+ if (header.getPacketDataLength() < 1) {
+ throw new UncorrectableException("invalid header length");
+ }
+
+ // partial packet. keep payload
+ if ((header.getPacketDataLength() - 1 + 2) > dis.available()) {
+ this.payload = new byte[dis.available()];
+ dis.readFully(this.payload);
+ return;
+ }
+
+ byte[] payload = new byte[header.getPacketDataLength() - 1];
+ dis.readFully(payload);
+
+ byte[] fullMessage = new byte[headerBytes.length + payload.length];
+ System.arraycopy(headerBytes, 0, fullMessage, 0, headerBytes.length);
+ System.arraycopy(payload, 0, fullMessage, headerBytes.length, payload.length);
+
+ int expected = dis.readUnsignedShort();
+ int actual = Crc16CcittFalse.calculate(fullMessage, 0, fullMessage.length);
+ if (expected != actual) {
+ throw new UncorrectableException("crc mismatch");
+ }
+
+ bis = new BitInputStream(payload);
+
+ if (header.isSecondaryHeader()) {
+ secondaryHeader = new PacketSecondaryHeader(bis, header.getPacketType() == 0);
+ }
+ if (secondaryHeader != null && secondaryHeader.getServiceType() == 0x3 && secondaryHeader.getServiceSubType() == 0x19) {
+ housekeeping = new Housekeeping(bis);
+ } else {
+ this.payload = payload;
+ }
+ }
+
+ public PacketPrimaryHeader getHeader() {
+ return header;
+ }
+
+ public void setHeader(PacketPrimaryHeader header) {
+ this.header = header;
+ }
+
+ public PacketSecondaryHeader getSecondaryHeader() {
+ return secondaryHeader;
+ }
+
+ public void setSecondaryHeader(PacketSecondaryHeader secondaryHeader) {
+ this.secondaryHeader = secondaryHeader;
+ }
+
+ public Housekeeping getHousekeeping() {
+ return housekeeping;
+ }
+
+ public void setHousekeeping(Housekeeping housekeeping) {
+ this.housekeeping = housekeeping;
+ }
+
+ public byte[] getPayload() {
+ return payload;
+ }
+
+ public void setPayload(byte[] payload) {
+ this.payload = payload;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/SatelliteMode.java b/src/main/java/ru/r2cloud/jradio/eirsat/SatelliteMode.java
new file mode 100644
index 00000000..4b9a2385
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/SatelliteMode.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum SatelliteMode {
+
+ SEPARATION(0), COMMISSIONING(1), NOMINAL(2), WBC(3), SAFE(4), UNKNOWN(255);
+
+ private final int code;
+
+ private SatelliteMode(int code) {
+ this.code = code;
+ }
+
+ public static SatelliteMode valueOfCode(int code) {
+ for (SatelliteMode cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Separationsequence.java b/src/main/java/ru/r2cloud/jradio/eirsat/Separationsequence.java
new file mode 100644
index 00000000..b6429e92
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Separationsequence.java
@@ -0,0 +1,87 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Separationsequence {
+
+ private int state0;
+ private boolean antswitchesstatuses03UhfMinusy;
+ private boolean antswitchesstatuses02VhfMinusx;
+ private boolean antswitchesstatuses01UhfPlusy;
+ private boolean antswitchesstatuses00VhfPlusx;
+ private BootImage platformObcObcCurrbootimage0;
+ private int commsHmacSequencenumber0;
+
+ public Separationsequence() {
+ // do nothing
+ }
+
+ public Separationsequence(BitInputStream dis) throws IOException {
+ state0 = dis.readUnsignedByte();
+ antswitchesstatuses03UhfMinusy = dis.readBoolean();
+ antswitchesstatuses02VhfMinusx = dis.readBoolean();
+ antswitchesstatuses01UhfPlusy = dis.readBoolean();
+ antswitchesstatuses00VhfPlusx = dis.readBoolean();
+ platformObcObcCurrbootimage0 = BootImage.valueOfCode(dis.readUnsignedByte());
+ commsHmacSequencenumber0 = dis.readUnsignedInt(24);
+ }
+
+ public int getState0() {
+ return state0;
+ }
+
+ public void setState0(int state0) {
+ this.state0 = state0;
+ }
+
+ public boolean isAntswitchesstatuses03UhfMinusy() {
+ return antswitchesstatuses03UhfMinusy;
+ }
+
+ public void setAntswitchesstatuses03UhfMinusy(boolean antswitchesstatuses03UhfMinusy) {
+ this.antswitchesstatuses03UhfMinusy = antswitchesstatuses03UhfMinusy;
+ }
+
+ public boolean isAntswitchesstatuses02VhfMinusx() {
+ return antswitchesstatuses02VhfMinusx;
+ }
+
+ public void setAntswitchesstatuses02VhfMinusx(boolean antswitchesstatuses02VhfMinusx) {
+ this.antswitchesstatuses02VhfMinusx = antswitchesstatuses02VhfMinusx;
+ }
+
+ public boolean isAntswitchesstatuses01UhfPlusy() {
+ return antswitchesstatuses01UhfPlusy;
+ }
+
+ public void setAntswitchesstatuses01UhfPlusy(boolean antswitchesstatuses01UhfPlusy) {
+ this.antswitchesstatuses01UhfPlusy = antswitchesstatuses01UhfPlusy;
+ }
+
+ public boolean isAntswitchesstatuses00VhfPlusx() {
+ return antswitchesstatuses00VhfPlusx;
+ }
+
+ public void setAntswitchesstatuses00VhfPlusx(boolean antswitchesstatuses00VhfPlusx) {
+ this.antswitchesstatuses00VhfPlusx = antswitchesstatuses00VhfPlusx;
+ }
+
+ public BootImage getPlatformObcObcCurrbootimage0() {
+ return platformObcObcCurrbootimage0;
+ }
+
+ public void setPlatformObcObcCurrbootimage0(BootImage platformObcObcCurrbootimage0) {
+ this.platformObcObcCurrbootimage0 = platformObcObcCurrbootimage0;
+ }
+
+ public int getCommsHmacSequencenumber0() {
+ return commsHmacSequencenumber0;
+ }
+
+ public void setCommsHmacSequencenumber0(int commsHmacSequencenumber0) {
+ this.commsHmacSequencenumber0 = commsHmacSequencenumber0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/StreamStatus.java b/src/main/java/ru/r2cloud/jradio/eirsat/StreamStatus.java
new file mode 100644
index 00000000..73131808
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/StreamStatus.java
@@ -0,0 +1,22 @@
+package ru.r2cloud.jradio.eirsat;
+
+public enum StreamStatus {
+
+ DISABLED(0), ENABLED(1), OFF(3), UNKNOWN(255);
+
+ private final int code;
+
+ private StreamStatus(int code) {
+ this.code = code;
+ }
+
+ public static StreamStatus valueOfCode(int code) {
+ for (StreamStatus cur : values()) {
+ if (cur.code == code) {
+ return cur;
+ }
+ }
+ return UNKNOWN;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/eirsat/Wbc.java b/src/main/java/ru/r2cloud/jradio/eirsat/Wbc.java
new file mode 100644
index 00000000..de701c53
--- /dev/null
+++ b/src/main/java/ru/r2cloud/jradio/eirsat/Wbc.java
@@ -0,0 +1,37 @@
+package ru.r2cloud.jradio.eirsat;
+
+import java.io.IOException;
+
+import ru.r2cloud.jradio.util.BitInputStream;
+
+public class Wbc {
+
+ private boolean wbcenabled0;
+ private int controllerexecutioncount0;
+
+ public Wbc() {
+ // do nothing
+ }
+
+ public Wbc(BitInputStream dis) throws IOException {
+ wbcenabled0 = dis.readBoolean();
+ controllerexecutioncount0 = dis.readUnsignedByte();
+ }
+
+ public boolean isWbcenabled0() {
+ return wbcenabled0;
+ }
+
+ public void setWbcenabled0(boolean wbcenabled0) {
+ this.wbcenabled0 = wbcenabled0;
+ }
+
+ public int getControllerexecutioncount0() {
+ return controllerexecutioncount0;
+ }
+
+ public void setControllerexecutioncount0(int controllerexecutioncount0) {
+ this.controllerexecutioncount0 = controllerexecutioncount0;
+ }
+
+}
diff --git a/src/main/java/ru/r2cloud/jradio/kafasat/KafasatBeacon.java b/src/main/java/ru/r2cloud/jradio/kafasat/KafasatBeacon.java
index 905250f2..c0989cdb 100644
--- a/src/main/java/ru/r2cloud/jradio/kafasat/KafasatBeacon.java
+++ b/src/main/java/ru/r2cloud/jradio/kafasat/KafasatBeacon.java
@@ -21,7 +21,7 @@ public void readBeacon(DataInputStream dis) throws IOException, UncorrectableExc
BitInputStream bis = new BitInputStream(dis);
primary = new PacketPrimaryHeader(bis);
if (primary.isSecondaryHeader()) {
- secondary = new PacketSecondaryHeader(bis);
+ secondary = new PacketSecondaryHeader(bis, true);
}
if (secondary != null && secondary.getServiceType() == 3 && secondary.getServiceSubType() == 25) {
LittleEndianDataInputStream ldis = new LittleEndianDataInputStream(dis);
diff --git a/src/test/java/ru/r2cloud/jradio/eirsat/EirsatBeaconTest.java b/src/test/java/ru/r2cloud/jradio/eirsat/EirsatBeaconTest.java
new file mode 100644
index 00000000..a5977143
--- /dev/null
+++ b/src/test/java/ru/r2cloud/jradio/eirsat/EirsatBeaconTest.java
@@ -0,0 +1,54 @@
+package ru.r2cloud.jradio.eirsat;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor;
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.Test;
+
+import ru.r2cloud.jradio.AssertJson;
+import ru.r2cloud.jradio.fec.ViterbiTest;
+
+public class EirsatBeaconTest {
+
+ @Test
+ public void testBeacon() throws Exception {
+ byte[] data = ViterbiTest.hexStringToByteArray(
+ "0010585818000802c05800d3100319024549525341542d314972656c616e64277320466972737420536174656c6c69746521202020202020005ae49700000714442f01008dff6f80000000000000000000000000000000000000000000000000000000000000000000000000000738a769ea6c0000032ae8f05d737800c1c04002fe43fd8afc6ffd8900402004020040200400326bffdbffac00700000000000000001c4945d200001b000027280007fffffffe0000fffffffffc0003ffffff0000fffffffffffff00000000000004c007409980008c04bfffffffffffff1d9d07ff000002950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ EirsatBeacon result = new EirsatBeacon();
+ result.readBeacon(data);
+ AssertJson.assertObjectsEqual("EirsatBeacon-housekeeping.json", result);
+ }
+
+ @Test
+ public void testUnknown() throws Exception {
+ byte[] data = ViterbiTest.hexStringToByteArray(
+ "00209F9F1814000000000000000000000000000000000000405B0802D43E00081001071802C250A9C40802D43F000C10050100DE001000000000764D0802D44000F9100D03BD000900090000000000000000000000000002B95A468EA4A08000331E4B0AD73780242305C0211045395F49353952497A202C10005104918AC9C00FEFFFFBBFFA3FEF1586F8E1A34395AA00000000000000001E45BFF749D5FFFFFFFF830F3FFFFFFFFF0000FFFFFFC0003FFFFFFFFFFFFC000003000000460037004700000F08FFFFFFFFFFFFFC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D2BF07FF00000239000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ EirsatBeacon result = new EirsatBeacon();
+ result.readBeacon(data);
+ AssertJson.assertObjectsEqual("EirsatBeacon-unknown.json", result);
+ }
+
+ @Test
+ public void testPojo() {
+ assertThat(EirsatBeacon.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Packet.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Housekeeping.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(HkStruct00.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(HkStruct02.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Separationsequence.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Obc.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Bat.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Eps.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(AdcsArray.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(EpsSolar.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Adcs.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Cmc.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Emod.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Gmod.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Wbc.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(CoreEvent.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ assertThat(Datapool.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));
+ }
+}
diff --git a/src/test/resources/expected/EirsatBeacon-housekeeping.json b/src/test/resources/expected/EirsatBeacon-housekeeping.json
new file mode 100644
index 00000000..2589339f
--- /dev/null
+++ b/src/test/resources/expected/EirsatBeacon-housekeeping.json
@@ -0,0 +1,244 @@
+{
+ "packets": [
+ {
+ "header": {
+ "packetVersion": 0,
+ "packetType": 0,
+ "secondaryHeader": true,
+ "applicationProcessId": 2,
+ "sequenceFlag": 3,
+ "packetName": 88,
+ "packetDataLength": 211
+ },
+ "secondaryHeader": {
+ "pusVersion": 1,
+ "serviceType": 3,
+ "serviceSubType": 25
+ },
+ "housekeeping": {
+ "structureId": 2,
+ "struct02": {
+ "versionSatellitestring0": "EIRSAT-1",
+ "versionMessagestring0": "Ireland\u0027s First Satellite!",
+ "coreObtTime0": 5956759,
+ "coreObtUptime0": 1812,
+ "mode": "SAFE",
+ "separationSequence": {
+ "state0": 66,
+ "antswitchesstatuses03UhfMinusy": true,
+ "antswitchesstatuses02VhfMinusx": true,
+ "antswitchesstatuses01UhfPlusy": true,
+ "antswitchesstatuses00VhfPlusx": true,
+ "platformObcObcCurrbootimage0": "PRIMARY1",
+ "commsHmacSequencenumber0": 36351
+ },
+ "obc": {
+ "telemetryadcbChanneloutput7Obctemperature": 27.109146,
+ "gpsLastvalidstatevec0Locktime": 0,
+ "gpsLastvalidstatevec0Lockfinetime": 0,
+ "gpsLastvalidstatevec0Ecefpositionx": 0.0,
+ "gpsLastvalidstatevec0Ecefpositiony": 0.0,
+ "gpsLastvalidstatevec0Ecefpositionz": 0.0,
+ "gpsLastvalidstatevec0Ecefvelocityx": 0.0,
+ "gpsLastvalidstatevec0Ecefvelocityy": 0.0,
+ "gpsLastvalidstatevec0Ecefvelocityz": 0.0,
+ "gpsLastvalidstatevec0Hours": 0,
+ "gpsLastvalidstatevec0Minutes": 0,
+ "gpsLastvalidstatevec0Seconds": 0,
+ "gpsLastvalidstatevec0Milliseconds": 0
+ },
+ "bat": {
+ "batterycurrent2": 14.662757,
+ "batteryvoltage2": 7.4102316,
+ "batterytemperature0": 27.424377,
+ "batterytemperature1": 27.821991,
+ "batterytemperature2": 26.62918,
+ "batterycurrentdir0": false,
+ "packedheaterstatus0": false,
+ "packedheaterstatus1": false,
+ "packedheaterstatus2": false
+ },
+ "eps": {
+ "actualswitchstatesbitmap09": false,
+ "actualswitchstatesbitmap08": false,
+ "actualswitchstatesbitmap07": false,
+ "actualswitchstatesbitmap06": false,
+ "actualswitchstatesbitmap05": false,
+ "actualswitchstatesbitmap04": false,
+ "actualswitchstatesbitmap03": false,
+ "actualswitchstatesbitmap02": false,
+ "actualswitchstatesbitmap01": false,
+ "actualswitchstatesbitmap00": false,
+ "switchovercurrentbitmap09": false,
+ "switchovercurrentbitmap08": false,
+ "switchovercurrentbitmap07": false,
+ "switchovercurrentbitmap06": false,
+ "switchovercurrentbitmap05": false,
+ "switchovercurrentbitmap04": false,
+ "switchovercurrentbitmap03": false,
+ "switchovercurrentbitmap02": false,
+ "switchovercurrentbitmap01": false,
+ "switchovercurrentbitmap00": false,
+ "boardTemperature0": 28.521545,
+ "busVoltages0Battery": 8.358518,
+ "busVoltages13v3": 3.332403,
+ "busVoltages25v": 5.0439,
+ "busVoltages312v": 11.97912,
+ "busCurrents0Battery": 0.015711,
+ "busCurrents13v3": 0.14663601,
+ "busCurrents25v": 0.083792,
+ "busCurrents312v": 0.00414
+ },
+ "adcsArray": {
+ "temperature1Plusx": 224.42926,
+ "temperature4Minusx": 223.01788,
+ "temperature3Plusy": 220.85889,
+ "temperature2Minusy": 223.01025
+ },
+ "epsSolar": {
+ "currents1Plusx": 9.775E-4,
+ "currents4Minusx": 0.001955,
+ "currents3Plusy": 9.775E-4,
+ "currents2Minusy": 0.001955,
+ "voltages0": 0.0322581,
+ "voltages1": 0.0645162,
+ "voltages2": 0.0322581
+ },
+ "adcs": {
+ "packedadcsmode0": "STANDBY",
+ "executioncount0": 3226,
+ "rawgyrorate0": 0.104166,
+ "rawgyrorate1": 0.2187486,
+ "rawgyrorate2": -0.2916648,
+ "fss1alphaangle0": 0.0,
+ "fss1betaangle0": 1.4E-45
+ },
+ "cmc": {
+ "mode0": 0,
+ "beaconenable0": true,
+ "txtransparent0": true,
+ "txconvenabled0": false,
+ "txpower0": 0.5,
+ "rxlock0": true,
+ "rxrssi0": 593,
+ "rxfrequencyoffset0": 145.825,
+ "rxpacketcount0": 0,
+ "temperaturepa0": 27,
+ "current5v0": 0.0,
+ "voltage5v0": 5.012,
+ "rxcrcerrorcount0": 0
+ },
+ "emod": {
+ "dpResetcounter0": 255,
+ "dpEmodmode0": "OFF",
+ "dpLastpageaddr0": 16777215,
+ "autopollpages0": false,
+ "nextpageaddrtopoll0": 0
+ },
+ "gmod": {
+ "dpResetcounter0": 255,
+ "dpGmodmode0": "OFF",
+ "dpLastpagesumaddr0": 16777215,
+ "dpStreamsumchstatus0": "OFF",
+ "lastpagesumaddrrx0": 0,
+ "dpLastpage16addr0": 16777215,
+ "dpStream16chstatus0": "OFF",
+ "lastpage16addrrx0": 0,
+ "dpBiasvoltage0": 65535,
+ "dpBiasoffsetvalue0": 65535,
+ "dpBoostconverterenable0": "OFF",
+ "dpBiasoffsetvoltage0": 65535,
+ "dpBiasoffsetenable0": "OFF",
+ "grbtriggeringenabled0": false,
+ "grbtriggercount0": 0
+ },
+ "wbc": {
+ "wbcenabled0": false,
+ "controllerexecutioncount0": 0
+ },
+ "coreEvent": {
+ "eventcount0": 19,
+ "lastevent0Severity": 0,
+ "lastevent0EventId": 29,
+ "lastevent0EventSourceId": 614,
+ "lastevent0Info": 143378
+ },
+ "datapool": {
+ "paramvalid170": true,
+ "paramvalid43": true,
+ "paramvalid44": true,
+ "paramvalid46": true,
+ "paramvalid42": true,
+ "paramvalid56": true,
+ "paramvalid73": true,
+ "paramvalid74": true,
+ "paramvalid77": true,
+ "paramvalid85": true,
+ "paramvalid86": true,
+ "paramvalid129": true,
+ "paramvalid80": true,
+ "paramvalid84": true,
+ "paramvalid130": true,
+ "paramvalid131": true,
+ "paramvalid89": true,
+ "paramvalid95": true,
+ "paramvalid96": true,
+ "paramvalid2": true,
+ "paramvalid3": true,
+ "paramvalid7": true,
+ "paramvalid8": true,
+ "paramvalid11": true,
+ "paramvalid20": true,
+ "paramvalid22": true,
+ "paramvalid19": true,
+ "paramvalid26": true,
+ "paramvalid32": true,
+ "paramvalid36": true,
+ "paramvalid34": true,
+ "paramvalid28": true,
+ "paramvalid142": true,
+ "paramvalid141": true,
+ "paramvalid143": true,
+ "paramvalid139": true,
+ "paramvalid140": true,
+ "paramvalid149": true,
+ "paramvalid148": true,
+ "paramvalid150": true,
+ "paramvalid151": true,
+ "paramvalid144": true,
+ "paramvalid152": true,
+ "paramvalid153": true,
+ "paramvalid145": true,
+ "paramvalid154": true,
+ "paramvalid155": true,
+ "paramvalid156": true,
+ "paramvalid157": true,
+ "paramvalid158": true,
+ "paramvalid146": true,
+ "paramvalid147": true,
+ "paramvalid168": true,
+ "paramvalid169": true
+ }
+ }
+ }
+ }
+ ],
+ "header": {
+ "version": 0,
+ "spacecraftId": 1,
+ "virtualChannelId": 0,
+ "ocf": false,
+ "masterChannelFrameCount": 88,
+ "virtualChannelFrameCount": 88,
+ "fieldStatus": {
+ "secondaryHeader": false,
+ "sync": false,
+ "packetOrder": false,
+ "segmentLengthId": 3,
+ "firstHeaderPointer": 0
+ }
+ },
+ "beginSample": 0,
+ "beginMillis": 0,
+ "endSample": 0
+}
\ No newline at end of file
diff --git a/src/test/resources/expected/EirsatBeacon-unknown.json b/src/test/resources/expected/EirsatBeacon-unknown.json
new file mode 100644
index 00000000..405cac82
--- /dev/null
+++ b/src/test/resources/expected/EirsatBeacon-unknown.json
@@ -0,0 +1,366 @@
+{
+ "packets": [
+ {
+ "payload": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 64,
+ 91
+ ]
+ },
+ {
+ "header": {
+ "packetVersion": 0,
+ "packetType": 0,
+ "secondaryHeader": true,
+ "applicationProcessId": 2,
+ "sequenceFlag": 3,
+ "packetName": 5182,
+ "packetDataLength": 8
+ },
+ "secondaryHeader": {
+ "pusVersion": 1,
+ "serviceType": 1,
+ "serviceSubType": 7
+ },
+ "payload": [
+ 16,
+ 1,
+ 7,
+ 24,
+ 2,
+ -62,
+ 80
+ ]
+ },
+ {
+ "header": {
+ "packetVersion": 0,
+ "packetType": 0,
+ "secondaryHeader": true,
+ "applicationProcessId": 2,
+ "sequenceFlag": 3,
+ "packetName": 5183,
+ "packetDataLength": 12
+ },
+ "secondaryHeader": {
+ "pusVersion": 1,
+ "serviceType": 5,
+ "serviceSubType": 1
+ },
+ "payload": [
+ 16,
+ 5,
+ 1,
+ 0,
+ -34,
+ 0,
+ 16,
+ 0,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ {
+ "header": {
+ "packetVersion": 0,
+ "packetType": 0,
+ "secondaryHeader": true,
+ "applicationProcessId": 2,
+ "sequenceFlag": 3,
+ "packetName": 5184,
+ "packetDataLength": 249
+ },
+ "secondaryHeader": {
+ "pusVersion": 1,
+ "serviceType": 13,
+ "serviceSubType": 3
+ },
+ "payload": [
+ 16,
+ 13,
+ 3,
+ -67,
+ 0,
+ 9,
+ 0,
+ 9,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2,
+ -71,
+ 90,
+ 70,
+ -114,
+ -92,
+ -96,
+ -128,
+ 0,
+ 51,
+ 30,
+ 75,
+ 10,
+ -41,
+ 55,
+ -128,
+ 36,
+ 35,
+ 5,
+ -64,
+ 33,
+ 16,
+ 69,
+ 57,
+ 95,
+ 73,
+ 53,
+ 57,
+ 82,
+ 73,
+ 122,
+ 32,
+ 44,
+ 16,
+ 0,
+ 81,
+ 4,
+ -111,
+ -118,
+ -55,
+ -64,
+ 15,
+ -17,
+ -1,
+ -5,
+ -65,
+ -6,
+ 63,
+ -17,
+ 21,
+ -122,
+ -8,
+ -31,
+ -93,
+ 67,
+ -107,
+ -86,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 30,
+ 69,
+ -65,
+ -9,
+ 73,
+ -43,
+ -1,
+ -1,
+ -1,
+ -1,
+ -125,
+ 15,
+ 63,
+ -1,
+ -1,
+ -1,
+ -1,
+ 0,
+ 0,
+ -1,
+ -1,
+ -1,
+ -64,
+ 0,
+ 63,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -4,
+ 0,
+ 0,
+ 3,
+ 0,
+ 0,
+ 0,
+ 70,
+ 0,
+ 55,
+ 0,
+ 71,
+ 0,
+ 0,
+ 15,
+ 8,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -4,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ ]
+ }
+ ],
+ "header": {
+ "version": 0,
+ "spacecraftId": 2,
+ "virtualChannelId": 0,
+ "ocf": false,
+ "masterChannelFrameCount": 159,
+ "virtualChannelFrameCount": 159,
+ "fieldStatus": {
+ "secondaryHeader": false,
+ "sync": false,
+ "packetOrder": false,
+ "segmentLengthId": 3,
+ "firstHeaderPointer": 20
+ }
+ },
+ "beginSample": 0,
+ "beginMillis": 0,
+ "endSample": 0
+}
\ No newline at end of file
diff --git a/src/test/resources/expected/KafasatBeacon.json b/src/test/resources/expected/KafasatBeacon.json
index 58eab41a..2da7ef2d 100644
--- a/src/test/resources/expected/KafasatBeacon.json
+++ b/src/test/resources/expected/KafasatBeacon.json
@@ -9,7 +9,8 @@
"packetDataLength": 190
},
"secondary": {
- "pusHeader": 16,
+ "pusVersion": 1,
+ "ack": 0,
"serviceType": 3,
"serviceSubType": 25
},