diff --git a/ApplicationEntrySatDecoder/pom.xml b/ApplicationEntrySatDecoder/pom.xml
index 2b0b45327fe12707d1d419d0d58122349b04fdc4..c3833f1163b9de90ec3232d082feef74b1a970f0 100644
--- a/ApplicationEntrySatDecoder/pom.xml
+++ b/ApplicationEntrySatDecoder/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.josast
+ org.josast
JOSAST-parent
- 0.0.2-SNAPSHOT
+ 0.0.2-SNAPSHOT
@@ -17,7 +17,6 @@
http://www.amsat-f.org
-
@@ -36,19 +35,19 @@
org.josast
ModuleConfig
- 0.0.1-SNAPSHOT
+ 0.2
org.josast
ModuleSoundModem
- 0.0.1-SNAPSHOT
+ 0.0.2-SNAPSHOT
- org.josast
- ModuleEntrySatTelemetry
- 0.0.1-SNAPSHOT
-
+ org.josast
+ ModuleEntrySatTelemetry
+ 0.0.1-SNAPSHOT
+
@@ -64,9 +63,23 @@
javafx-controls
12
+
+ org.openjfx
+ javafx-fxml
+ 12
+
+
+
+
+ org.openjfx
+ javafx-swing
+ 11-ea+24
+
+
+
org.openjfx
javafx-maven-plugin
@@ -75,7 +88,41 @@
HelloFX
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+
+
+
+
+
+
+ org.josast.EntrysatDecoder.Main
+
+
+
+
+ jar-with-dependencies
+
+
+
+
+
+
diff --git a/ApplicationEntrySatDecoder/src/main/java/BasicApplication.css b/ApplicationEntrySatDecoder/src/main/java/BasicApplication.css
new file mode 100644
index 0000000000000000000000000000000000000000..8b2e428c7e938ca8ad4eb73f5f19a36b2a962841
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/BasicApplication.css
@@ -0,0 +1,25 @@
+.menu-bar {
+ -fx-background-color: #aeb5ba, linear-gradient(to bottom, #ecf4fa 0%, #ced4d9 100%);
+ -fx-background-insets: 0, 0 0 1 0;
+}
+
+.menu-bar .menu .label {
+ -fx-text-fill: #2d3e4c;
+}
+
+
+.thick-chart .chart-series-line {
+-fx-stroke-width: 1px;
+}
+
+.chart-line-symbol {
+
+ -fx-background-insets: 0, 2;
+ -fx-background-radius: 2px;
+ -fx-padding: 2px;
+}
+
+#font-button {
+ -fx-font: bold italic 20pt "Arial";
+ -fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
+}
\ No newline at end of file
diff --git a/ApplicationEntrySatDecoder/src/main/java/EntrysatVersion.txt b/ApplicationEntrySatDecoder/src/main/java/EntrysatVersion.txt
new file mode 100644
index 0000000000000000000000000000000000000000..350f8526d0ce63265b46f993dcc73a9fe6cf6108
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/EntrysatVersion.txt
@@ -0,0 +1,3 @@
+EntrySatVersion=0.8
+Message=Version for validation purpose
+NoradID=9990
\ No newline at end of file
diff --git a/ApplicationEntrySatDecoder/src/main/java/LogoCSut.png b/ApplicationEntrySatDecoder/src/main/java/LogoCSut.png
new file mode 100644
index 0000000000000000000000000000000000000000..7643bc92999e12b34c48631e9530de80f433dbad
Binary files /dev/null and b/ApplicationEntrySatDecoder/src/main/java/LogoCSut.png differ
diff --git a/ApplicationEntrySatDecoder/src/main/java/logoAmsat.png b/ApplicationEntrySatDecoder/src/main/java/logoAmsat.png
new file mode 100644
index 0000000000000000000000000000000000000000..0d040fba4b8e99ac74424b8e65bf4a9b05995fde
Binary files /dev/null and b/ApplicationEntrySatDecoder/src/main/java/logoAmsat.png differ
diff --git a/ApplicationEntrySatDecoder/src/main/java/logo_pour_decodeur.jpg b/ApplicationEntrySatDecoder/src/main/java/logo_pour_decodeur.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..320f273a8a46ddc80f3940e07719972c9a76ca8a
Binary files /dev/null and b/ApplicationEntrySatDecoder/src/main/java/logo_pour_decodeur.jpg differ
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/AlertHelper.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/AlertHelper.java
new file mode 100644
index 0000000000000000000000000000000000000000..87eaa9c5c89f8b1ab06f0d8d735249561e5bd8e7
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/AlertHelper.java
@@ -0,0 +1,38 @@
+package org.josast.EntrysatDecoder;
+
+
+import javafx.scene.control.Alert;
+import javafx.stage.Window;
+
+/**
+ * Simple helper class to display message to the end user
+ * @author christophe
+ *
+ */
+public class AlertHelper {
+
+ private AlertHelper()
+ {
+
+ }
+ /**
+ * Display a window in order to display a message
+ * @param alertType Type of alert
+ * @param owner
+ * @param title title of the windows
+ * @param message message to display
+ */
+ public static void showAlert(Alert.AlertType alertType, Window owner, String title, String message) {
+ Alert alert = new Alert(alertType);
+ alert.setTitle(title);
+ alert.setHeaderText(null);
+ alert.setContentText(message);
+ alert.initOwner(owner);
+ alert.show();
+ }
+ }
+
+
+
+
+
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Configuration.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Configuration.java
new file mode 100644
index 0000000000000000000000000000000000000000..5ebb0aec038a872ad9d421c5490426f6950f4e9c
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Configuration.java
@@ -0,0 +1,235 @@
+/**
+ *
+ */
+package org.josast.EntrysatDecoder;
+
+import org.josast.property.CONFIG;
+
+/**
+ * Singleton to manage all application parameter
+ * The default configuration is automaticaly saved in a properties file.
+ * @author christophe
+ *
+ *
+ */
+public class Configuration {
+
+
+ /*
+ * parameter with default value
+ */
+ private String callsign="Anonymous";
+ private String longitude="0.0W";
+ private String latitude="0.0N";
+
+ private String soundModemIP="127.0.0.1";
+ private String soundModemPort="8100";
+
+ private String SIDSEntrySatSource="Anonymous";
+ private String SIDSEntryUrl="https://amsat.electrolab.fr/SIDS";
+ private String SIDSSatnogsSource="Anonymous";
+ private String SIDSSatnogsURL="https://db.satnogs.org/api/telemetry/";
+ private String SIDSSatnogs="0";
+ private String SIDSEntrySat="1";
+ private int Norad=99990; // default value - equivalent to satnogs
+ private boolean SISD_SatNogs = false;
+ private boolean SIDS_EntrySat = true;
+
+
+ private CONFIG conf = CONFIG.getInstance();
+
+ public static Configuration getInstance()
+ {
+ return SingletonHolder.instance;
+ }
+
+ public boolean isSISD_SatNogs() {
+
+ return SISD_SatNogs;
+ }
+
+ public boolean isSIDS_EntrySat() {
+ return SIDS_EntrySat;
+ }
+
+ private Configuration()
+ {
+ if ( conf.GetProperty("Callsign")!=null)
+ {
+ callsign = conf.GetProperty("Callsign");
+ latitude = conf.GetProperty("Latitude");
+ longitude = conf.GetProperty("Longitude");
+
+ SIDSEntrySatSource=conf.GetProperty("SIDSEntrySatSource");
+ SIDSEntryUrl=conf.GetProperty("SIDSEntryUrl");
+ SIDSSatnogsSource=conf.GetProperty("SIDSSatnogsSource");
+ SIDSSatnogsURL=conf.GetProperty("SIDSSatnogsURL");
+ SIDSSatnogs=conf.GetProperty("SIDSSatnogs");
+ SIDSEntrySat=conf.GetProperty("SIDSEntrySat");
+ soundModemIP = conf.GetProperty("soundModemIP");
+ soundModemPort = conf.GetProperty("soundModemPort");
+ Norad = Integer.parseUnsignedInt(conf.GetProperty("NoradID").trim());
+ if (SIDSSatnogs.contentEquals("1") )
+ {
+ SISD_SatNogs=true;
+ } else
+ {
+ SISD_SatNogs=false;
+ }
+ if (SIDSEntrySat.contentEquals("1") )
+ {
+ SIDS_EntrySat=true;
+ } else
+ {
+ SIDS_EntrySat=false;
+ }
+
+ }
+ else // si le fichier n'existe pas, il est créé par défaut
+ {
+ save();
+ }
+
+
+
+ }
+
+
+ private static class SingletonHolder
+ {
+
+ private final static Configuration instance = new Configuration();
+ }
+
+
+
+ public String getCallsign() {
+ return callsign;
+ }
+
+ public void setCallsign(String callsign) {
+ this.callsign = callsign;
+ }
+
+ public String getLongitude() {
+ return longitude;
+ }
+
+ public void setLongitude(String longitude) {
+ this.longitude = longitude;
+ }
+
+ public String getLatitude() {
+ return latitude;
+ }
+
+ public void setLatitude(String latitude) {
+ this.latitude = latitude;
+ }
+
+ public String getSIDSEntrySatSource() {
+ return SIDSEntrySatSource;
+ }
+
+ public void setSIDSEntrySatSource(String sIDSEntrySatSource) {
+ SIDSEntrySatSource = sIDSEntrySatSource;
+ }
+
+ public String getSIDSEntryUrl() {
+ return SIDSEntryUrl;
+ }
+
+ public void setSIDSEntryUrl(String sIDSEntryUrl) {
+ SIDSEntryUrl = sIDSEntryUrl;
+ }
+
+ public String getSIDSSatnogsSource() {
+ return SIDSSatnogsSource;
+ }
+
+ public void setSIDSSatnogsSource(String sIDSSatnogsSource) {
+ SIDSSatnogsSource = sIDSSatnogsSource;
+ }
+
+ public String getSIDSSatnogsURL() {
+ return SIDSSatnogsURL;
+ }
+
+ public void setSIDSSatnogsURL(String sIDSSatnogsURL) {
+ SIDSSatnogsURL = sIDSSatnogsURL;
+ }
+
+ public String getSIDSSatnogs() {
+ return SIDSSatnogs;
+ }
+
+ public void setSIDSSatnogs(String sIDSSatnogs) {
+ SIDSSatnogs = sIDSSatnogs;
+ if (SIDSSatnogs.contentEquals("1") )
+ {
+ SISD_SatNogs=true;
+ } else
+ {
+ SISD_SatNogs=false;
+ }
+ }
+
+ public String getSIDSEntrySat() {
+ return SIDSEntrySat;
+ }
+
+ public void setSIDSEntrySat(String sIDSEntrySat) {
+ SIDSEntrySat = sIDSEntrySat;
+ if (SIDSEntrySat.contentEquals("1") )
+ {
+ SIDS_EntrySat=true;
+ } else
+ {
+ SIDS_EntrySat=false;
+ }
+ }
+
+ public String getSoundModemIP() {
+ return soundModemIP;
+ }
+
+ public void setSoundModemIP(String soundModemIP) {
+ this.soundModemIP = soundModemIP;
+ }
+
+ public String getSoundModemPort() {
+ return soundModemPort;
+ }
+
+ public void setSoundModemPort(String soundModemPort) {
+ this.soundModemPort = soundModemPort;
+ }
+
+ public void save() {
+
+ conf.SetProperty("Callsign",callsign);
+ conf.SetProperty("Latitude",latitude);
+ conf.SetProperty("Longitude",longitude);
+
+ conf.SetProperty("SIDSEntrySatSource",this.SIDSEntrySatSource);
+ conf.SetProperty("SIDSEntryUrl",this.SIDSEntryUrl);
+ conf.SetProperty("SIDSSatnogsSource",this.SIDSSatnogsSource);
+ conf.SetProperty("SIDSSatnogsURL",this.SIDSSatnogsURL);
+ conf.SetProperty("SIDSSatnogs",this.SIDSSatnogs);
+ conf.SetProperty("SIDSEntrySat",this.SIDSEntrySat);
+ conf.SetProperty("soundModemPort",this.soundModemPort);
+ conf.SetProperty("soundModemIP",this.soundModemIP);
+ conf.SetProperty("NoradID",""+this.Norad);
+ }
+
+ public int getNorad() {
+
+ return Norad;
+ }
+
+ public void setNorad(int norad) {
+
+ Norad=norad;
+ }
+
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Controler.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Controler.java
new file mode 100644
index 0000000000000000000000000000000000000000..47716716f950239768deff052fb0282e3f0d1feb
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Controler.java
@@ -0,0 +1,564 @@
+package org.josast.EntrysatDecoder;
+
+import java.awt.image.BufferedImage;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.logging.Logger;
+
+import javax.imageio.ImageIO;
+
+
+import org.josast.EntrySat.Telemetry;
+import org.josast.ModuleSoundModem.SoundModemConfiguration;
+import org.josast.SIDS.Station;
+import org.josast.kaikai.generated.FrameTlmEntrySat;
+import org.josast.kaikai.generated.FrameTlmEntrySat.Ax25Frame;
+import org.josast.kaikai.generated.FrameTlmEntrySat.UiFrameTlmEntrySat;
+import org.josast.propertyHttp.ConfigHttp;
+
+import javafx.application.Platform;
+import javafx.concurrent.WorkerStateEvent;
+import javafx.embed.swing.SwingFXUtils;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.fxml.FXML;
+import javafx.scene.control.Button;
+import javafx.scene.control.CheckBox;
+import javafx.scene.control.Label;
+import javafx.scene.control.TextArea;
+import javafx.scene.control.TextField;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+import javafx.stage.Window;
+import javafx.scene.control.Alert;
+
+public class Controler {
+
+ private static final String LINE_SEPARATOR = "\r\n";
+ private Logger log = Logger.getLogger("EntrySatLogger");
+ private String version = "0.8.1";
+
+ @FXML
+ private Button ButtonStart;
+ @FXML
+ private Button ButtonStop;
+ @FXML
+ private Button ButtonSave;
+ @FXML
+ private Label LabelIP;
+
+ @FXML
+ private Button ButtonFile;
+ @FXML
+ private Button ButtonSerial;
+ @FXML
+ private Button ButtonKiss;
+
+ @FXML
+ private TextField FieldIP;
+ @FXML
+ private TextField FieldPort;
+
+ @FXML
+ private Label labelStatus;
+ @FXML
+ private Label LabelFrame;
+
+ @FXML
+ private TextArea DecodedData;
+
+ @FXML
+ private TextArea TexAreaLog;
+
+ @FXML
+ private TextField textFieldMode;
+
+ @FXML
+ private TextField textFieldDate;
+
+ @FXML
+ private Label LabelInformation;
+ @FXML
+ private TextField textFieldbEps33VCurrent;
+ @FXML
+ private TextField TextFieldEps5VCurrent;
+ @FXML
+ private TextField TextFieldepsBattVcurrent;
+ @FXML
+ private TextField TextFieldEpsTemp;
+ @FXML
+ private TextField TextFieldTrxTemp;
+ @FXML
+ private TextField TextFieldEPSVBAT;
+
+ @FXML
+ private TextField TFBattTemp;
+
+ @FXML
+ private ImageView ImageViewAMSAT;
+
+ @FXML
+ private ImageView imageViewEntrysat;
+
+ @FXML
+ private TextField TextFieldCallsign;
+ @FXML
+ private TextField TextFieldLatitude;
+ @FXML
+ private TextField TextFieldLongitude;
+
+ @FXML
+ private CheckBox CheckbBoxEntrysat;
+ @FXML
+ private CheckBox CheckBoxSatNogs;
+
+ @FXML
+ private Button ButtonSaveConfiguration;
+
+ @FXML
+ TextField TextFieldSIDSEntrysat;
+ @FXML
+ TextField TextFieldSIDSSatnogs;
+
+ Stage primaryStage = null;
+
+ private String imgAmsat = "/logoAmsat.png";
+ private String imgEntrysat = "/logo_pour_decodeur.jpg";
+
+ Station station = new Station();
+
+ ModelFrame receivedFrame = new ModelFrame();
+
+ Configuration conf = Configuration.getInstance();
+
+ private TaskSoundmodemTCP task;
+ private SendSIDS SendSIDSSatnogs;
+ private SendSIDS SendSIDSEntrysat;
+ private PrintWriter pw;
+ Logger logger = Logger.getLogger("EntrySatLogger");
+
+ @FXML
+ private void HandleSaveConfiguration(ActionEvent event) {
+ Window owner = ButtonSaveConfiguration.getScene().getWindow();
+
+ String erreurmsg = null;
+ String Callsign = null;
+ if (TextFieldCallsign.getText().isEmpty()) {
+ erreurmsg += "please enter a CallSign \r\n";
+ } else {
+ Callsign = TextFieldCallsign.getText();
+ }
+
+ String Latitude = TextFieldLatitude.getText();
+ String Longitude = TextFieldLongitude.getText();
+
+ if (station.checkLatitude(Latitude) == false) {
+ erreurmsg += "Wrong format for Latitude : XX.XXE/W \r\n";
+ }
+
+ if (station.checkLongitude(Longitude) == false) {
+ erreurmsg += "Wrong format for Longitude : XX.XXS/N \r\n";
+ }
+ if (erreurmsg != null) {
+ AlertHelper.showAlert(Alert.AlertType.ERROR, owner, "Form Error!", erreurmsg);
+ return;
+ }
+
+ station.setCallsign(Callsign);
+ station.setLatitude(Latitude);
+ station.setLongitude(Longitude);
+
+ conf.setCallsign(Callsign);
+ conf.setLatitude(Latitude);
+ conf.setLongitude(Longitude);
+
+ conf.setSIDSEntrySatSource(TextFieldSIDSEntrysat.getText());
+ conf.setSIDSSatnogsSource(TextFieldSIDSSatnogs.getText());
+ conf.setSoundModemIP(FieldIP.getText());
+ conf.setSoundModemPort(FieldPort.getText());
+
+ Station StationSatnogs = new Station(conf.getSIDSSatnogsSource(), station.getLongitude(),
+ station.getLatitude());
+ Station StationEntry = new Station(conf.getSIDSEntrySatSource(), station.getLongitude(), station.getLatitude());
+
+ if (CheckbBoxEntrysat.isSelected() == true) {
+ conf.setSIDSEntrySat("1");
+ SendSIDSEntrysat = new SendSIDS(StationEntry, conf.getNorad(), conf.getSIDSEntryUrl());
+ } else {
+ conf.setSIDSEntrySat("0");
+
+ }
+
+ if (CheckBoxSatNogs.isSelected() == true) {
+ conf.setSIDSSatnogs("1");
+ SendSIDSSatnogs = new SendSIDS(StationSatnogs, conf.getNorad(), conf.getSIDSSatnogsURL());
+ } else {
+ conf.setSIDSSatnogs("0");
+ }
+
+ conf.save();
+
+ displayLog("Configuration Saved");
+ labelStatus.setText("Configuration Saved");
+ }
+
+ @FXML
+ private void handleStart(ActionEvent event) {
+
+ labelStatus.setText("KISS TCP Start");
+ displayLog("KISS TCP Start");
+ ButtonStop.setDisable(false);
+ ButtonStart.setDisable(true);
+ ButtonSave.setDisable(false);
+
+ SoundModemConfiguration smc = new SoundModemConfiguration("default");
+ smc.setIPadress(FieldIP.getText());
+ smc.setPort(Integer.parseInt(FieldPort.getText()));
+
+ if (task == null) {
+ receivedFrame.addPropertyChangeListener(new PropertyChangeListener() {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ final FrameTlmEntrySat tlmEntrySat = receivedFrame.getLastFrame();
+ final EntryFrame tlmEntrySatKISS = receivedFrame.getLastKissFrame();
+ if (conf.isSIDS_EntrySat()) {
+ // Generation SIDS
+ }
+ Platform.runLater(new Runnable() {
+ @Override
+ public void run() {
+ try {
+
+ if (tlmEntrySat != null) {
+
+ // update data
+ Ax25Frame ax = tlmEntrySat.frameTlmEntrySat();
+ DecodedData.appendText("destSsidRaw : " + ax.ax25Header().destSsidRaw() + "\t");
+ DecodedData.appendText("srcSsidRaw : " + ax.ax25Header().srcSsidRaw() + "\t");
+ DecodedData.appendText("destCallsign : "
+ + ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign()
+ + "\t");
+ DecodedData.appendText("srcCallsign : "
+ + ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign() + "\t");
+ DecodedData.appendText("ctl" + ax.ax25Header().ctl() + "\r\n");
+ displayLog(tlmEntrySatKISS.toString());
+ if ((ax.ax25Header().ctl() & 0x13) == 0x03) {
+ // identified trame
+
+ displayLog("Entrysat Telemetry Identified \r\n");
+ UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
+ // verifie que c'est bien la trame avec SID 6
+ if (Ui.telemetryData().sid() == 6) {
+
+ Telemetry tlm = new Telemetry();
+ tlm.setValue(tlmEntrySat.frameTlmEntrySat());
+ DecodedData.appendText(tlm.toStringHeader());
+ DecodedData.appendText(tlm.afficheTLM());
+ textFieldDate.setText(tlm.getTimetoSting());
+ textFieldMode.setText(tlm.getValueDecoded(Telemetry.ModeSafe));
+ textFieldbEps33VCurrent.setText(tlm.getValueDecoded(Telemetry.EPS_3_3V_C));
+ TextFieldEps5VCurrent.setText(tlm.getValueDecoded(Telemetry.EPS_5_V_C));
+ TextFieldepsBattVcurrent
+ .setText(tlm.getValueDecoded(Telemetry.EPS_BATT_VCURRENT));
+ TextFieldEpsTemp.setText(tlm.getValueDecoded(Telemetry.EPS_TEMP));
+ TextFieldTrxTemp.setText(tlm.getValueDecoded(Telemetry.TRX_TEMP));
+ TFBattTemp.setText(tlm.getValueDecoded(Telemetry.BATT_TEMP));
+ TextFieldEPSVBAT.setText(tlm.getValueDecoded(Telemetry.EPS_VBATT));
+ }
+ else
+ {
+ displayLog("Entrysat Telemetry with SID : "+Ui.telemetryData().sid()+"\r\n");
+ }
+ }
+ updateFrame(receivedFrame.getNumberFrame());
+
+ if (conf.isSIDS_EntrySat() == true) {
+ int results = SendSIDSEntrysat.Send(tlmEntrySatKISS );
+ displayLog("Send SIDS ENtry Sat ; "+results);
+ }
+
+ if (conf.isSISD_SatNogs() == true) {
+ int results = SendSIDSSatnogs.Send(tlmEntrySatKISS );
+ displayLog("Send SIDS Sat NOGS : "+results );
+ }
+
+ } else {
+ displayLog("received frame : null");
+ }
+
+ } catch (Exception e) {
+ displayLog("Run - error");
+ displayLog(e.toString());
+ e.printStackTrace();
+ }
+
+ }
+
+ });
+ }
+
+ }
+
+ );
+
+ }
+ task = new TaskSoundmodemTCP(smc, receivedFrame);
+
+ task.setOnSucceeded(new EventHandler() {
+
+ @Override
+ public void handle(WorkerStateEvent event) {
+ // La tache s'est correctement terminee.
+
+ labelStatus.setText("KISS TCP DISCONNECTED");
+ displayLog("KISS TCP DISCONNECTED");
+ ButtonStop.setDisable(true);
+ ButtonStart.setDisable(false);
+ ButtonSave.setDisable(false);
+ }
+
+ });
+
+ task.setOnFailed(new EventHandler() {
+
+ @Override
+ public void handle(WorkerStateEvent event) {
+ // La tache s'est correctement terminee.
+ displayLog("Deconnection");
+ displayLog(event.toString());
+ displayLog(event.getSource().toString());
+
+ labelStatus.setText("KISS TCP CONNECTION FAILED");
+ displayLog("KISS TCP DISCONNECTED - Connection failed");
+ ButtonStop.setDisable(true);
+ ButtonStart.setDisable(false);
+ ButtonSave.setDisable(false);
+ }
+
+ });
+
+ Thread backgroundThread = new Thread(task);
+ backgroundThread.setDaemon(true);
+ backgroundThread.start();
+
+ }
+
+ @FXML
+ private void handleStop(ActionEvent event) {
+
+ ButtonStop.setDisable(true);
+ ButtonStart.setDisable(false);
+ ButtonSave.setDisable(false);
+ task.arreter();
+
+ labelStatus.setText("Stop received data");
+ displayLog("Stop task to receive telemetrie");
+ }
+
+ @FXML
+ private void handleSave(ActionEvent event) {
+
+ ButtonStop.setDisable(true);
+ ButtonStart.setDisable(false);
+ ButtonSave.setDisable(true);
+ saveDataFile();
+ labelStatus.setText("Data Saved");
+ displayLog("Telemetry Data saved in file");
+ }
+
+ @FXML
+ private void HandleIP(ActionEvent event) {
+ }
+
+ @FXML
+ private void HandlePort(ActionEvent event) {
+ }
+
+ /**
+ * Save telemetry data received in text file. The file is stored in data folder.
+ */
+ public void saveDataFile() {
+ SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd-HHmmss");
+ Date aujourdhui = new Date();
+
+ //
+
+ String path = System.getProperty("user.dir") + "/data";
+ File apath = new File(path);
+
+ if (!apath.exists()) {
+ if (apath.mkdir() == false) {
+ log.severe("fail to create " + path);
+ }
+ }
+
+ PrintWriter pw = null;
+
+ long NbFrame = receivedFrame.getNumberFrame();
+
+ try {
+ pw = new PrintWriter(new FileWriter(path + "/" + formater.format(aujourdhui) + "-tlm-Hexa.txt"));
+ for (int i = 0; i < NbFrame; i++) {
+ pw.write(receivedFrame.getFrame(i));
+ pw.write(LINE_SEPARATOR);
+ }
+
+ pw.flush();
+ pw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private void updateFrame(long nbframe) {
+ LabelFrame.setText("frame : " + nbframe);
+
+ }
+
+
+ public void initMMI() {
+
+ // initialise le log
+ initdisplayLogFile();
+ displayLog("ENTRY SAT - LOG ");
+ log.warning("Initialise ");
+ primaryStage.setTitle("EntrySat Decoder - " + version);
+
+ station.setCallsign(conf.getCallsign());
+ station.setLatitude(conf.getLatitude());
+ station.setLongitude(conf.getLongitude());
+
+ TextFieldCallsign.setText(station.getCallsign());
+ TextFieldLatitude.setText(station.getLatitude());
+ TextFieldLongitude.setText(station.getLongitude());
+
+ TextFieldSIDSEntrysat.setText(conf.getSIDSEntrySatSource());
+ TextFieldSIDSSatnogs.setText(conf.getSIDSSatnogsSource());
+
+
+ if (conf.isSIDS_EntrySat()) {
+ CheckbBoxEntrysat.setSelected(true);
+ }
+ if (conf.isSISD_SatNogs()) {
+ CheckBoxSatNogs.setSelected(true);
+ }
+
+ displayLog(conf.getSIDSSatnogsURL());
+ displayLog(conf.getSIDSEntryUrl());
+ displayLog("Initialisation with Properties File Done ");
+
+ BufferedImage bufferedImage1 = null;
+ BufferedImage bufferedImage2 = null;
+ try {
+ bufferedImage1 = ImageIO.read(getClass().getResource((imgAmsat)));
+ bufferedImage2 = ImageIO.read(getClass().getResource((imgEntrysat)));
+ } catch (IOException e) {
+
+ log.severe("Error loading Image resources");
+ log.severe(e.toString());
+ }
+ Image imageamsat = SwingFXUtils.toFXImage(bufferedImage1, null);
+ ;
+ ImageViewAMSAT.setImage(imageamsat);
+ Image imgQB = SwingFXUtils.toFXImage(bufferedImage2, null);
+ ;
+ imageViewEntrysat.setImage(imgQB);
+
+// ConfigHttp c = new ConfigHttp("http://amsat-f.org/sitewordpress/Documents/EntrysatVersion.txt");
+ ConfigHttp c = new ConfigHttp("http://site.amsat-f.org/download/116451");
+ String ver;
+ String message;
+ int NoradIdConf=conf.getNorad();
+ if(c.isConnected())
+ {
+ ver = c.GetProperty("EntrySatVersion");
+ message = c.GetProperty("Message");
+ NoradIdConf= Integer.parseUnsignedInt(c.GetProperty("NoradID").trim());
+ }
+ else
+ {
+ ver = version;
+ message = "not connected to internet";
+ }
+ if (NoradIdConf!=conf.getNorad())
+ {
+ conf.setNorad(NoradIdConf);
+ conf.save();
+ displayLog("Norad ID updated ");
+ }
+ ButtonStop.setDisable(true);
+ ButtonStart.setDisable(false);
+ ButtonSave.setDisable(true);
+ this.LabelInformation.setText("");
+
+ // initialise SIDS
+
+ Station StationSatnogs = new Station(conf.getSIDSSatnogsSource(), station.getLongitude(),
+ station.getLatitude());
+ Station StationEntry = new Station(conf.getSIDSEntrySatSource(), station.getLongitude(), station.getLatitude());
+
+ if (conf.isSISD_SatNogs() == true) {
+ SendSIDSSatnogs = new SendSIDS(StationSatnogs, conf.getNorad(), conf.getSIDSSatnogsURL());
+ }
+
+ if (conf.isSIDS_EntrySat() == true) {
+ SendSIDSEntrysat = new SendSIDS(StationEntry, conf.getNorad(), conf.getSIDSEntryUrl());
+ }
+
+ String erreurmsg = message;
+
+ if (ver.equals(version) == false) {
+ erreurmsg += " New version " + ver + " available ! ";
+
+ }
+ this.LabelInformation.setText(erreurmsg);
+
+ }
+
+ public void setPrimaryStage(Stage primaryStage) {
+ this.primaryStage = primaryStage;
+
+ }
+
+ private void displayLog(String log) {
+ pw.println(log);
+ pw.flush();
+ logger.info(log);
+ TexAreaLog.appendText(log);
+ TexAreaLog.appendText("\r\n");
+ }
+
+ private void initdisplayLogFile()
+ {
+ SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd-HHmmss");
+ Date aujourdhui = new Date();
+
+ //
+
+ String path = System.getProperty("user.dir") + "/log";
+ File apath = new File(path);
+
+ if (!apath.exists()) {
+ if (apath.mkdir() == false) {
+ log.severe("fail to create " + path);
+ }
+ }
+ try {
+ pw = new PrintWriter (new FileWriter(path+"/"+formater.format(aujourdhui)+"-"+".log"));
+ displayLog("log error during decoding data");
+
+ } catch (IOException e) {
+ logger.severe("erreur creating log file");
+ logger.severe (e.toString());
+ }
+ }
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntrsatDecoder.fxml b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntrsatDecoder.fxml
new file mode 100644
index 0000000000000000000000000000000000000000..48643dccaaed67d5b2ab00e52b6858e7f1c5fa9f
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntrsatDecoder.fxml
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntryFrame.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntryFrame.java
new file mode 100644
index 0000000000000000000000000000000000000000..5808dc174435ba5b45cdd9a6f93dd45b3036b362
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/EntryFrame.java
@@ -0,0 +1,59 @@
+package org.josast.EntrysatDecoder;
+
+import java.util.Date;
+
+import org.josast.AX25.KissData;
+
+/**
+ * @author christophe
+ *
+ */
+public class EntryFrame {
+
+ private Date time;
+
+ private KissData Frame;
+
+ public EntryFrame(Date time, KissData frame) {
+ super();
+ this.time = time;
+ Frame = frame;
+ }
+
+ public Date getTime() {
+ return time;
+ }
+
+
+
+ public void setTime(Date time) {
+ this.time = time;
+ }
+
+
+
+ public KissData getFrame() {
+ return Frame;
+ }
+
+
+
+ public void setFrame(KissData frame) {
+ Frame = frame;
+ }
+
+
+
+
+
+
+
+
+ @Override
+ public String toString() {
+ return "EntrySatFrame [time=" + time + "][ Frame=" + Frame.toString() + "]";
+ }
+
+
+
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Main.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Main.java
new file mode 100644
index 0000000000000000000000000000000000000000..8d1a4a95b6c80fd119e7d6d9d75875917ef0d6de
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/Main.java
@@ -0,0 +1,82 @@
+/**
+ *
+ */
+package org.josast.EntrysatDecoder;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.util.logging.FileHandler;
+import java.util.logging.Logger;
+
+/**
+ * @author christophe
+ *
+ */
+import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
+import javafx.scene.layout.BorderPane;
+import javafx.stage.Stage;
+
+public class Main extends Application {
+
+ Logger logger = Logger.getLogger("EntrySatLogger");
+
+ @Override
+ public void init() throws Exception {
+ super.init();
+
+
+
+
+ }
+
+ @Override
+ public void start(Stage primaryStage)throws Exception {
+
+ try {
+ String path = System.getProperty("user.dir")+"/log";
+ File apath = new File(path);
+
+ if (!apath.exists())
+ {
+ if (apath.mkdir() == false)
+ {
+ System.err.println("fail to create "+ path);
+ }
+ }
+ FileHandler fh=new FileHandler(path+"/"+"EntrySatLog.txt");
+
+ logger.addHandler(fh);
+
+ } catch (SecurityException e) {
+
+ e.printStackTrace();
+
+ } catch (IOException e) {
+
+ e.printStackTrace();
+
+ }
+ //---Chargement du fichier FXML
+ System.setProperty("glass.accessible.force", "false");
+ FXMLLoader loader= new FXMLLoader(getClass().getResource("EntrsatDecoder.fxml"));
+ BorderPane root= loader.load();
+ Controler ctrl = loader.getController();
+ ctrl.setPrimaryStage(primaryStage);
+ Scene scene= new Scene(root);
+ scene.getStylesheets().add("/BasicApplication.css");
+ primaryStage.setScene(scene);
+ primaryStage.setTitle("Entry Sat Decoder");
+ ctrl.initMMI();
+
+ primaryStage.show();
+ }
+
+
+ public static void main(String[] args) {
+
+ launch(args);
+ }
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/ModelFrame.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/ModelFrame.java
new file mode 100644
index 0000000000000000000000000000000000000000..416a41689433598a125b27cc822c08e83c40c2b1
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/ModelFrame.java
@@ -0,0 +1,78 @@
+package org.josast.EntrysatDecoder;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.Date;
+import java.util.Vector;
+
+import org.josast.AX25.KissData;
+import org.josast.kaikai.generated.FrameTlmEntrySat;
+import org.josast.kaikai.generated.FrameTlmEntrySat.Ax25Frame;
+
+import io.kaitai.struct.ByteBufferKaitaiStream;
+
+public class ModelFrame {
+
+ long numberFrame = 0;
+ Vector vect=new Vector();
+ Vector vecKiss = new Vector();
+ private PropertyChangeSupport listenerList = new PropertyChangeSupport(this);
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ listenerList.addPropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ listenerList.removePropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ listenerList.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ listenerList.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+
+ public long getNumberFrame() {
+ return numberFrame;
+ }
+
+
+
+ public FrameTlmEntrySat getLastFrame() {
+ return vect.lastElement();
+ }
+
+ public EntryFrame getLastKissFrame() {
+ return vecKiss.lastElement();
+ }
+
+ public void addFrame(int nb, byte[] cbuf) {
+ long oldNumberFrame = numberFrame;
+ numberFrame++;
+ try {
+ // try to decode
+ FrameTlmEntrySat frame = new FrameTlmEntrySat(new ByteBufferKaitaiStream (cbuf) );
+ Ax25Frame ax = frame.frameTlmEntrySat();
+ System.out.println(ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
+ vect.addElement(frame);
+ EntryFrame EntryFrame = new EntryFrame(new Date(), new KissData(cbuf, nb));
+ vecKiss.addElement(EntryFrame);
+ listenerList.firePropertyChange("numberFrame", oldNumberFrame, numberFrame);
+
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+ public String getFrame(int i) {
+
+ return vecKiss.get(i).toString();
+ }
+
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/SendSIDS.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/SendSIDS.java
new file mode 100644
index 0000000000000000000000000000000000000000..d3a23291bf261d14137a8df3febd0912b4affc4b
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/SendSIDS.java
@@ -0,0 +1,38 @@
+package org.josast.EntrysatDecoder;
+
+
+import org.josast.SIDS.HttpPostSIDS;
+import org.josast.SIDS.SIDSData;
+import org.josast.SIDS.Station;
+
+/**
+ *
+ * @author christophe
+ *
+ */
+public class SendSIDS {
+
+ SIDSData sids = new SIDSData();
+ HttpPostSIDS client;
+
+ public SendSIDS ( Station station, int norad, String url)
+ {
+ sids.setStation(station);
+ sids.setNoradID(norad);
+ client = new HttpPostSIDS(url);
+
+
+ }
+
+ public int Send(EntryFrame data)
+ {
+ //BasicConfigurator.configure();
+
+ sids.setTelemetryData(data.getTime(),data.getFrame().toString());
+ System.out.println(sids.toStringBasic());
+ int result = client.SendSIDSBasic(sids);
+ return result;
+
+ }
+
+}
diff --git a/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/TaskSoundmodemTCP.java b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/TaskSoundmodemTCP.java
new file mode 100644
index 0000000000000000000000000000000000000000..b4e25b5ac0d502b0b61bff0f1dc89162737eafab
--- /dev/null
+++ b/ApplicationEntrySatDecoder/src/main/java/org/josast/EntrysatDecoder/TaskSoundmodemTCP.java
@@ -0,0 +1,79 @@
+package org.josast.EntrysatDecoder;
+
+import java.util.logging.Logger;
+
+import org.josast.AX25.KissData;
+import org.josast.AX25.KissFrame;
+import org.josast.ModuleSoundModem.SoundModemClient;
+import org.josast.ModuleSoundModem.SoundModemConfiguration;
+
+import javafx.concurrent.Task;
+
+public class TaskSoundmodemTCP extends Task {
+
+ private Logger log = Logger.getLogger("EntrySatLogger");
+
+ private volatile boolean running = true;
+
+ SoundModemConfiguration smConfiguration = null;
+ SoundModemClient smc = null;
+ ModelFrame receivedFrame = null;
+
+ public TaskSoundmodemTCP(SoundModemConfiguration smConfiguration, ModelFrame receivedFrame) {
+ this.smConfiguration = smConfiguration;
+ smc = new SoundModemClient(smConfiguration);
+ if (smc.isOpen() == false) {
+ this.failed();
+ }
+ this.receivedFrame = receivedFrame;
+
+ }
+
+ public TaskSoundmodemTCP(ModelFrame receivedFrame) {
+ // update from soundmodem
+ smConfiguration = new SoundModemConfiguration("default");
+ smc = new SoundModemClient(smConfiguration);
+ if (smc.isOpen() == false) {
+ this.failed();
+ }
+ this.receivedFrame = receivedFrame;
+ }
+
+ @Override
+ protected String call() {
+ try {
+ KissFrame kf=new KissFrame();
+ byte cbuf[] = new byte[1060];
+ while (running == true) {
+ int nb = smc.receiveData(cbuf);
+ KissData kissData = kf.extactMessage(cbuf, nb);
+ receivedFrame.addFrame(kissData.getSize(), kissData.getData());
+ this.updateValue(receivedFrame.toString());
+
+ }
+ } catch (Exception e) {
+ log.severe("Erreur SoundModem not available");
+ log.severe(e.toString());
+ e.printStackTrace();
+ this.failed();
+
+ }
+ return receivedFrame.toString();
+ }
+
+
+
+ public void arreter() {
+
+ this.running = false;
+
+ }
+
+ public void redemarrer()
+ {
+
+ this.running = true;
+
+ }
+
+}
diff --git a/ApplicationEntrySatDecoder/src/test/ressources/FlatSat.wav b/ApplicationEntrySatDecoder/src/test/ressources/FlatSat.wav
new file mode 100644
index 0000000000000000000000000000000000000000..3cbfb9a8434bd0ac64d9e21d6e2f13a1471c082c
Binary files /dev/null and b/ApplicationEntrySatDecoder/src/test/ressources/FlatSat.wav differ
diff --git a/ModuleEntrySatTelemetry/pom.xml b/ModuleEntrySatTelemetry/pom.xml
index 06aa53c77391c292859fd8aa9f88cb87e8a67ef3..f8c78fc0348b17120955fadbce4e77d1c458ad9a 100644
--- a/ModuleEntrySatTelemetry/pom.xml
+++ b/ModuleEntrySatTelemetry/pom.xml
@@ -5,49 +5,28 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.josast
+
+ org.josast
+ JOSAST-parent
+ 0.0.2-SNAPSHOT
+
+
+
+
ModuleEntrySatTelemetry
0.0.1-SNAPSHOT
-
ModuleEntrySatTelemetry
-
- http://www.amsat-francophone.org
+
+ http://www.amsat-f.org
-
+
1.8
1.8
- ${env.JAVA_HOME}
-
-
- 2.8
- 2.3.2
- 2.8
- 2.8
- 1.3
- 2.8.1
- 2.3
- 3.12.0
- 2.2.2
- 3.4
- 2.3
- 2.1.2
- 2.13
- 2.12
- 2.2
- 2.6
- 1.3.1
-
- ${project.basedir}/code-analysis/checkstyle.xml
-
- ${project.basedir}/code-analysis/pmd.xml
-
- false
- false
- false
- false
- false
-
+ 1.4
+ 0.1.5
+ 0.8
+ 1.2.17
@@ -63,560 +42,26 @@
commons-cli
commons-cli
- 1.4
+ ${commons-cli.version}
-
name.valery1707.kaitai
kaitai-maven-plugin
- 0.1.4
-
-
-
+ ${kaitai-maven-plugin.version}
-
io.kaitai
kaitai-struct-runtime
- 0.8
+ ${kaitai-struct-runtime.version}
-
log4j
log4j
- 1.2.17
+ ${log4j.version}
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- 2.8
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-changelog-plugin
- ${plugin.maven-changelog.version}
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- 2.3
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-source-plugin
- ${plugin.source.version}
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- ${plugin.enforcer.version}
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${plugin.compiler.version}
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${plugin.surefire.version}
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
- ${plugin.failsafe.version}
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
- ${plugin.jxr.version}
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
- ${plugin.checkstyle.version}
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
- ${plugin.pmd-plugin.version}
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${plugin.javadoc.version}
-
-
- org.codehaus.mojo
- versions-maven-plugin
- ${plugin.versions-maven.version}
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
- ${plugin.cobertura-maven.version}
-
-
- org.codehaus.mojo
- findbugs-maven-plugin
- 2.4.0
-
-
- org.codehaus.mojo
- taglist-maven-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-release-plugin
- ${plugin.release.version}
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- ${plugin.dependency.version}
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${plugin.deploy.version}
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
- true
-
-
-
- generate-sources
- verify
-
- jar-no-fork
-
-
-
-
-
- maven-site-plugin
- ${plugin.site.version}
-
-
- org.apache.maven.wagon
- wagon-ssh
- ${plugin.wagon-ssh.version}
-
-
-
- true
-
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
-
- false
- false
-
-
-
-
- summary
- project-team
- dependencies
- issue-tracking
-
- modules
- plugins
-
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
- ${checkstyle.skip}
- ${maven-checkstyle-plugin.configLocation}
- false
- true
- true
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
- ${pmd.skip}
- ${maven.compiler.source}
- ${project.build.sourceEncoding}
-
-
- /rulesets/basic.xml
- /rulesets/unnecessary.xml
-
-
- false
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- ${javadocs.skip}
- false
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
-
- dependency-updates-report
- plugin-updates-report
- property-updates-report
-
-
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
-
- ${cobertura.skip}
-
-
-
- org.codehaus.mojo
- findbugs-maven-plugin
-
- ${findbugs.skip}
- true
-
-
-
- org.codehaus.mojo
- taglist-maven-plugin
-
- ${project.build.sourceEncoding}
- en
-
-
-
- Code sections needing review
-
-
- REVIEWREQUIRED
- exact
-
-
-
-
- Todo Work
-
-
- todo
- ignoreCase
-
-
- @todo
- ignoreCase
-
-
-
-
- Noted Bugs
-
- fixme
- ignoreCase
-
-
-
- Deprecated Items
-
- @deprecated
- ignoreCase
-
-
-
-
-
-
-
-
-
-
- attach-descriptor
-
- attach-descriptor
-
-
-
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
-
- ${cobertura.skip}
- 1024m
-
- html
- xml
-
-
- false
-
- 70
- 70
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- **/*.class
-
-
- **/model/*.class
-
-
-
-
-
- clean
- clean
-
- clean
-
-
-
- package
- package
-
- check
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
-
- true
-
-
-
- process-resources
-
- jxr
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- false
- ${javadocs.skip}
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- alphabetical
- false
- ${surefire.jvm.args}
-
-
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
- integration-test
-
- integration-test
-
-
-
- verify
-
- verify
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
- ${pmd.skip}
- ${maven.compiler.source}
- ${project.build.sourceEncoding}
-
-
- ${maven-pmd-plugin.configLocation}
-
- false
-
-
-
- verify
-
- check
- cpd-check
-
-
-
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- 6.1.10
-
- 5
- foo
- 9999
-
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
- ${checkstyle.skip}
- ${maven-checkstyle-plugin.configLocation}
- false
- true
- true
-
-
-
- run-checkstyle
- verify
-
- checkstyle
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- enforce-property
- generate-sources
-
- enforce
-
-
-
-
- java.16.home
-
-
- Required 'java.16.home' property not defined.
- Typically found in
- settings.xml
-
-
-
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- true
- true
-
- ${java.16.home}/bin/javac
- ${jdk.version}
-
- ${maven.compiler.target}
- 128m
- 512m
- Cp1252
-
-
-
-
-
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/Telemetry.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/Telemetry.java
index 8414d29418ee37b73e2696379fc9f03bf70cef2e..1cedd0bafaa71a1a6b36d8c5727424d15c1b87ee 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/Telemetry.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/Telemetry.java
@@ -16,12 +16,11 @@ import org.josast.kaikai.generated.FrameTlmEntrySat.UiFrameTlmEntrySat;
/**
* This class give access to data form Entrysat TLM data
+ *
* @author christophe
- *
+ *
*/
-public class Telemetry {
-
-
+public class Telemetry {
public static final String BATT_TEMP = "BATT TEMP";
public static final String EPS_TEMP = "EPS TEMP";
@@ -33,23 +32,21 @@ public class Telemetry {
public static final String SID = "SID";
public static final String EPS_BATT_VCURRENT = "EPS BATTVCURRENT";
// private static final String TIME = "Time";
-
- private SimpleDateFormat ft = new SimpleDateFormat ("dd MM yyyy - HH:mm:ss zzz");
-
+
+ private SimpleDateFormat ft = new SimpleDateFormat("dd MM yyyy - HH:mm:ss zzz");
+
+ /**
+ * dataDescription list with description of each telemetry data
+ */
+ private Hashtable dataDescription = new Hashtable();
/**
- * dataDescription list with description of each telemetry data
+ * dataValue list to store value of 1 frame
*/
- private Hashtable dataDescription = new Hashtable();
- /**
- * dataValue list to store value of 1 frame
- */
- private Hashtable dataValue = new Hashtable();
-
-
+ private Hashtable dataValue = new Hashtable();
private String timeformat;
private long timeFrame;
-
+
/**
*
*/
@@ -62,145 +59,145 @@ public class Telemetry {
*/
private void init() {
-
- dataDescription.put(SID,new TlmData(SID, new xEqx(), "","%.0f"));
- dataDescription.put(ModeSafe,new TlmData(ModeSafe, new xEqx(), "","%2.0f"));
- dataDescription.put(EPS_VBATT,new TlmData(EPS_VBATT, new AxBEqx(0.05, 3.0 ) , "","%.5f"));
- dataDescription.put(EPS_BATT_VCURRENT,new TlmData(EPS_BATT_VCURRENT, new AxBEqx(0.0078740, -1.0 ) , "","%.3f"));
- dataDescription.put(EPS_3_3V_C,new TlmData(EPS_3_3V_C, new AxBEqx(0.025,0 ) , "","%.5f"));
- dataDescription.put(EPS_5_V_C,new TlmData(EPS_5_V_C, new AxBEqx(0.025,0 ) , "","%.5f"));
- dataDescription.put(TRX_TEMP,new TlmData(TRX_TEMP, new AxBEqx(0.25, -15.0 ) , "","%.3f"));
- dataDescription.put(EPS_TEMP,new TlmData(EPS_TEMP, new AxBEqx(0.25, -15.0) , "","%.3f"));
- dataDescription.put(BATT_TEMP,new TlmData(BATT_TEMP, new AxBEqx(0.25, -15.0 ) , "","%.3f"));
-
+
+ dataDescription.put(SID, new TlmData(SID, new xEqx(), "", "%.0f"));
+ dataDescription.put(ModeSafe, new TlmData(ModeSafe, new xEqx(), "", "%2.0f"));
+ dataDescription.put(EPS_VBATT, new TlmData(EPS_VBATT, new AxBEqx(0.05, 3.0), "", "%.5f"));
+ dataDescription.put(EPS_BATT_VCURRENT, new TlmData(EPS_BATT_VCURRENT, new AxBEqx(0.0078740, -1.0), "", "%.3f"));
+ dataDescription.put(EPS_3_3V_C, new TlmData(EPS_3_3V_C, new AxBEqx(0.025, 0), "", "%.5f"));
+ dataDescription.put(EPS_5_V_C, new TlmData(EPS_5_V_C, new AxBEqx(0.025, 0), "", "%.5f"));
+ dataDescription.put(TRX_TEMP, new TlmData(TRX_TEMP, new AxBEqx(0.25, -15.0), "", "%.3f"));
+ dataDescription.put(EPS_TEMP, new TlmData(EPS_TEMP, new AxBEqx(0.25, -15.0), "", "%.3f"));
+ dataDescription.put(BATT_TEMP, new TlmData(BATT_TEMP, new AxBEqx(0.25, -15.0), "", "%.3f"));
+
}
-
+
public static int unsignedByteToInt(byte b) {
- return (int) b & 0xFF;
- }
-
-
+ return (int) b & 0xFF;
+ }
+
/**
- * From an Ax25Frame (generated by Kaitai), the function extract data and fill hastable with value
+ * From an Ax25Frame (generated by Kaitai), the function extract data and fill
+ * hastable with value
+ *
* @param ax Ax25Frame
*/
- public void setValue(Ax25Frame ax )
- {
-
+ public void setValue(Ax25Frame ax) {
+
UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
TelemetryDataFiledHearder TDF = Ui.telemetryDataFiledHearder();
-
- // Compute time
-
+
+ // Compute time
+
byte[] b = TDF.time2();
- long times = unsignedByteToInt(b[0])*256*256*256+unsignedByteToInt(b[1])*256*256+unsignedByteToInt(b[2])*256+unsignedByteToInt(b[3]);
- long timems = (long) ((float) (unsignedByteToInt(b[4])/256.0)*1000);
- GregorianCalendar gcalendar = new GregorianCalendar(2000,0,1,0,0,0);
- Date time = gcalendar.getTime();
- long value = time.getTime();
- value = value + times*1000;
- value = value + timems;
- time.setTime(value);
- setTimeFrame(value);
- timeformat = ft.format(time);
-
- dataValue.put(SID,Ui.telemetryData().sid());
- dataValue.put(ModeSafe,Ui.telemetryData().modeSafe());
- dataValue.put(EPS_VBATT,Ui.telemetryData().epsVbatt() );
- dataValue.put(EPS_BATT_VCURRENT,Ui.telemetryData().epsBattVcurrent() );
- dataValue.put(EPS_3_3V_C,Ui.telemetryData().eps33VCurrent() );
- dataValue.put(EPS_5_V_C,Ui.telemetryData().eps5VCurrent() );
+ long times = unsignedByteToInt(b[0]) * 256 * 256 * 256 + unsignedByteToInt(b[1]) * 256 * 256
+ + unsignedByteToInt(b[2]) * 256 + unsignedByteToInt(b[3]);
+ long timems = (long) ((float) (unsignedByteToInt(b[4]) / 256.0) * 1000);
+ GregorianCalendar gcalendar = new GregorianCalendar(2000, 0, 1, 0, 0, 0);
+ Date time = gcalendar.getTime();
+ long value = time.getTime();
+ value = value + times * 1000;
+ value = value + timems;
+ time.setTime(value);
+ setTimeFrame(value);
+ timeformat = ft.format(time);
+
+ dataValue.put(SID, Ui.telemetryData().sid());
+ dataValue.put(ModeSafe, Ui.telemetryData().modeSafe());
+ dataValue.put(EPS_VBATT, Ui.telemetryData().epsVbatt());
+ dataValue.put(EPS_BATT_VCURRENT, Ui.telemetryData().epsBattVcurrent());
+ dataValue.put(EPS_3_3V_C, Ui.telemetryData().eps33VCurrent());
+ dataValue.put(EPS_5_V_C, Ui.telemetryData().eps5VCurrent());
dataValue.put(TRX_TEMP, Ui.telemetryData().trxTemp());
- dataValue.put(EPS_TEMP, Ui.telemetryData().epsTemp());
- dataValue.put(BATT_TEMP,Ui.telemetryData().battTemp() );
+ dataValue.put(EPS_TEMP, Ui.telemetryData().epsTemp());
+ dataValue.put(BATT_TEMP, Ui.telemetryData().battTemp());
}
-
+
/**
- * @return TIME - time interpreted
+ * @return TIME - time interpreted
*/
- public String getTimetoSting()
- {
+ public String getTimetoSting() {
return timeformat;
}
-
+
/**
* return string with all decoded value of the frame
+ *
* @return String with all decoded data, ";' is used as separator
*/
- public String afficheTLM( ) {
-
- StringBuilder stringBuilder = new StringBuilder();
- Set keys = dataDescription.keySet();
-
- //Obtaining iterator over set entries
- Iterator itr = keys.iterator();
- String strvalue;
- //Displaying Key and value pairs
- while (itr.hasNext()) {
- // Getting Key
- strvalue = itr.next();
-
- TlmData tlm = dataDescription.get(strvalue);
- int value = dataValue.get(strvalue);
- String valueS= String.format(tlm.getFormat(), tlm.getFormulae().calcul(value));
- stringBuilder.append(valueS);
- stringBuilder.append(";\t");
- }
-
- stringBuilder.append("\r\n");
- return stringBuilder.toString();
+ public String afficheTLM() {
+
+ StringBuilder stringBuilder = new StringBuilder();
+ Set keys = dataDescription.keySet();
+
+ // Obtaining iterator over set entries
+ Iterator itr = keys.iterator();
+ String strvalue;
+ // Displaying Key and value pairs
+ while (itr.hasNext()) {
+ // Getting Key
+ strvalue = itr.next();
+
+ TlmData tlm = dataDescription.get(strvalue);
+ int value = dataValue.get(strvalue);
+ String valueS = String.format(tlm.getFormat(), tlm.getFormulae().calcul(value));
+ stringBuilder.append(valueS);
+ stringBuilder.append(";\t");
+ }
+
+ stringBuilder.append("\r\n");
+ return stringBuilder.toString();
}
-
-
/**
* Compute the raw value with formulea and format the string
- * @param dataName
- * @return value interpreted
+ *
+ * @param dataName
+ * @return value interpreted
*/
- public String getValueDecoded(String dataName )
- {
-
- TlmData tlm = dataDescription.get(dataName);
- int value = dataValue.get(dataName);
- return String.format(tlm.getFormat(), tlm.getFormulae().calcul(value));
+ public String getValueDecoded(String dataName) {
+
+ TlmData tlm = dataDescription.get(dataName);
+ int value = dataValue.get(dataName);
+ return String.format(tlm.getFormat(), tlm.getFormulae().calcul(value));
}
/**
- * Compute the raw value with formulea
- * @param dataName
- * @return value interpreted
+ * Compute the raw value with formulea
+ *
+ * @param dataName
+ * @return value interpreted
*/
- public double getValueDec(String dataName )
- {
-
- TlmData tlm = dataDescription.get(dataName);
- int value = dataValue.get(dataName);
- return tlm.getFormulae().calcul(value);
+ public double getValueDec(String dataName) {
+
+ TlmData tlm = dataDescription.get(dataName);
+ int value = dataValue.get(dataName);
+ return tlm.getFormulae().calcul(value);
}
-
+
/**
* display list of data decoded
+ *
* @return name of data decoded separated by ","
*/
public String toStringHeader() {
StringBuilder stringBuilder = new StringBuilder();
- Set keys = dataDescription.keySet();
-
- //Obtaining iterator over set entries
- Iterator itr = keys.iterator();
- String strvalue;
- //Displaying Key and value pairs
- while (itr.hasNext()) {
- // Getting Key
- strvalue = itr.next();
-
- stringBuilder.append(strvalue);
- stringBuilder.append(";\t");
- }
-
- stringBuilder.append("\r\n");
+ Set keys = dataDescription.keySet();
+
+ // Obtaining iterator over set entries
+ Iterator itr = keys.iterator();
+ String strvalue;
+ // Displaying Key and value pairs
+ while (itr.hasNext()) {
+ // Getting Key
+ strvalue = itr.next();
+
+ stringBuilder.append(strvalue);
+ stringBuilder.append(";\t");
+ }
+
+ stringBuilder.append("\r\n");
return stringBuilder.toString();
}
@@ -212,8 +209,5 @@ public class Telemetry {
public void setTimeFrame(long timeFrame) {
this.timeFrame = timeFrame;
}
-
-
-
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeEntrySatFile.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeEntrySatFile.java
index 4fe957d7cae65474a6c2e216476a8bdb5ca999cb..0c7c5214e6578d96c3a77430fd5a67b95703b2ef 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeEntrySatFile.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeEntrySatFile.java
@@ -29,7 +29,6 @@ public class DecodeEntrySatFile {
private BufferedReader lecteurAvecBuffer;
private String ligne;
-
public DecodeEntrySatFile() {
// automatically generate the help statement
@@ -44,8 +43,7 @@ public class DecodeEntrySatFile {
formatter.printHelp("DecodeTLM", options);
}
-
-
+
public void execute(String[] args) {
CommandLineParser cmdLineParser = new DefaultParser();
CommandLine commandLineGlobal;
@@ -53,10 +51,10 @@ public class DecodeEntrySatFile {
commandLineGlobal = cmdLineParser.parse(options, args);
if (commandLineGlobal.hasOption("f")) {
System.out.println("file to extract : " + commandLineGlobal.getOptionValue("f"));
-
- OpenFile(commandLineGlobal.getOptionValue("f"));
- readFile () ;
-
+
+ openFile(commandLineGlobal.getOptionValue("f"));
+ readFile();
+
// FrameTlmEntrySat frame;
// try {
// frame = FrameTlmEntrySat.fromFile(commandLineGlobal.getOptionValue("f"));
@@ -81,115 +79,102 @@ public class DecodeEntrySatFile {
}
}
-
-
- public void OpenFile(String file)
- {
- try
- {
- lecteurAvecBuffer = new BufferedReader(new FileReader(file));
- }
- catch(FileNotFoundException exc)
- {
- System.out.println("Erreur d'ouverture");
- }
+
+ public void openFile(String file) {
+ try {
+ lecteurAvecBuffer = new BufferedReader(new FileReader(file));
+ } catch (FileNotFoundException exc) {
+ System.out.println("Erreur d'ouverture");
+ }
}
- public void readFile ()
- {
+
+ public void readFile() {
boolean first = false;
- Date dateref=null;
+ Date dateref = null;
try {
- while ((ligne = lecteurAvecBuffer.readLine()) != null)
- {
- // System.out.println(ligne);
- String[] result1=ligne.split("=");
- String[] date = result1[1].split("]");
- String[] trame = result1[2].split("]");
-
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E MMM dd hh:mm:ss z yyyy",Locale.ENGLISH);
-
- System.out.println("date : "+date[0]+" - Trame "+trame[0]);
- Date date2 = null;
- try {
- date2 = simpleDateFormat.parse(date[0]);
- } catch (java.text.ParseException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (!first)
- {
- dateref=date2;
- first = true;
- }
- else
- {
- System.out.println((date2.getTime() - dateref.getTime())/1000);
- }
- byte[] tlm = hexStringToByteArray(trame[0]);
- FrameTlmEntrySat frame = new FrameTlmEntrySat(new ByteBufferKaitaiStream (tlm) );
- Ax25Frame ax = frame.frameTlmEntrySat();
+ while ((ligne = lecteurAvecBuffer.readLine()) != null) {
+ // System.out.println(ligne);
+ String[] result1 = ligne.split("=");
+ String[] date = result1[1].split("]");
+ String[] trame = result1[2].split("]");
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E MMM dd hh:mm:ss z yyyy", Locale.ENGLISH);
+
+ System.out.println("date : " + date[0] + " - Trame " + trame[0]);
+ Date date2 = null;
+ try {
+ date2 = simpleDateFormat.parse(date[0]);
+ } catch (java.text.ParseException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ if (!first) {
+ dateref = date2;
+ first = true;
+ } else {
+ System.out.println((date2.getTime() - dateref.getTime()) / 1000);
+ }
+ byte[] tlm = hexStringToByteArray(trame[0]);
+ FrameTlmEntrySat frame = new FrameTlmEntrySat(new ByteBufferKaitaiStream(tlm));
+ Ax25Frame ax = frame.frameTlmEntrySat();
// System.out.println(ax.ax25Header().destSsidRaw());
// System.out.println(ax.ax25Header().srcSsidRaw());
- System.out.println(ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign());
- System.out.println(ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
-
- if (ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign().compareTo("F6KTA ")==0)
- {
+ System.out.println(ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign());
+ System.out.println(ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
+
+ if (ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign().compareTo("F6KTA ") == 0) {
// System.out.println(ax.ax25Header().ctl());
- UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
+ UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
// System.out.println(Ui.packetheader().version());
// System.out.println(Ui.packetheader().packetType());
// System.out.println(Ui.packetheader().packetFlag());
// System.out.println(Ui.packetheader().packetApid());
// System.out.println(Ui.packetheader().sequenceControl());
// System.out.println(Ui.packetheader().packetLenght());
- System.out.println("SID : " + Ui.telemetryData().sid());
- if ( Ui.telemetryData().sid()==1)
- {
- System.err.println("SID valeur 4 ");
- System.exit(0);
- }
+ System.out.println("SID : " + Ui.telemetryData().sid());
+ if (Ui.telemetryData().sid() == 1) {
+ System.err.println("SID valeur 4 ");
+ System.exit(0);
+ }
// System.out.println("battTemp : " + Ui.telemetryData().battTemp());
// System.out.println("eps33VCurrent : " + Ui.telemetryData().eps33VCurrent());
// System.out.println("eps5VCurrent : " + Ui.telemetryData().eps5VCurrent());
// System.out.println("epsBattVcurrent : " + Ui.telemetryData().epsBattVcurrent());
// System.out.println("epsTemp : " + Ui.telemetryData().epsTemp());
// System.out.println("trxTemp : " + Ui.telemetryData().trxTemp());
-
- }
- else
- {
- System.out.println("SID :");
- }
+
+ } else {
+ System.out.println("SID :");
+ }
}
}
-
- catch (IOException e) {
+
+ catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
- }
- public void closeFile()
- {
- try {
+
+ }
+
+ public void closeFile() {
+ try {
lecteurAvecBuffer.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
-
-
+
public static byte[] hexStringToByteArray(String s) {
- byte[] b = new byte[s.length() / 2];
- for (int i = 0; i < b.length; i++) {
- int index = i * 2;
- int v = Integer.parseInt(s.substring(index, index + 2), 16);
- b[i] = (byte) v;
- }
- return b;
- }
+ byte[] b = new byte[s.length() / 2];
+ for (int i = 0; i < b.length; i++) {
+ int index = i * 2;
+ int v = Integer.parseInt(s.substring(index, index + 2), 16);
+ b[i] = (byte) v;
+ }
+ return b;
+ }
+
public static void main(String[] args) {
DecodeEntrySatFile decode = new DecodeEntrySatFile();
decode.execute(args);
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeTLM.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeTLM.java
index ccc0e1410c17692fb70fa8ec6e57f3f9a4eddfe6..718f3c99380aa2db1cb2f55194cedf2f3d8d54ed 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeTLM.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/DecodeTLM.java
@@ -60,7 +60,8 @@ public class DecodeTLM {
}
} catch (ParseException e) {
- // TODO Auto-generated catch block
+
+
e.printStackTrace();
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/Testkaikaigenerated.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/Testkaikaigenerated.java
new file mode 100644
index 0000000000000000000000000000000000000000..3023585f654c8b188ab59b5f5ef6513bf39bb163
--- /dev/null
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/Testkaikaigenerated.java
@@ -0,0 +1,55 @@
+package org.josast.EntrySat.app;
+
+import org.josast.kaikai.generated.FrameTlmEntrySat;
+import org.josast.kaikai.generated.FrameTlmEntrySat.Ax25Frame;
+import org.josast.kaikai.generated.FrameTlmEntrySat.UiFrameTlmEntrySat;
+
+import io.kaitai.struct.ByteBufferKaitaiStream;
+
+public class Testkaikaigenerated {
+
+ private Testkaikaigenerated() {
+
+ }
+
+ public static void main(String[] args) {
+
+ // FrameTlmEntrySat frame = FrameTlmEntrySat.fromFile("myfile2.dat");
+ // byte[] tlm =
+ // hexStringToByteArray("8c6c96a88240e09e9c60648ca46103f0000000000801c1200017100102249a78f25d1801dc010002a5a52175fe0800001603b0f2789a24c0");
+ byte[] tlm = hexStringToByteArray(
+ "8c6c96a88240e09e9c60648ca46103f0000000000801c729001210031923febdcd170600f16b00009ea0981fc6b009befe23c0");
+ FrameTlmEntrySat frame = new FrameTlmEntrySat(new ByteBufferKaitaiStream(tlm));
+ Ax25Frame ax = frame.frameTlmEntrySat();
+ System.out.println(ax.ax25Header().destSsidRaw());
+ System.out.println(ax.ax25Header().srcSsidRaw());
+ System.out.println(ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign());
+ System.out.println(ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
+ System.out.println(ax.ax25Header().ctl());
+ UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
+ System.out.println(Ui.packetheader().version());
+ System.out.println(Ui.packetheader().packetType());
+ System.out.println(Ui.packetheader().packetFlag());
+ System.out.println(Ui.packetheader().packetApid());
+ System.out.println(Ui.packetheader().sequenceControl());
+ System.out.println(Ui.packetheader().packetLenght());
+ System.out.println("SID : " + Ui.telemetryData().sid());
+ System.out.println("battTemp : " + Ui.telemetryData().battTemp());
+ System.out.println("eps33VCurrent : " + Ui.telemetryData().eps33VCurrent());
+ System.out.println("eps5VCurrent : " + Ui.telemetryData().eps5VCurrent());
+ System.out.println("epsBattVcurrent : " + Ui.telemetryData().epsBattVcurrent());
+ System.out.println("epsTemp : " + Ui.telemetryData().epsTemp());
+ System.out.println("trxTemp : " + Ui.telemetryData().trxTemp());
+ }
+
+ public static byte[] hexStringToByteArray(String s) {
+ byte[] b = new byte[s.length() / 2];
+ for (int i = 0; i < b.length; i++) {
+ int index = i * 2;
+ int v = Integer.parseInt(s.substring(index, index + 2), 16);
+ b[i] = (byte) v;
+ }
+ return b;
+ }
+
+}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/testkaikaigenerated.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/testkaikaigenerated.java
deleted file mode 100644
index 153da3ab9e121bac450a33830a6c45e125fcc819..0000000000000000000000000000000000000000
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/EntrySat/app/testkaikaigenerated.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.josast.EntrySat.app;
-
-import org.josast.kaikai.generated.FrameTlmEntrySat;
-import org.josast.kaikai.generated.FrameTlmEntrySat.Ax25Frame;
-import org.josast.kaikai.generated.FrameTlmEntrySat.UiFrameTlmEntrySat;
-
-import io.kaitai.struct.ByteBufferKaitaiStream;
-
-public class testkaikaigenerated {
-
- private testkaikaigenerated()
- {
-
- }
-
- public static void main(String[] args) {
-
- // FrameTlmEntrySat frame = FrameTlmEntrySat.fromFile("myfile2.dat");
- // byte[] tlm = hexStringToByteArray("8c6c96a88240e09e9c60648ca46103f0000000000801c1200017100102249a78f25d1801dc010002a5a52175fe0800001603b0f2789a24c0");
- byte[] tlm = hexStringToByteArray("8c6c96a88240e09e9c60648ca46103f0000000000801c729001210031923febdcd170600f16b00009ea0981fc6b009befe23c0");
- FrameTlmEntrySat frame = new FrameTlmEntrySat(new ByteBufferKaitaiStream (tlm) );
- Ax25Frame ax = frame.frameTlmEntrySat();
- System.out.println(ax.ax25Header().destSsidRaw());
- System.out.println(ax.ax25Header().srcSsidRaw());
- System.out.println(ax.ax25Header().destCallsignRaw().destCallsignRor().destCallsign());
- System.out.println(ax.ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
- System.out.println(ax.ax25Header().ctl());
- UiFrameTlmEntrySat Ui = (UiFrameTlmEntrySat) ax.payload();
- System.out.println(Ui.packetheader().version());
- System.out.println(Ui.packetheader().packetType());
- System.out.println(Ui.packetheader().packetFlag());
- System.out.println(Ui.packetheader().packetApid());
- System.out.println(Ui.packetheader().sequenceControl());
- System.out.println(Ui.packetheader().packetLenght());
- System.out.println("SID : " + Ui.telemetryData().sid());
- System.out.println("battTemp : " + Ui.telemetryData().battTemp());
- System.out.println("eps33VCurrent : " + Ui.telemetryData().eps33VCurrent());
- System.out.println("eps5VCurrent : " + Ui.telemetryData().eps5VCurrent());
- System.out.println("epsBattVcurrent : " + Ui.telemetryData().epsBattVcurrent());
- System.out.println("epsTemp : " + Ui.telemetryData().epsTemp());
- System.out.println("trxTemp : " + Ui.telemetryData().trxTemp());
- }
-
-
-
- public static byte[] hexStringToByteArray(String s) {
- byte[] b = new byte[s.length() / 2];
- for (int i = 0; i < b.length; i++) {
- int index = i * 2;
- int v = Integer.parseInt(s.substring(index, index + 2), 16);
- b[i] = (byte) v;
- }
- return b;
- }
-
-}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxBEqx.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxBEqx.java
index 00ad63910464708aaa83d4fe7d5031a72ce2aad0..e6d634a7d47c015111ef52d5ccd4a8181901cb77 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxBEqx.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxBEqx.java
@@ -1,34 +1,36 @@
package org.josast.TLM;
-
public class AxBEqx implements ICalculData {
private double A;
private double B;
+
/**
* Constructor with two parameters of the equation A & B
+ *
* @param a
* @param b
*/
- public AxBEqx(double a, double b ) {
- A=a;
- B=b;
+ public AxBEqx(double a, double b) {
+ A = a;
+ B = b;
}
-/**
- * Equation is : y= A x + B
- * @param x x value
- * @return computed value
- * @see org.josast.TLM.ICalculData#calcul(int)
- */
-
+
+ /**
+ * Equation is : y= A x + B
+ *
+ * @param x x value
+ * @return computed value
+ * @see org.josast.TLM.ICalculData#calcul(int)
+ */
+
@Override
public double calcul(int x) {
// TODO Auto-generated method stub
- return (double)x*A+B;
+ return (double) x * A + B;
}
-
- public String toString ()
- {
- return "" + A + " x + "+ B ;
-
+
+ public String toString() {
+ return "" + A + " x + " + B;
+
}
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxEqx.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxEqx.java
index 10a3f133da68b8777189a0d820b59a29eca3abe6..d37882849d91a9ed8678b441e5fe817bf12457da 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxEqx.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/AxEqx.java
@@ -2,14 +2,15 @@ package org.josast.TLM;
public class AxEqx implements ICalculData {
double a;
- public AxEqx(double a)
- {
- this.a=a;
+
+ public AxEqx(double a) {
+ this.a = a;
}
+
@Override
public double calcul(int x) {
// TODO Auto-generated method stub
- return a*x;
+ return a * x;
}
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/BooleanTLM.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/BooleanTLM.java
index bb225329817cc715fe876582e9270d10d5c0ee6c..e989c44b2bbb949fed53b00cf3c3eb21a942bb71 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/BooleanTLM.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/BooleanTLM.java
@@ -1,52 +1,43 @@
package org.josast.TLM;
-
public class BooleanTLM {
-
- protected boolean [] bool = new boolean[8];
+ protected boolean[] bool = new boolean[8];
public BooleanTLM() {
-
+
}
- public boolean getValue(int data)
- {
+ public boolean getValue(int data) {
return this.bool[data];
}
- public boolean [] convertToBoolean (int in, int lengh)
- {
-
-
+
+ public boolean[] convertToBoolean(int in, int lengh) {
+
String maxAmpStr = Integer.toBinaryString(in);
- char[] arr = maxAmpStr.toCharArray();
- boolean[] bool = new boolean[lengh];
- int j = 0;
- for (int i = arr.length - 1; i >= 0; i--) {
- if (arr[i] == '1') {
- bool[j++] = true;
- } else if (arr[i] == '0') {
- bool[j++] = false;
- }
- }
-
-
+ char[] arr = maxAmpStr.toCharArray();
+ boolean[] bool = new boolean[lengh];
+ int j = 0;
+ for (int i = arr.length - 1; i >= 0; i--) {
+ if (arr[i] == '1') {
+ bool[j++] = true;
+ } else if (arr[i] == '0') {
+ bool[j++] = false;
+ }
+ }
+
return bool;
}
- public String toString()
- {
-
- StringBuilder stringBuilder = new StringBuilder();
- for ( int j = 0; j < 8; j++ )
- {
-
- stringBuilder.append( bool[j]+",");
- }
-
- return stringBuilder.toString();
- }
-
-
-
+ public String toString() {
+
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int j = 0; j < 8; j++) {
+
+ stringBuilder.append(bool[j] + ",");
+ }
+
+ return stringBuilder.toString();
+ }
+
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/CubicEqx.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/CubicEqx.java
index 4b618ca11fa9c2cb36723c9780b4268977c42415..a068f046e84c154a0c407d86d4b0c3298d50177f 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/CubicEqx.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/CubicEqx.java
@@ -1,10 +1,8 @@
package org.josast.TLM;
-
/**
- * Calculate Cubix equation
- *
Ax3+bx2+Cx+d
- *
+ * Calculate Cubix equation
+ * Ax3+bx2+Cx+d
*
* @author Christophe
*
@@ -15,7 +13,7 @@ public class CubicEqx implements ICalculData {
double B;
double C;
double D;
-
+
/**
* The Constructor.
*
@@ -42,8 +40,8 @@ public class CubicEqx implements ICalculData {
*
*/
public double calcul(int x) {
-
- return A*Math.pow(x,3)+B*Math.pow(x,2)+C*x+D;
+
+ return A * Math.pow(x, 3) + B * Math.pow(x, 2) + C * x + D;
}
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/ICalculData.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/ICalculData.java
index 0bfc99f6285e5d46ddb1ef8996f0d4eceba82c1b..8890d6873d505c2cd801c01ca828f0af6a00f7d7 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/ICalculData.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/ICalculData.java
@@ -1,6 +1,5 @@
package org.josast.TLM;
-
/**
*
*
@@ -14,5 +13,5 @@ public interface ICalculData {
* @param x x used by the equation
* @return y
*/
- double calcul(int x);
+ double calcul(int x);
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/TlmData.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/TlmData.java
index 638cebe44d55ffeec83a8d80735cf9b9653fc170..65ba050bd04f7856a34b5b04b3a8d18f97af1155 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/TlmData.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/TlmData.java
@@ -5,34 +5,33 @@ package org.josast.TLM;
*
*/
public class TlmData {
-
+
/** The name. */
private String name;
-
+
/** The formulae. */
private ICalculData formulae;
-
+
/** The unit. */
private String unit;
-
+
private String format;
-
+
/**
* The Constructor.
*
- * @param unit the unit
+ * @param unit the unit
* @param formulae the formulae
- * @param name the name
+ * @param name the name
*/
- public TlmData(String name, ICalculData formulae, String unit,String formatDislay) {
+ public TlmData(String name, ICalculData formulae, String unit, String formatDislay) {
super();
this.name = name;
this.formulae = formulae;
this.unit = unit;
this.format = formatDislay;
}
-
-
+
public String getFormat() {
return format;
}
@@ -41,8 +40,6 @@ public class TlmData {
this.format = format;
}
-
-
/**
* Gets the formulae.
*
@@ -51,7 +48,7 @@ public class TlmData {
public ICalculData getFormulae() {
return formulae;
}
-
+
/**
* Sets the formulae.
*
@@ -60,7 +57,7 @@ public class TlmData {
public void setFormulae(ICalculData formulae) {
this.formulae = formulae;
}
-
+
/**
* Gets the name.
*
@@ -69,7 +66,7 @@ public class TlmData {
public String getName() {
return name;
}
-
+
/**
* Sets the name.
*
@@ -78,7 +75,7 @@ public class TlmData {
public void setName(String name) {
this.name = name;
}
-
+
/**
* Gets the unit.
*
@@ -87,7 +84,7 @@ public class TlmData {
public String getUnit() {
return unit;
}
-
+
/**
* Sets the unit.
*
@@ -96,10 +93,9 @@ public class TlmData {
public void setUnit(String unit) {
this.unit = unit;
}
-
- public String toString ()
- {
- return ""+ name +":"+formulae.toString()+" "+unit;
-
+
+ public String toString() {
+ return "" + name + ":" + formulae.toString() + " " + unit;
+
}
}
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/xEqx.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/xEqx.java
index cb4511b1e3470484f2aa63ca508cc542337837f6..ac8f63959a7561c266daf2022784d8f33345a3ec 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/xEqx.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/TLM/xEqx.java
@@ -2,7 +2,6 @@ package org.josast.TLM;
public class xEqx implements ICalculData {
-
@Override
public double calcul(int x) {
diff --git a/ModuleEntrySatTelemetry/src/main/java/org/josast/kaikai/generated/FrameTlmEntrySat.java b/ModuleEntrySatTelemetry/src/main/java/org/josast/kaikai/generated/FrameTlmEntrySat.java
index 957aafe2c2d63e6624feb6db182b959df57b7400..6da447dd675fe3ba7eb3041e137b638a7802eba3 100644
--- a/ModuleEntrySatTelemetry/src/main/java/org/josast/kaikai/generated/FrameTlmEntrySat.java
+++ b/ModuleEntrySatTelemetry/src/main/java/org/josast/kaikai/generated/FrameTlmEntrySat.java
@@ -9,530 +9,768 @@ import java.io.IOException;
import java.nio.charset.Charset;
public class FrameTlmEntrySat extends KaitaiStruct {
- public static FrameTlmEntrySat fromFile(String fileName) throws IOException {
- return new FrameTlmEntrySat(new ByteBufferKaitaiStream(fileName));
- }
-
- public FrameTlmEntrySat(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public FrameTlmEntrySat(KaitaiStream _io, KaitaiStruct _parent) {
- this(_io, _parent, null);
- }
-
- public FrameTlmEntrySat(KaitaiStream _io, KaitaiStruct _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root == null ? this : _root;
- _read();
- }
- private void _read() {
- this.frameTlmEntrySat = new Ax25Frame(this._io, this, _root);
- }
- public static class Ax25Frame extends KaitaiStruct {
- public static Ax25Frame fromFile(String fileName) throws IOException {
- return new Ax25Frame(new ByteBufferKaitaiStream(fileName));
- }
-
- public Ax25Frame(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public Ax25Frame(KaitaiStream _io, FrameTlmEntrySat _parent) {
- this(_io, _parent, null);
- }
-
- public Ax25Frame(KaitaiStream _io, FrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.ax25Header = new Ax25Header(this._io, this, _root);
- switch ((ax25Header().ctl() & 19)) {
- case 0: {
- this.payload = new IFrame(this._io, this, _root);
- break;
- }
- case 3: {
- this.payload = new UiFrameTlmEntrySat(this._io, this, _root);
- break;
- }
- case 19: {
- this.payload = new IFrame(this._io, this, _root);
- break;
- }
- case 16: {
- this.payload = new IFrame(this._io, this, _root);
- break;
- }
- case 18: {
- this.payload = new IFrame(this._io, this, _root);
- break;
- }
- case 2: {
- this.payload = new IFrame(this._io, this, _root);
- break;
- }
- }
- }
- private Ax25Header ax25Header;
- private KaitaiStruct payload;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat _parent;
- public Ax25Header ax25Header() { return ax25Header; }
- public KaitaiStruct payload() { return payload; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat _parent() { return _parent; }
- }
- public static class UiFrameTlmEntrySat extends KaitaiStruct {
- public static UiFrameTlmEntrySat fromFile(String fileName) throws IOException {
- return new UiFrameTlmEntrySat(new ByteBufferKaitaiStream(fileName));
- }
-
- public UiFrameTlmEntrySat(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public UiFrameTlmEntrySat(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
- this(_io, _parent, null);
- }
-
- public UiFrameTlmEntrySat(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.pid = this._io.readU1();
- this.time = this._io.readU4be();
- this.packetheader = new Packetheader(this._io, this, _root);
- this.telemetryDataFiledHearder = new TelemetryDataFiledHearder(this._io, this, _root);
- this.telemetryData = new TelemetryData(this._io, this, _root);
- this.ax25Info = this._io.readBytesFull();
- }
- private int pid;
- private long time;
- private Packetheader packetheader;
- private TelemetryDataFiledHearder telemetryDataFiledHearder;
- private TelemetryData telemetryData;
- private byte[] ax25Info;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.Ax25Frame _parent;
- public int pid() { return pid; }
- public long time() { return time; }
- public Packetheader packetheader() { return packetheader; }
- public TelemetryDataFiledHearder telemetryDataFiledHearder() { return telemetryDataFiledHearder; }
- public TelemetryData telemetryData() { return telemetryData; }
- public byte[] ax25Info() { return ax25Info; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.Ax25Frame _parent() { return _parent; }
- }
- public static class DestCallsign extends KaitaiStruct {
- public static DestCallsign fromFile(String fileName) throws IOException {
- return new DestCallsign(new ByteBufferKaitaiStream(fileName));
- }
-
- public DestCallsign(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public DestCallsign(KaitaiStream _io, FrameTlmEntrySat.DestCallsignRaw _parent) {
- this(_io, _parent, null);
- }
-
- public DestCallsign(KaitaiStream _io, FrameTlmEntrySat.DestCallsignRaw _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.destCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
- }
- private String destCallsign;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.DestCallsignRaw _parent;
- public String destCallsign() { return destCallsign; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.DestCallsignRaw _parent() { return _parent; }
- }
- public static class Ax25Header extends KaitaiStruct {
- public static Ax25Header fromFile(String fileName) throws IOException {
- return new Ax25Header(new ByteBufferKaitaiStream(fileName));
- }
-
- public Ax25Header(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public Ax25Header(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
- this(_io, _parent, null);
- }
-
- public Ax25Header(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.destCallsignRaw = new DestCallsignRaw(this._io, this, _root);
- this.destSsidRaw = this._io.readU1();
- this.srcCallsignRaw = new SrcCallsignRaw(this._io, this, _root);
- this.srcSsidRaw = this._io.readU1();
- this.ctl = this._io.readU1();
- }
- private Integer srcSsid;
- public Integer srcSsid() {
- if (this.srcSsid != null)
- return this.srcSsid;
- int _tmp = (int) (((srcSsidRaw() & 15) >> 1));
- this.srcSsid = _tmp;
- return this.srcSsid;
- }
- private Integer destSsid;
- public Integer destSsid() {
- if (this.destSsid != null)
- return this.destSsid;
- int _tmp = (int) (((destSsidRaw() & 15) >> 1));
- this.destSsid = _tmp;
- return this.destSsid;
- }
- private DestCallsignRaw destCallsignRaw;
- private int destSsidRaw;
- private SrcCallsignRaw srcCallsignRaw;
- private int srcSsidRaw;
- private int ctl;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.Ax25Frame _parent;
- public DestCallsignRaw destCallsignRaw() { return destCallsignRaw; }
- public int destSsidRaw() { return destSsidRaw; }
- public SrcCallsignRaw srcCallsignRaw() { return srcCallsignRaw; }
- public int srcSsidRaw() { return srcSsidRaw; }
- public int ctl() { return ctl; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.Ax25Frame _parent() { return _parent; }
- }
- public static class SrcCallsignRaw extends KaitaiStruct {
- public static SrcCallsignRaw fromFile(String fileName) throws IOException {
- return new SrcCallsignRaw(new ByteBufferKaitaiStream(fileName));
- }
-
- public SrcCallsignRaw(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public SrcCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent) {
- this(_io, _parent, null);
- }
-
- public SrcCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this._raw__raw_srcCallsignRor = this._io.readBytes(6);
- this._raw_srcCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_srcCallsignRor, 8 - (1), 1);
- KaitaiStream _io__raw_srcCallsignRor = new ByteBufferKaitaiStream(_raw_srcCallsignRor);
- this.srcCallsignRor = new SrcCallsign(_io__raw_srcCallsignRor, this, _root);
- }
- private SrcCallsign srcCallsignRor;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.Ax25Header _parent;
- private byte[] _raw__raw_srcCallsignRor;
- private byte[] _raw_srcCallsignRor;
- public SrcCallsign srcCallsignRor() { return srcCallsignRor; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.Ax25Header _parent() { return _parent; }
- public byte[] _raw__raw_srcCallsignRor() { return _raw__raw_srcCallsignRor; }
- public byte[] _raw_srcCallsignRor() { return _raw_srcCallsignRor; }
- }
- public static class IFrame extends KaitaiStruct {
- public static IFrame fromFile(String fileName) throws IOException {
- return new IFrame(new ByteBufferKaitaiStream(fileName));
- }
-
- public IFrame(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public IFrame(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
- this(_io, _parent, null);
- }
-
- public IFrame(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.pid = this._io.readU1();
- this.ax25Info = this._io.readBytesFull();
- }
- private int pid;
- private byte[] ax25Info;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.Ax25Frame _parent;
- public int pid() { return pid; }
- public byte[] ax25Info() { return ax25Info; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.Ax25Frame _parent() { return _parent; }
- }
- public static class TelemetryDataFiledHearder extends KaitaiStruct {
- public static TelemetryDataFiledHearder fromFile(String fileName) throws IOException {
- return new TelemetryDataFiledHearder(new ByteBufferKaitaiStream(fileName));
- }
-
- public TelemetryDataFiledHearder(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public TelemetryDataFiledHearder(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
- this(_io, _parent, null);
- }
-
- public TelemetryDataFiledHearder(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.spare1 = this._io.readBitsInt(1) != 0;
- this.pusVersion = this._io.readBitsInt(3);
- this.spare2 = this._io.readBitsInt(4);
- this._io.alignToByte();
- this.service = this._io.readU1();
- this.serviceSubtype = this._io.readU1();
- this.time2 = this._io.readBytes(5);
- }
- private boolean spare1;
- private long pusVersion;
- private long spare2;
- private int service;
- private int serviceSubtype;
- private byte[] time2;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
- public boolean spare1() { return spare1; }
- public long pusVersion() { return pusVersion; }
- public long spare2() { return spare2; }
- public int service() { return service; }
- public int serviceSubtype() { return serviceSubtype; }
- public byte[] time2() { return time2; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() { return _parent; }
- }
- public static class TelemetryData extends KaitaiStruct {
- public static TelemetryData fromFile(String fileName) throws IOException {
- return new TelemetryData(new ByteBufferKaitaiStream(fileName));
- }
-
- public TelemetryData(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public TelemetryData(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
- this(_io, _parent, null);
- }
-
- public TelemetryData(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.sid = this._io.readU1();
- this.modeSafe = this._io.readU1();
- this.epsVbatt = this._io.readU1();
- this.epsBattVcurrent = this._io.readU1();
- this.eps33VCurrent = this._io.readU1();
- this.eps5VCurrent = this._io.readU1();
- this.trxTemp = this._io.readU1();
- this.epsTemp = this._io.readU1();
- this.battTemp = this._io.readU1();
- }
- private int sid;
- private int modeSafe;
- private int epsVbatt;
- private int epsBattVcurrent;
- private int eps33VCurrent;
- private int eps5VCurrent;
- private int trxTemp;
- private int epsTemp;
- private int battTemp;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
- public int sid() { return sid; }
-
- /**
- * Operational status. 0 = Safe mode 1 = Orbital or Entry mode
- */
- public int modeSafe() { return modeSafe; }
-
- /**
- * Battery voltage in V formulae ð?‘¦ = 3 + 0.05×ð??Š
- */
- public int epsVbatt() { return epsVbatt; }
-
- /**
- * Battery bus current in A formulae � = −1 + 0.0078740×�
- */
- public int epsBattVcurrent() { return epsBattVcurrent; }
-
- /**
- * 3.3V bus current in A formulae � = 0.025*x
- */
- public int eps33VCurrent() { return eps33VCurrent; }
-
- /**
- * 5V bus current in A formulae � = 0.025*x
- */
- public int eps5VCurrent() { return eps5VCurrent; }
-
- /**
- * Transceiver’s temperature in °C formulae � = −15 + 0.25×�
- */
- public int trxTemp() { return trxTemp; }
-
- /**
- * Power system’s temperature °C formulae � = −15 + 0.25×�
- */
- public int epsTemp() { return epsTemp; }
-
- /**
- * Batteries temperature in °C formulae � = −15 + 0.25×�
- */
- public int battTemp() { return battTemp; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() { return _parent; }
- }
- public static class Packetheader extends KaitaiStruct {
- public static Packetheader fromFile(String fileName) throws IOException {
- return new Packetheader(new ByteBufferKaitaiStream(fileName));
- }
-
- public Packetheader(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public Packetheader(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
- this(_io, _parent, null);
- }
-
- public Packetheader(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.version = this._io.readBitsInt(3);
- this.packetType = this._io.readBitsInt(1) != 0;
- this.packetFlag = this._io.readBitsInt(1) != 0;
- this.packetApid = this._io.readBitsInt(11);
- this._io.alignToByte();
- this.sequenceControl = this._io.readU2be();
- this.packetLenght = this._io.readU2be();
- }
- private long version;
- private boolean packetType;
- private boolean packetFlag;
- private long packetApid;
- private int sequenceControl;
- private int packetLenght;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
- public long version() { return version; }
- public boolean packetType() { return packetType; }
- public boolean packetFlag() { return packetFlag; }
- public long packetApid() { return packetApid; }
- public int sequenceControl() { return sequenceControl; }
- public int packetLenght() { return packetLenght; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() { return _parent; }
- }
- public static class DestCallsignRaw extends KaitaiStruct {
- public static DestCallsignRaw fromFile(String fileName) throws IOException {
- return new DestCallsignRaw(new ByteBufferKaitaiStream(fileName));
- }
-
- public DestCallsignRaw(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public DestCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent) {
- this(_io, _parent, null);
- }
-
- public DestCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this._raw__raw_destCallsignRor = this._io.readBytes(6);
- this._raw_destCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_destCallsignRor, 8 - (1), 1);
- KaitaiStream _io__raw_destCallsignRor = new ByteBufferKaitaiStream(_raw_destCallsignRor);
- this.destCallsignRor = new DestCallsign(_io__raw_destCallsignRor, this, _root);
- }
- private DestCallsign destCallsignRor;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.Ax25Header _parent;
- private byte[] _raw__raw_destCallsignRor;
- private byte[] _raw_destCallsignRor;
- public DestCallsign destCallsignRor() { return destCallsignRor; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.Ax25Header _parent() { return _parent; }
- public byte[] _raw__raw_destCallsignRor() { return _raw__raw_destCallsignRor; }
- public byte[] _raw_destCallsignRor() { return _raw_destCallsignRor; }
- }
- public static class SrcCallsign extends KaitaiStruct {
- public static SrcCallsign fromFile(String fileName) throws IOException {
- return new SrcCallsign(new ByteBufferKaitaiStream(fileName));
- }
-
- public SrcCallsign(KaitaiStream _io) {
- this(_io, null, null);
- }
-
- public SrcCallsign(KaitaiStream _io, FrameTlmEntrySat.SrcCallsignRaw _parent) {
- this(_io, _parent, null);
- }
-
- public SrcCallsign(KaitaiStream _io, FrameTlmEntrySat.SrcCallsignRaw _parent, FrameTlmEntrySat _root) {
- super(_io);
- this._parent = _parent;
- this._root = _root;
- _read();
- }
- private void _read() {
- this.srcCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
- }
- private String srcCallsign;
- private FrameTlmEntrySat _root;
- private FrameTlmEntrySat.SrcCallsignRaw _parent;
- public String srcCallsign() { return srcCallsign; }
- public FrameTlmEntrySat _root() { return _root; }
- public FrameTlmEntrySat.SrcCallsignRaw _parent() { return _parent; }
- }
- private Ax25Frame frameTlmEntrySat;
- private FrameTlmEntrySat _root;
- private KaitaiStruct _parent;
-
- /**
- * @see Source
- */
- public Ax25Frame frameTlmEntrySat() { return frameTlmEntrySat; }
- public FrameTlmEntrySat _root() { return _root; }
- public KaitaiStruct _parent() { return _parent; }
+ public static FrameTlmEntrySat fromFile(String fileName) throws IOException {
+ return new FrameTlmEntrySat(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public FrameTlmEntrySat(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public FrameTlmEntrySat(KaitaiStream _io, KaitaiStruct _parent) {
+ this(_io, _parent, null);
+ }
+
+ public FrameTlmEntrySat(KaitaiStream _io, KaitaiStruct _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root == null ? this : _root;
+ _read();
+ }
+
+ private void _read() {
+ this.frameTlmEntrySat = new Ax25Frame(this._io, this, _root);
+ }
+
+ public static class Ax25Frame extends KaitaiStruct {
+ public static Ax25Frame fromFile(String fileName) throws IOException {
+ return new Ax25Frame(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public Ax25Frame(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public Ax25Frame(KaitaiStream _io, FrameTlmEntrySat _parent) {
+ this(_io, _parent, null);
+ }
+
+ public Ax25Frame(KaitaiStream _io, FrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.ax25Header = new Ax25Header(this._io, this, _root);
+ switch ((ax25Header().ctl() & 19)) {
+ case 0: {
+ this.payload = new IFrame(this._io, this, _root);
+ break;
+ }
+ case 3: {
+ this.payload = new UiFrameTlmEntrySat(this._io, this, _root);
+ break;
+ }
+ case 19: {
+ this.payload = new IFrame(this._io, this, _root);
+ break;
+ }
+ case 16: {
+ this.payload = new IFrame(this._io, this, _root);
+ break;
+ }
+ case 18: {
+ this.payload = new IFrame(this._io, this, _root);
+ break;
+ }
+ case 2: {
+ this.payload = new IFrame(this._io, this, _root);
+ break;
+ }
+ }
+ }
+
+ private Ax25Header ax25Header;
+ private KaitaiStruct payload;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat _parent;
+
+ public Ax25Header ax25Header() {
+ return ax25Header;
+ }
+
+ public KaitaiStruct payload() {
+ return payload;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat _parent() {
+ return _parent;
+ }
+ }
+
+ public static class UiFrameTlmEntrySat extends KaitaiStruct {
+ public static UiFrameTlmEntrySat fromFile(String fileName) throws IOException {
+ return new UiFrameTlmEntrySat(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public UiFrameTlmEntrySat(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public UiFrameTlmEntrySat(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
+ this(_io, _parent, null);
+ }
+
+ public UiFrameTlmEntrySat(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.pid = this._io.readU1();
+ this.time = this._io.readU4be();
+ this.packetheader = new Packetheader(this._io, this, _root);
+ this.telemetryDataFiledHearder = new TelemetryDataFiledHearder(this._io, this, _root);
+ this.telemetryData = new TelemetryData(this._io, this, _root);
+ this.ax25Info = this._io.readBytesFull();
+ }
+
+ private int pid;
+ private long time;
+ private Packetheader packetheader;
+ private TelemetryDataFiledHearder telemetryDataFiledHearder;
+ private TelemetryData telemetryData;
+ private byte[] ax25Info;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.Ax25Frame _parent;
+
+ public int pid() {
+ return pid;
+ }
+
+ public long time() {
+ return time;
+ }
+
+ public Packetheader packetheader() {
+ return packetheader;
+ }
+
+ public TelemetryDataFiledHearder telemetryDataFiledHearder() {
+ return telemetryDataFiledHearder;
+ }
+
+ public TelemetryData telemetryData() {
+ return telemetryData;
+ }
+
+ public byte[] ax25Info() {
+ return ax25Info;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.Ax25Frame _parent() {
+ return _parent;
+ }
+ }
+
+ public static class DestCallsign extends KaitaiStruct {
+ public static DestCallsign fromFile(String fileName) throws IOException {
+ return new DestCallsign(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public DestCallsign(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public DestCallsign(KaitaiStream _io, FrameTlmEntrySat.DestCallsignRaw _parent) {
+ this(_io, _parent, null);
+ }
+
+ public DestCallsign(KaitaiStream _io, FrameTlmEntrySat.DestCallsignRaw _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.destCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
+ }
+
+ private String destCallsign;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.DestCallsignRaw _parent;
+
+ public String destCallsign() {
+ return destCallsign;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.DestCallsignRaw _parent() {
+ return _parent;
+ }
+ }
+
+ public static class Ax25Header extends KaitaiStruct {
+ public static Ax25Header fromFile(String fileName) throws IOException {
+ return new Ax25Header(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public Ax25Header(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public Ax25Header(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
+ this(_io, _parent, null);
+ }
+
+ public Ax25Header(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.destCallsignRaw = new DestCallsignRaw(this._io, this, _root);
+ this.destSsidRaw = this._io.readU1();
+ this.srcCallsignRaw = new SrcCallsignRaw(this._io, this, _root);
+ this.srcSsidRaw = this._io.readU1();
+ this.ctl = this._io.readU1();
+ }
+
+ private Integer srcSsid;
+
+ public Integer srcSsid() {
+ if (this.srcSsid != null)
+ return this.srcSsid;
+ int _tmp = (int) (((srcSsidRaw() & 15) >> 1));
+ this.srcSsid = _tmp;
+ return this.srcSsid;
+ }
+
+ private Integer destSsid;
+
+ public Integer destSsid() {
+ if (this.destSsid != null)
+ return this.destSsid;
+ int _tmp = (int) (((destSsidRaw() & 15) >> 1));
+ this.destSsid = _tmp;
+ return this.destSsid;
+ }
+
+ private DestCallsignRaw destCallsignRaw;
+ private int destSsidRaw;
+ private SrcCallsignRaw srcCallsignRaw;
+ private int srcSsidRaw;
+ private int ctl;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.Ax25Frame _parent;
+
+ public DestCallsignRaw destCallsignRaw() {
+ return destCallsignRaw;
+ }
+
+ public int destSsidRaw() {
+ return destSsidRaw;
+ }
+
+ public SrcCallsignRaw srcCallsignRaw() {
+ return srcCallsignRaw;
+ }
+
+ public int srcSsidRaw() {
+ return srcSsidRaw;
+ }
+
+ public int ctl() {
+ return ctl;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.Ax25Frame _parent() {
+ return _parent;
+ }
+ }
+
+ public static class SrcCallsignRaw extends KaitaiStruct {
+ public static SrcCallsignRaw fromFile(String fileName) throws IOException {
+ return new SrcCallsignRaw(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public SrcCallsignRaw(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public SrcCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent) {
+ this(_io, _parent, null);
+ }
+
+ public SrcCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this._raw__raw_srcCallsignRor = this._io.readBytes(6);
+ this._raw_srcCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_srcCallsignRor, 8 - (1), 1);
+ KaitaiStream _io__raw_srcCallsignRor = new ByteBufferKaitaiStream(_raw_srcCallsignRor);
+ this.srcCallsignRor = new SrcCallsign(_io__raw_srcCallsignRor, this, _root);
+ }
+
+ private SrcCallsign srcCallsignRor;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.Ax25Header _parent;
+ private byte[] _raw__raw_srcCallsignRor;
+ private byte[] _raw_srcCallsignRor;
+
+ public SrcCallsign srcCallsignRor() {
+ return srcCallsignRor;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.Ax25Header _parent() {
+ return _parent;
+ }
+
+ public byte[] _raw__raw_srcCallsignRor() {
+ return _raw__raw_srcCallsignRor;
+ }
+
+ public byte[] _raw_srcCallsignRor() {
+ return _raw_srcCallsignRor;
+ }
+ }
+
+ public static class IFrame extends KaitaiStruct {
+ public static IFrame fromFile(String fileName) throws IOException {
+ return new IFrame(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public IFrame(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public IFrame(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent) {
+ this(_io, _parent, null);
+ }
+
+ public IFrame(KaitaiStream _io, FrameTlmEntrySat.Ax25Frame _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.pid = this._io.readU1();
+ this.ax25Info = this._io.readBytesFull();
+ }
+
+ private int pid;
+ private byte[] ax25Info;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.Ax25Frame _parent;
+
+ public int pid() {
+ return pid;
+ }
+
+ public byte[] ax25Info() {
+ return ax25Info;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.Ax25Frame _parent() {
+ return _parent;
+ }
+ }
+
+ public static class TelemetryDataFiledHearder extends KaitaiStruct {
+ public static TelemetryDataFiledHearder fromFile(String fileName) throws IOException {
+ return new TelemetryDataFiledHearder(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public TelemetryDataFiledHearder(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public TelemetryDataFiledHearder(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
+ this(_io, _parent, null);
+ }
+
+ public TelemetryDataFiledHearder(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent,
+ FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.spare1 = this._io.readBitsInt(1) != 0;
+ this.pusVersion = this._io.readBitsInt(3);
+ this.spare2 = this._io.readBitsInt(4);
+ this._io.alignToByte();
+ this.service = this._io.readU1();
+ this.serviceSubtype = this._io.readU1();
+ this.time2 = this._io.readBytes(5);
+ }
+
+ private boolean spare1;
+ private long pusVersion;
+ private long spare2;
+ private int service;
+ private int serviceSubtype;
+ private byte[] time2;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
+
+ public boolean spare1() {
+ return spare1;
+ }
+
+ public long pusVersion() {
+ return pusVersion;
+ }
+
+ public long spare2() {
+ return spare2;
+ }
+
+ public int service() {
+ return service;
+ }
+
+ public int serviceSubtype() {
+ return serviceSubtype;
+ }
+
+ public byte[] time2() {
+ return time2;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() {
+ return _parent;
+ }
+ }
+
+ public static class TelemetryData extends KaitaiStruct {
+ public static TelemetryData fromFile(String fileName) throws IOException {
+ return new TelemetryData(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public TelemetryData(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public TelemetryData(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
+ this(_io, _parent, null);
+ }
+
+ public TelemetryData(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.sid = this._io.readU1();
+ this.modeSafe = this._io.readU1();
+ this.epsVbatt = this._io.readU1();
+ this.epsBattVcurrent = this._io.readU1();
+ this.eps33VCurrent = this._io.readU1();
+ this.eps5VCurrent = this._io.readU1();
+ this.trxTemp = this._io.readU1();
+ this.epsTemp = this._io.readU1();
+ this.battTemp = this._io.readU1();
+ }
+
+ private int sid;
+ private int modeSafe;
+ private int epsVbatt;
+ private int epsBattVcurrent;
+ private int eps33VCurrent;
+ private int eps5VCurrent;
+ private int trxTemp;
+ private int epsTemp;
+ private int battTemp;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
+
+ public int sid() {
+ return sid;
+ }
+
+ /**
+ * Operational status. 0 = Safe mode 1 = Orbital or Entry mode
+ */
+ public int modeSafe() {
+ return modeSafe;
+ }
+
+ /**
+ * Battery voltage in V formulae ð?‘¦ = 3 + 0.05×ð??Š
+ */
+ public int epsVbatt() {
+ return epsVbatt;
+ }
+
+ /**
+ * Battery bus current in A formulae � = −1 + 0.0078740×�
+ */
+ public int epsBattVcurrent() {
+ return epsBattVcurrent;
+ }
+
+ /**
+ * 3.3V bus current in A formulae � = 0.025*x
+ */
+ public int eps33VCurrent() {
+ return eps33VCurrent;
+ }
+
+ /**
+ * 5V bus current in A formulae � = 0.025*x
+ */
+ public int eps5VCurrent() {
+ return eps5VCurrent;
+ }
+
+ /**
+ * Transceiver’s temperature in °C formulae � = −15 + 0.25×�
+ */
+ public int trxTemp() {
+ return trxTemp;
+ }
+
+ /**
+ * Power system’s temperature °C formulae � = −15 + 0.25×�
+ */
+ public int epsTemp() {
+ return epsTemp;
+ }
+
+ /**
+ * Batteries temperature in °C formulae � = −15 + 0.25×�
+ */
+ public int battTemp() {
+ return battTemp;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() {
+ return _parent;
+ }
+ }
+
+ public static class Packetheader extends KaitaiStruct {
+ public static Packetheader fromFile(String fileName) throws IOException {
+ return new Packetheader(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public Packetheader(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public Packetheader(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent) {
+ this(_io, _parent, null);
+ }
+
+ public Packetheader(KaitaiStream _io, FrameTlmEntrySat.UiFrameTlmEntrySat _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.version = this._io.readBitsInt(3);
+ this.packetType = this._io.readBitsInt(1) != 0;
+ this.packetFlag = this._io.readBitsInt(1) != 0;
+ this.packetApid = this._io.readBitsInt(11);
+ this._io.alignToByte();
+ this.sequenceControl = this._io.readU2be();
+ this.packetLenght = this._io.readU2be();
+ }
+
+ private long version;
+ private boolean packetType;
+ private boolean packetFlag;
+ private long packetApid;
+ private int sequenceControl;
+ private int packetLenght;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.UiFrameTlmEntrySat _parent;
+
+ public long version() {
+ return version;
+ }
+
+ public boolean packetType() {
+ return packetType;
+ }
+
+ public boolean packetFlag() {
+ return packetFlag;
+ }
+
+ public long packetApid() {
+ return packetApid;
+ }
+
+ public int sequenceControl() {
+ return sequenceControl;
+ }
+
+ public int packetLenght() {
+ return packetLenght;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.UiFrameTlmEntrySat _parent() {
+ return _parent;
+ }
+ }
+
+ public static class DestCallsignRaw extends KaitaiStruct {
+ public static DestCallsignRaw fromFile(String fileName) throws IOException {
+ return new DestCallsignRaw(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public DestCallsignRaw(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public DestCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent) {
+ this(_io, _parent, null);
+ }
+
+ public DestCallsignRaw(KaitaiStream _io, FrameTlmEntrySat.Ax25Header _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this._raw__raw_destCallsignRor = this._io.readBytes(6);
+ this._raw_destCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_destCallsignRor, 8 - (1), 1);
+ KaitaiStream _io__raw_destCallsignRor = new ByteBufferKaitaiStream(_raw_destCallsignRor);
+ this.destCallsignRor = new DestCallsign(_io__raw_destCallsignRor, this, _root);
+ }
+
+ private DestCallsign destCallsignRor;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.Ax25Header _parent;
+ private byte[] _raw__raw_destCallsignRor;
+ private byte[] _raw_destCallsignRor;
+
+ public DestCallsign destCallsignRor() {
+ return destCallsignRor;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.Ax25Header _parent() {
+ return _parent;
+ }
+
+ public byte[] _raw__raw_destCallsignRor() {
+ return _raw__raw_destCallsignRor;
+ }
+
+ public byte[] _raw_destCallsignRor() {
+ return _raw_destCallsignRor;
+ }
+ }
+
+ public static class SrcCallsign extends KaitaiStruct {
+ public static SrcCallsign fromFile(String fileName) throws IOException {
+ return new SrcCallsign(new ByteBufferKaitaiStream(fileName));
+ }
+
+ public SrcCallsign(KaitaiStream _io) {
+ this(_io, null, null);
+ }
+
+ public SrcCallsign(KaitaiStream _io, FrameTlmEntrySat.SrcCallsignRaw _parent) {
+ this(_io, _parent, null);
+ }
+
+ public SrcCallsign(KaitaiStream _io, FrameTlmEntrySat.SrcCallsignRaw _parent, FrameTlmEntrySat _root) {
+ super(_io);
+ this._parent = _parent;
+ this._root = _root;
+ _read();
+ }
+
+ private void _read() {
+ this.srcCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
+ }
+
+ private String srcCallsign;
+ private FrameTlmEntrySat _root;
+ private FrameTlmEntrySat.SrcCallsignRaw _parent;
+
+ public String srcCallsign() {
+ return srcCallsign;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public FrameTlmEntrySat.SrcCallsignRaw _parent() {
+ return _parent;
+ }
+ }
+
+ private Ax25Frame frameTlmEntrySat;
+ private FrameTlmEntrySat _root;
+ private KaitaiStruct _parent;
+
+ /**
+ * @see Source
+ */
+ public Ax25Frame frameTlmEntrySat() {
+ return frameTlmEntrySat;
+ }
+
+ public FrameTlmEntrySat _root() {
+ return _root;
+ }
+
+ public KaitaiStruct _parent() {
+ return _parent;
+ }
}
diff --git a/ModuleEntrySatTelemetry/src/site/apt/about.apt b/ModuleEntrySatTelemetry/src/site/apt/about.apt
index 477e048155fcdc11ab4f63affbff1c346cb07046..90a8df839c9b8293dcbcaf2fc1cdc6102834f1de 100644
--- a/ModuleEntrySatTelemetry/src/site/apt/about.apt
+++ b/ModuleEntrySatTelemetry/src/site/apt/about.apt
@@ -1,3 +1,4 @@
+
---
ModuleEntrySatTelemetry
---
diff --git a/ModuleEntrySatTelemetry/src/site/apt/best-practices.apt b/ModuleEntrySatTelemetry/src/site/apt/best-practices.apt
index 5cf7d9ce61ba2b96896749a7f9526449a58c1f00..2a783c27dd66badf7ba259a1f993732d5408696d 100644
--- a/ModuleEntrySatTelemetry/src/site/apt/best-practices.apt
+++ b/ModuleEntrySatTelemetry/src/site/apt/best-practices.apt
@@ -1,3 +1,4 @@
+
This application demonstrates Maven 2 site generation functionalities. One of the nicer features of Maven is the ability to create an internal technical web site
at very little cost. Maven 2 extends this functionality, and gives you powerful new ways
to generate site content...
\ No newline at end of file
diff --git a/ModuleEntrySatTelemetry/src/site/site.xml b/ModuleEntrySatTelemetry/src/site/site.xml
index b9cbe2418d0687cff208411a48379513ccb52f8b..d13b62d95b0330b7d34552fda5bf005fa2a957ff 100644
--- a/ModuleEntrySatTelemetry/src/site/site.xml
+++ b/ModuleEntrySatTelemetry/src/site/site.xml
@@ -1,4 +1,5 @@
+
diff --git a/ModuleSIDS/.classpath b/ModuleSIDS/.classpath
index da63477573f840e22128eef12c77a86f766bc052..d0e5faff289e443e66db5b9339563a5ee535e833 100644
--- a/ModuleSIDS/.classpath
+++ b/ModuleSIDS/.classpath
@@ -8,9 +8,9 @@
+
-
@@ -23,16 +23,5 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ModuleSIDS/pom.xml b/ModuleSIDS/pom.xml
index 53ee33e929dc509bf02bd9cf67f88a4827faadbe..ccd27c852bf16d7316de1ae79f47d0ab0bc44495 100644
--- a/ModuleSIDS/pom.xml
+++ b/ModuleSIDS/pom.xml
@@ -3,7 +3,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- ModuleSIDS
+
+
+ org.josast
+ JOSAST-parent
+ 0.0.2-SNAPSHOT
+
+
+
+
ModuleSIDS
0.0.1-SNAPSHOT
jar
@@ -19,33 +27,6 @@
1.8
${env.JAVA_HOME}
- 2.8
- 2.3.2
- 2.8
- 2.7
- 1.3
- 2.8.1
- 2.3
- 3.11.0
- 2.2.2
- 3.3
- 2.2
- 2.1.2
- 2.12
- 2.12
- 2.2
- 2.5.1
- 1.3.1
-
- ${project.basedir}/code-analysis/checkstyle.xml
-
- ${project.basedir}/code-analysis/pmd.xml
-
- false
- false
- false
- false
- false
@@ -59,62 +40,62 @@
org.apache.httpcomponents
httpclient
- 4.5.6
+ 4.5.5
org.apache.httpcomponents
httpmime
- 4.5.6
+ 4.5.5
org.apache.httpcomponents
httpcore
- 4.4.10
+ 4.4.9
org.apache.httpcomponents
httpclient-win
- 4.5.6
+ 4.5.5
org.apache.httpcomponents
httpclient-cache
- 4.5.6
+ 4.5.5
-
+ 4.5.5
+
commons-codec
commons-codec
- 1.11
+ 1.10
commons-logging
commons-logging
- 1.2
+ 1.1.2
org.apache.httpcomponents
fluent-hc
- 4.5.6
+ 4.5.5
net.java.dev.jna
jna
- 5.0.0
+ 4.4.0
@@ -122,7 +103,7 @@
net.java.dev.jna
jna-platform
- 5.0.0
+ 4.4.0
@@ -136,531 +117,7 @@
-
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- 2.8
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-changelog-plugin
- ${plugin.maven-changelog.version}
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- 2.3
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.5
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-source-plugin
- ${plugin.source.version}
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- ${plugin.enforcer.version}
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${plugin.compiler.version}
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${plugin.surefire.version}
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
- ${plugin.failsafe.version}
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
- ${plugin.jxr.version}
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
- ${plugin.checkstyle.version}
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
- ${plugin.pmd-plugin.version}
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${plugin.javadoc.version}
-
-
- org.codehaus.mojo
- versions-maven-plugin
- ${plugin.versions-maven.version}
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
- ${plugin.cobertura-maven.version}
-
-
- org.codehaus.mojo
- findbugs-maven-plugin
- 2.4.0
-
-
- org.codehaus.mojo
- taglist-maven-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-release-plugin
- ${plugin.release.version}
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- ${plugin.dependency.version}
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${plugin.deploy.version}
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
- true
-
-
-
- generate-sources
- verify
-
- jar-no-fork
-
-
-
-
-
- maven-site-plugin
- ${plugin.site.version}
-
-
- org.apache.maven.wagon
- wagon-ssh
- ${plugin.wagon-ssh.version}
-
-
-
- true
-
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
-
- false
- false
-
-
-
-
- summary
- project-team
- dependencies
- issue-tracking
-
- modules
- plugins
-
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
- ${checkstyle.skip}
- ${maven-checkstyle-plugin.configLocation}
- false
- true
- true
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
- ${pmd.skip}
- ${maven.compiler.source}
- ${project.build.sourceEncoding}
-
-
- /rulesets/basic.xml
- /rulesets/unnecessary.xml
-
-
- false
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- ${javadocs.skip}
- false
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
-
- dependency-updates-report
- plugin-updates-report
- property-updates-report
-
-
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
-
- ${cobertura.skip}
-
-
-
- org.codehaus.mojo
- findbugs-maven-plugin
-
- ${findbugs.skip}
- true
-
-
-
- org.codehaus.mojo
- taglist-maven-plugin
-
- ${project.build.sourceEncoding}
- en
-
-
-
- Code sections needing review
-
-
- REVIEWREQUIRED
- exact
-
-
-
-
- Todo Work
-
-
- todo
- ignoreCase
-
-
- @todo
- ignoreCase
-
-
-
-
- Noted Bugs
-
- fixme
- ignoreCase
-
-
-
- Deprecated Items
-
- @deprecated
- ignoreCase
-
-
-
-
-
-
-
-
-
-
- attach-descriptor
-
- attach-descriptor
-
-
-
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
-
- ${cobertura.skip}
- 1024m
-
- html
- xml
-
-
- false
-
- 70
- 70
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- **/*.class
-
-
- **/model/*.class
-
-
-
-
-
- clean
- clean
-
- clean
-
-
-
- package
- package
-
- check
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
-
- true
-
-
-
- process-resources
-
- jxr
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- false
- ${javadocs.skip}
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- alphabetical
- false
- ${surefire.jvm.args}
-
-
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
- integration-test
-
- integration-test
-
-
-
- verify
-
- verify
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
- ${pmd.skip}
- ${maven.compiler.source}
- ${project.build.sourceEncoding}
-
-
- ${maven-pmd-plugin.configLocation}
-
- false
-
-
-
- verify
-
- check
- cpd-check
-
-
-
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- 6.1.10
-
- 5
- foo
- 9999
-
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
- ${checkstyle.skip}
- ${maven-checkstyle-plugin.configLocation}
- false
- true
- true
-
-
-
- run-checkstyle
- verify
-
- checkstyle
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- enforce-property
- generate-sources
-
- enforce
-
-
-
-
- java.16.home
-
-
- Required 'java.16.home' property not defined.
- Typically found in
- settings.xml
-
-
-
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- true
- true
-
- ${java.16.home}/bin/javac
- ${jdk.version}
-
- ${maven.compiler.target}
- 128m
- 512m
-
-
-
-
-
-
-
+
diff --git a/ModuleSIDS/src/main/java/org/josast/SIDS/HttpPostSIDS.java b/ModuleSIDS/src/main/java/org/josast/SIDS/HttpPostSIDS.java
index 6376049da2b3b38ebb9fc853351fd9fbb5a6e332..f22e4f9719b2d16b25914c2c7e5b77d586b58986 100644
--- a/ModuleSIDS/src/main/java/org/josast/SIDS/HttpPostSIDS.java
+++ b/ModuleSIDS/src/main/java/org/josast/SIDS/HttpPostSIDS.java
@@ -4,44 +4,81 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
import java.util.ArrayList;
-
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
-import org.apache.http.client.HttpClient;
+
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.impl.client.CloseableHttpClient;
+
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.TrustStrategy;
import org.apache.log4j.Logger;
-/**
- * @author christophe
- *
- */
public class HttpPostSIDS {
-
- static Logger logger = Logger.getLogger(HttpPostSIDS.class);
-
+ private Logger logger = Logger.getLogger("EntrySatLogger");
private static String USER_AGENT = "Mozilla/5.0";
-
- HttpClient client = null;
- HttpPost post = null;
- StringBuffer result = null;
-
+ private CloseableHttpClient client = null;
+ private HttpPost post = null;
+ private StringBuffer result = null;
+
+ /**
+ * Create a Http client for sending SIDS data.
+ * exemple of URL
+ * Satnogs https://db.satnogs.org/api/telemetry/
+ *
+ * @param url Database http or https adress
+ */
public HttpPostSIDS(String url) {
- client = HttpClientBuilder.create().build();
+ client = getCloseableHttpClient();
post = new HttpPost(url);
post.setHeader("User-Agent", USER_AGENT);
}
+ private CloseableHttpClient getCloseableHttpClient() {
+ CloseableHttpClient httpClient = null;
+ try {
+ httpClient = HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .setSSLContext(new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
+ public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
+ return true;
+ }
+ }).build()).build();
+ } catch (KeyManagementException e) {
+ logger.error("KeyManagementException in creating http client instance", e);
+ } catch (NoSuchAlgorithmException e) {
+ logger.error("NoSuchAlgorithmException in creating http client instance", e);
+ } catch (KeyStoreException e) {
+ logger.error("KeyStoreException in creating http client instance", e);
+ }
+ return httpClient;
+ }
+
+ /**
+ * @param sids
+ * @return
+ */
public int SendSIDSBasic(SIDSData sids) {
// Data preparation
+ int resultat = 0;
+ HttpResponse response = null;
+ BufferedReader rd = null;
+
+
List urlParameters = new ArrayList();
urlParameters.add(new BasicNameValuePair("noradID", "" + sids.getNoradID()));
urlParameters.add(new BasicNameValuePair("source", sids.getSource()));
@@ -51,6 +88,7 @@ public class HttpPostSIDS {
urlParameters.add(new BasicNameValuePair("longitude", "" + sids.getLongitude()));
urlParameters.add(new BasicNameValuePair("latitude", "" + sids.getLatitude()));
urlParameters.add(new BasicNameValuePair("version", "2.0.2"));
+
try {
post.setEntity(new UrlEncodedFormEntity(urlParameters));
@@ -58,13 +96,11 @@ public class HttpPostSIDS {
logger.error("URL Encoding error", e);
}
- int resultat = 0;
- HttpResponse response = null;
- BufferedReader rd = null;
+
try {
response = client.execute(post);
resultat = response.getStatusLine().getStatusCode();
-
+ logger.info("URL Result " + resultat);
} catch (IOException e) {
logger.error("Cient executon error", e);
}
@@ -78,6 +114,7 @@ public class HttpPostSIDS {
} catch (UnsupportedOperationException | IOException e) {
logger.error("Buffer reader Exception ", e);
}
+
result = new StringBuffer();
String line = "";
try {
@@ -85,7 +122,6 @@ public class HttpPostSIDS {
result.append(line);
}
} catch (IOException e) {
-
logger.error("Error reading line from server ", e);
}
}
diff --git a/ModuleSIDS/src/main/java/org/josast/SIDS/SIDSData.java b/ModuleSIDS/src/main/java/org/josast/SIDS/SIDSData.java
index 745b1f2aad6eb1b52e14c9c6502e3b615cc4488f..0abbfac2d194356ab50d4d27f6c3a4ed990efbe5 100644
--- a/ModuleSIDS/src/main/java/org/josast/SIDS/SIDSData.java
+++ b/ModuleSIDS/src/main/java/org/josast/SIDS/SIDSData.java
@@ -42,7 +42,7 @@ public class SIDSData {
private long fDown = 0; // Frequency of the receiver's downlink channel during reception (with Doppler), in Hz 435525000
- final private String version = "2.0.0.1";
+ final private String version = "2.0.1";
diff --git a/ModuleSIDS/src/main/java/org/josast/SIDS/Station.java b/ModuleSIDS/src/main/java/org/josast/SIDS/Station.java
index 4c61bfa1e9873740bd4ebe48e2d49511e1bf4035..17e5d06a475a192cb2450c5c7eba21950f8ba6c5 100644
--- a/ModuleSIDS/src/main/java/org/josast/SIDS/Station.java
+++ b/ModuleSIDS/src/main/java/org/josast/SIDS/Station.java
@@ -1,11 +1,25 @@
package org.josast.SIDS;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
public class Station {
+
private String callsign="XtopheSwl";
private String longitude="1.47E";
private String latitude="43.56N";
+ public Station(String callsign, String longitude, String latitude) {
+ super();
+ this.callsign = callsign;
+ this.longitude = longitude;
+ this.latitude = latitude;
+ }
+
+ public Station() {
+ // TODO Auto-generated constructor stub
+ }
public String getCallsign() {
return callsign;
@@ -26,6 +40,24 @@ public class Station {
this.latitude = latitude;
}
+ public boolean checkLatitude (String latitude)
+ {
+
+ Pattern p = Pattern.compile("[\\d]*\\.[\\d]*[N,S]") ;
+ Matcher m = p.matcher(latitude) ;
+ return m.matches() ;
+
+ }
+ public boolean checkLongitude (String longitude)
+ {
+
+ Pattern p = Pattern.compile("[\\d]*\\.[\\d]*[E,W]") ;
+ Matcher m = p.matcher(longitude) ;
+ return m.matches() ;
+
+ }
+
+
}
diff --git a/ModuleSIDS/src/main/java/org/josast/SIDS/app/SendFile.java b/ModuleSIDS/src/main/java/org/josast/SIDS/app/SendFile.java
new file mode 100644
index 0000000000000000000000000000000000000000..e5f9b15b38f8179e40b73d7339359180b63c6c81
--- /dev/null
+++ b/ModuleSIDS/src/main/java/org/josast/SIDS/app/SendFile.java
@@ -0,0 +1,105 @@
+package org.josast.SIDS.app;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+import org.josast.SIDS.SIDSData;
+import org.josast.SIDS.Station;
+
+public class SendFile {
+
+ SIDSData sids = new SIDSData();
+ BufferedReader lecteurAvecBuffer = null;
+ String ligne;
+
+ public void initSIDS ()
+ {
+
+ sids.setStation(new Station());
+ sids.setNoradID(99990);
+ }
+
+ public void OpenFile(String file)
+ {
+ try
+ {
+ lecteurAvecBuffer = new BufferedReader(new FileReader(file));
+ }
+ catch(FileNotFoundException exc)
+ {
+ System.out.println("Erreur d'ouverture");
+ }
+ }
+
+
+ public void readFile ()
+ {
+ boolean first = false;
+ Date dateref=null;
+ try {
+ while ((ligne = lecteurAvecBuffer.readLine()) != null)
+ {
+ // System.out.println(ligne);
+ String[] result1=ligne.split("=");
+ String[] date = result1[1].split("]");
+ String[] trame = result1[2].split("]");
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E MMM dd hh:mm:ss z yyyy",Locale.ENGLISH);
+
+ System.out.println("date : "+date[0]+" - Trame "+trame[0]);
+ Date date2 = simpleDateFormat.parse(date[0]);
+ if (first==false)
+ {
+ dateref=date2;
+ first = true;
+ }
+ else
+ {
+ System.out.println((date2.getTime() - dateref.getTime())/1000);
+ }
+
+ }
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (ParseException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+ public void closeFile()
+ {
+ try {
+ lecteurAvecBuffer.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] argv) throws IOException
+ {
+
+ SendFile sf = new SendFile();
+ sf.OpenFile(argv[0]);
+ sf.initSIDS();
+ sf.readFile();
+ sf.closeFile();
+
+
+
+ }
+
+
+
+
+}
diff --git a/ModuleSIDS/src/main/java/org/josast/SIDS/app/TestSIDS.java b/ModuleSIDS/src/main/java/org/josast/SIDS/app/TestSIDS.java
index fc50dca8f3606819c7badd84ae13fe679d738006..0958ef56bee31371f49f4b013531d7b03846ecac 100644
--- a/ModuleSIDS/src/main/java/org/josast/SIDS/app/TestSIDS.java
+++ b/ModuleSIDS/src/main/java/org/josast/SIDS/app/TestSIDS.java
@@ -3,6 +3,7 @@
*/
package org.josast.SIDS.app;
+import java.io.IOException;
import java.util.GregorianCalendar;
import org.apache.log4j.BasicConfigurator;
@@ -16,38 +17,47 @@ import org.josast.SIDS.Station;
*/
public class TestSIDS {
- private TestSIDS()
- {
- //This prevents the default parameter-less constructor from being used elsewhere in the code.
+ private HttpPostSIDS client=null;
+
+
+ public TestSIDS(String url) {
+ super();
+ client = new HttpPostSIDS(url);
+
}
+
+ public void Send(SIDSData sids)
+ {
+ int result = client.SendSIDSBasic(sids);
+
+ System.out.println("resutats = " + result);
+ System.out.println("resutats = " + client.getResult());
+ }
/**
* @param args
*/
- public static void main(String[] args) {
+ public static void main(String[] args) throws IOException {
BasicConfigurator.configure();
- String url = "https://db.satnogs.org/api/telemetry/";
-
- // String url = "http://127.0.0.1:9000/echoPost";
- // String url = "https://amsat.electrolab.fr/SIDS";
+ // String url = "https://db.satnogs.org/api/telemetry/";
+ // String url = "http://127.0.0.1:9000/echoPost";
+ String url = "https://amsat.electrolab.fr/SIDS";
+
+
+ TestSIDS test = new TestSIDS(url);
+
-
- HttpPostSIDS client = new HttpPostSIDS(url);
+ // initialise SIDS data
SIDSData sids = new SIDSData();
sids.setStation(new Station());
-
- sids.setNoradID(99999);
+ sids.setNoradID(99991);
sids.setTelemetryData(GregorianCalendar.getInstance().getTime(),
- "A0AEA682A864E0A0AEA682A8646103F024000040EF07006402660217000045");
+ "8c6c96a88240e09e9c60648ca46103f0000000000801ca5c0012100319240a0d4b5f0600ff2800002822443e6fb0870d0a24c0");
System.out.println(sids.toStringBasic());
- int result = client.SendSIDSBasic(sids);
-
- System.out.println("resutats = " + result);
- System.out.println("resutats = " + client.getResult());
-
+ test.Send(sids);
}
diff --git a/ModuleSIDS/src/site/site.xml b/ModuleSIDS/src/site/site.xml
index d019c3db3438f001d6afb1fa92c9eb0226860bfc..ab501b07b6a86b21b2d241a7581fcf6b52e23dd6 100644
--- a/ModuleSIDS/src/site/site.xml
+++ b/ModuleSIDS/src/site/site.xml
@@ -32,8 +32,6 @@
-
-