Skip to content

Commit

Permalink
add support for Sharjahsat-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Oct 12, 2023
1 parent b57ef4e commit 3e3865a
Show file tree
Hide file tree
Showing 17 changed files with 2,244 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,11 @@ jradio has lots of built-in satellite decoders. Some of them have non standard d
<td>53384, 57172, 53383, 53373, 53381, 53375, 53377, 53374, 57189, 47952, 47951, 47960</td>
<td>ru.r2cloud.jradio.sputnix.SputnixBeacon</td>
</tr>
<tr>
<td>Sharjahsat-1</td>
<td>55104</td>
<td>ru.r2cloud.jradio.sharjahsat.Sharjahsat1Beacon</td>
</tr>
</tbody>
</table>

Expand Down
128 changes: 128 additions & 0 deletions src/main/java/ru/r2cloud/jradio/sharjahsat/Adcs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
package ru.r2cloud.jradio.sharjahsat;

import java.io.IOException;

import ru.r2cloud.jradio.util.LittleEndianDataInputStream;

public class Adcs {

private int adcsState;
private float satPosLlhLat;
private float satPosLlhLon;
private float satPosLlhAlt;
private float estmAttAngleYaw;
private float estmAttAnglePitch;
private float estmAttAngleRoll;
private float estmAngRateYaw;
private float estmAngRatePitch;
private float estmAngRateRoll;
private byte[] dataB64T;

public Adcs() {
// do nothing
}

public Adcs(LittleEndianDataInputStream dis) throws IOException {
adcsState = dis.readUnsignedByte();
satPosLlhLat = dis.readShort() * 0.01f;
satPosLlhLon = dis.readShort() * 0.01f;
satPosLlhAlt = dis.readShort() * 0.01f;
estmAttAngleYaw = dis.readShort() * 0.01f;
estmAttAnglePitch = dis.readShort() * 0.01f;
estmAttAngleRoll = dis.readShort() * 0.01f;
estmAngRateYaw = dis.readShort() * 0.01f;
estmAngRatePitch = dis.readShort() * 0.01f;
estmAngRateRoll = dis.readShort() * 0.01f;
dataB64T = new byte[18];
dis.readFully(dataB64T);
}

public int getAdcsState() {
return adcsState;
}

public void setAdcsState(int adcsState) {
this.adcsState = adcsState;
}

public float getSatPosLlhLat() {
return satPosLlhLat;
}

public void setSatPosLlhLat(float satPosLlhLat) {
this.satPosLlhLat = satPosLlhLat;
}

public float getSatPosLlhLon() {
return satPosLlhLon;
}

public void setSatPosLlhLon(float satPosLlhLon) {
this.satPosLlhLon = satPosLlhLon;
}

public float getSatPosLlhAlt() {
return satPosLlhAlt;
}

public void setSatPosLlhAlt(float satPosLlhAlt) {
this.satPosLlhAlt = satPosLlhAlt;
}

public float getEstmAttAngleYaw() {
return estmAttAngleYaw;
}

public void setEstmAttAngleYaw(float estmAttAngleYaw) {
this.estmAttAngleYaw = estmAttAngleYaw;
}

public float getEstmAttAnglePitch() {
return estmAttAnglePitch;
}

public void setEstmAttAnglePitch(float estmAttAnglePitch) {
this.estmAttAnglePitch = estmAttAnglePitch;
}

public float getEstmAttAngleRoll() {
return estmAttAngleRoll;
}

public void setEstmAttAngleRoll(float estmAttAngleRoll) {
this.estmAttAngleRoll = estmAttAngleRoll;
}

public float getEstmAngRateYaw() {
return estmAngRateYaw;
}

public void setEstmAngRateYaw(float estmAngRateYaw) {
this.estmAngRateYaw = estmAngRateYaw;
}

public float getEstmAngRatePitch() {
return estmAngRatePitch;
}

public void setEstmAngRatePitch(float estmAngRatePitch) {
this.estmAngRatePitch = estmAngRatePitch;
}

public float getEstmAngRateRoll() {
return estmAngRateRoll;
}

public void setEstmAngRateRoll(float estmAngRateRoll) {
this.estmAngRateRoll = estmAngRateRoll;
}

public byte[] getDataB64T() {
return dataB64T;
}

public void setDataB64T(byte[] dataB64T) {
this.dataB64T = dataB64T;
}

}
117 changes: 117 additions & 0 deletions src/main/java/ru/r2cloud/jradio/sharjahsat/Battery.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package ru.r2cloud.jradio.sharjahsat;

import java.io.IOException;

import ru.r2cloud.jradio.util.LittleEndianDataInputStream;

