-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b621fb9
commit 38e8d76
Showing
31 changed files
with
3,332 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
Oops, something went wrong.