Newer
Older
package org.josast.SIDS;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
/**
* SIDSdate is a simple class used to store SIDS data information
*
private final SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat(
"yyyy-MM-dd'T'HH:mm:ss'Z'");
private int noradID; // Norad ID of the spacecraft
private String source = ""; // Callsign or user name of the receiver
private String timestamp; // UTC timestamp (see ISO 8601)
// 2018-01-24T23:42:46Z
private String frame; // The received data, in hexadecimal string (AX.25
// packet with or without KISS 'C0 00 .. C0'.
// Whitespaces optional. C0 00 A9 05 DE ...
private final String locator = "longLat"; // Type of the given receiver's
// location. Currently, only
// 'longLat' is supported. longLat
private String longitude = null; // Longitude of the receiver (WGS84)
// 8.95564E
private String latitude = null; // Latitude of the receiver (WGS84)
// 49.73145N
private int tncPort = 0; // Optional as per SiDS standard specification, but
// not used in PicSat SiDS system 0
private double azimuth = 0.0; // azimuth degree of directionnal antenna (if
// avaiblable) 10.5
private double elevation = 0.0; // elevation degree of directionnal antenna
// (if avaiblable) 85.0
private long fDown = 0; // Frequency of the receiver's downlink channel
// during reception (with Doppler), in Hz 435525000
/**
* addTelemetryData is used for adding telemetry data with associated
* TimeStamp. The timestamp is formated in correct date format.
*
* @param date Date in local time
* @param inputframe telemetry data
*/
public void setTelemetryData(final Date date, final String inputframe) {
ISO8601DATEFORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
timestamp = ISO8601DATEFORMAT.format(date);
frame = inputframe;
public String getLongitude() {
return longitude;
}
public void setLongitude(final String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(final String latitudein) {
this.latitude = latitudein;
}
public void setNoradID(final int noradID) {
this.noradID = noradID;
}
public void setSource(final String source) {
this.source = source;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(final String timestamp) {
this.timestamp = timestamp;
}
public String getFrame() {
return frame;
}
public void setFrame(final String frame) {
this.frame = frame;
}
public int getTncPort() {
return tncPort;
}
public void setTncPort(final int tncPort) {
this.tncPort = tncPort;
}
public double getAzimuth() {
return azimuth;
}
public void setAzimuth(final double azimuth) {
this.azimuth = azimuth;
}
public double getElevation() {
return elevation;
}
public void setElevation(final double elevation) {
this.elevation = elevation;
}
public void setfDown(final long fDown) {
this.fDown = fDown;
}
/**
* Set Station information. Fill source, longitude & latitude information.
*
* @param station
*/
public void setStation(final Station station) {
source = station.getCallsign();
public String toStringBasic() {
StringBuilder sb = new StringBuilder();
sb.append("noradID=");
sb.append(noradID);
sb.append("&source=");
sb.append(source);
sb.append("×tamp=");
sb.append(timestamp);
sb.append("&frame=");
sb.append(frame);
sb.append("&locator=");
sb.append(locator);
sb.append("&longitude=");
sb.append(longitude);
sb.append("&latitude=");
sb.append(latitude);
sb.append("&version=");
sb.append(version);