Skip to content
Pedro12909 edited this page Aug 2, 2018 · 3 revisions

After it's first iteration, USOC has been ported from Swing to JavaFX. After the summer of 2018, it has suffered some modifications, particularly in the visualization module (GUI).

The MainWindow can be divided into 3 sections (all inside a SplitPane). Each of these sections (which we will call panels from now on) are implemented on individual class files, to allow more modularity.

State Panel

The picture below shows the State Panel:

It holds groups of states (called Segments). Each state can represent a data point from a given sensor. A ContextMenu (the menu that appears when an item is right clicked) allows for easy modification of this panel(Add/Remove segments, assign data to individual states, etc).

USOC Panel

The pictures below shows the USOC Panel:

This is the central item of the MainWindow. It has two components, inside of a TabPane:

  • The Chart Grid
  • The GNSS View

Similarly to the State Panel, the Chart Grid also has a set of features accessible through a ContextMenu.

Charts

The charts in the Java Swing GUI are implemented using the JFreeChart library. This library allows to draw line charts (which are good for displaying sensor data) relatively easy.

The charts are connected to the MainController using the Observer Pattern described in the Internal Communication section and get updated every time new data is parsed.

An example of this implementation is provided below:

public LineChart(String chartname, String x, String y, String seriesname, TreeMap<Long, Object> data, DataType dt) {
    dataset = new XYSeriesCollection();
    addSeries(seriesname, data, dt);
    chart = createChart(chartname, x, y, dataset);
    final ChartPanel chartPanel = new ChartPanel(chart);
    this.add(chartPanel);
}

Log Panels

IridiumLogPanel

The picture below shows the IridiumLogPanel.

IridiumLogPanel

Every time a MailEvent is detected, the text area gets updated with the newest log information. The buttons and labels above have the following purposes:

Subject Label

This shows the subject of the latest e-mail.

Last Message from Label

This shows the sender of the latest e-mail.

File name Label

This shows the file name of the latest attachment.

Received at Label

This shows the time stamp at which the e-mail was received by the mail server.

Open Button

This shows a file chooser dialog where the user can choose to open files to display in the ground station.

Clear Data Button

This allows to clear the data currently displayed by the ground station.

#Messages on reconnect

This allows to set the number of messages that will be downloaded once the reconnect button is pressed.

exportCSV Button

This allows to export the displayed data to a csv file.

reconnect Button

This allows to reconnect to the mail server in case, an error occured or the connection was lost.

SerialLogPanel

The picture below shows the SerialLogPanel

SerialLogPanel

Every time a SerialEvent is detected, the text area gets updated with the newest log information. The buttons and labels above have the following purposes:

Baudrate box

This allows you to specify at what baudrate you want to connect to the serial port.

Ports box

This allows you to set the port you want to connect to. The port gets updated regularly every 500ms and new ports will show in the JComboBox

Command box

This allows you to specify the command you want to send via the serial interface.

Send Command Button

This allows you to send the specified command to the connected serial port

Connect Button

This will connect the ground station to the selected serial port at the selected baud rate.

Clone this wiki locally