public class Battery {

private float vbat;
private float ibat;
private float vpcm3v3;
private float vpcm5v;
private float ipcm3v3;
private float ipcm5v;
private float tbrd;
private float tbat1;
private float tbat2;
private float tbat3;

public Battery() {
// do nothing
}

public Battery(LittleEndianDataInputStream dis) throws IOException {
vbat = dis.readUnsignedShort() * 0.008993f;
ibat = dis.readShort() * 14.662757f;
vpcm3v3 = dis.readUnsignedShort() * 0.004311f;
vpcm5v = dis.readUnsignedShort() * 0.005865f;
ipcm3v3 = dis.readUnsignedShort() * 1.327547f;
ipcm5v = dis.readUnsignedShort() * 1.327547f;
tbrd = (dis.readShort() * 0.372434f) - 273.15f;
tbat1 = (dis.readShort() * 0.3976f) - 238.57f;
tbat2 = (dis.readShort() * 0.3976f) - 238.57f;
tbat3 = (dis.readShort() * 0.3976f) - 238.57f;
}

public float getVbat() {
return vbat;
}

public void setVbat(float vbat) {
this.vbat = vbat;
}

public float getIbat() {
return ibat;
}

public void setIbat(float ibat) {
this.ibat = ibat;
}

public float getVpcm3v3() {
return vpcm3v3;
}

public void setVpcm3v3(float vpcm3v3) {
this.vpcm3v3 = vpcm3v3;
}

public float getVpcm5v() {
return vpcm5v;
}

public void setVpcm5v(float vpcm5v) {
this.vpcm5v = vpcm5v;
}

public float getIpcm3v3() {
return ipcm3v3;
}

public void setIpcm3v3(float ipcm3v3) {
this.ipcm3v3 = ipcm3v3;
}

public float getIpcm5v() {
return ipcm5v;
}

public void setIpcm5v(float ipcm5v) {
this.ipcm5v = ipcm5v;
}

public float getTbrd() {
return tbrd;
}

public void setTbrd(float tbrd) {
this.tbrd = tbrd;
}

public float getTbat1() {
return tbat1;
}

public void setTbat1(float tbat1) {
this.tbat1 = tbat1;
}

public float getTbat2() {
return tbat2;
}

public void setTbat2(float tbat2) {
this.tbat2 = tbat2;
}

public float getTbat3() {
return tbat3;
}

public void setTbat3(float tbat3) {
this.tbat3 = tbat3;
}

}
137 changes: 137 additions & 0 deletions src/main/java/ru/r2cloud/jradio/sharjahsat/Eps.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
package ru.r2cloud.jradio.sharjahsat;

import java.io.IOException;

import ru.r2cloud.jradio.util.LittleEndianDataInputStream;

public class Eps {

private float vpcmbatv;
private float ipcmbatv;
private float vpcm3v3;
private float ipcm3v3;
private float vpcm5v;
private float ipcm5v;
private float i3v3drw;
private float i5vdrw;
private float tbrd;
private float tbrdDb;
private float ipcm12v;
private float vpcm12v;

public Eps() {
// do nothing
}

public Eps(LittleEndianDataInputStream dis) throws IOException {
vpcmbatv = dis.readUnsignedShort() * 0.008978f;
ipcmbatv = dis.readShort() * 0.00681988679f;
vpcm3v3 = dis.readUnsignedShort() * 0.004311f;
ipcm3v3 = dis.readUnsignedShort() * 0.00681988679f;
vpcm5v = dis.readUnsignedShort() * 0.005865f;
ipcm5v = dis.readUnsignedShort() * 0.00681988679f;
i3v3drw = dis.readUnsignedShort() * 0.001327547f;
i5vdrw = dis.readUnsignedShort() * 0.001327547f;
tbrd = (dis.readUnsignedShort() * 0.372434f) - 273.15f;
tbrdDb = (dis.readUnsignedShort() * 0.372434f) - 273.15f;
ipcm12v = dis.readUnsignedShort() * 0.002066632361f;
vpcm12v = dis.readUnsignedShort() * 0.01349f;
}

public float getVpcmbatv() {
return vpcmbatv;
}

public void setVpcmbatv(float vpcmbatv) {
this.vpcmbatv = vpcmbatv;
}

public float getIpcmbatv() {
return ipcmbatv;
}

public void setIpcmbatv(float ipcmbatv) {
this.ipcmbatv = ipcmbatv;
}

public float getVpcm3v3() {
return vpcm3v3;
}

public void setVpcm3v3(float vpcm3v3) {
this.vpcm3v3 = vpcm3v3;
}

public float getIpcm3v3() {
return ipcm3v3;
}

public void setIpcm3v3(float ipcm3v3) {
this.ipcm3v3 = ipcm3v3;
}

public float getVpcm5v() {
return vpcm5v;
}

public void setVpcm5v(float vpcm5v) {
this.vpcm5v = vpcm5v;
}

public float getIpcm5v() {
return ipcm5v;
}

public void setIpcm5v(float ipcm5v) {
this.ipcm5v = ipcm5v;
}

public float getI3v3drw() {
return i3v3drw;
}

public void setI3v3drw(float i3v3drw) {
this.i3v3drw = i3v3drw;
}

public float getI5vdrw() {
return i5vdrw;
}

public void setI5vdrw(float i5vdrw) {
this.i5vdrw = i5vdrw;
}

public float getTbrd() {
return tbrd;
}

public void setTbrd(float tbrd) {
this.tbrd = tbrd;
}

public float getTbrdDb() {
return tbrdDb;
}

public void setTbrdDb(float tbrdDb) {
this.tbrdDb = tbrdDb;
}

public float getIpcm12v() {
return ipcm12v;
}

public void setIpcm12v(float ipcm12v) {
this.ipcm12v = ipcm12v;
}

public float getVpcm12v() {
return vpcm12v;
}

public void setVpcm12v(float vpcm12v) {
this.vpcm12v = vpcm12v;
}

}
Loading

0 comments on commit 3e3865a

Please sign in to comment.