LIGHT BLUE TEAM

 Meet the members of our Light Blue Team  from Summer Camp 2018

 

Members of the Light Blue Team: Sharif Alhusein, Luis Navarro, Celia Hermoso. They started working with Cosmos and Arduino. Now they are focusing on XML.

 

Objetives

We have been working based on a project which aim is to connect a CubeSat with a ground station. It works with an Arduino’s code in the CubeSat which send telemetry to a computer with Matlab. Our objective consists of making several changings on this project mention before in order to send telemetry through Cosmos which is a Telemetry Software that can communicate with a computer placed in the ground station.

The Light Blue Team has to work on an Arduino’s code that works with Matlab and change it for Cosmos.

The project

  • Arduino’s script

After reading and analyzing a script we have been given, we have noticed that the microcontroller carries out the sensors’ measures and sends them through telemetry to Matlab. Therefore, all the calculus remains the same but we have to work on datum transmission which must be sent via serial port.

Afterwards, the datum is processed in Cosmos. In order to carry out this, we have come up with an agreement with the other group which is working on Cosmos. The deal is to send all the information in just one packet. We have created a struct. A struct type is composed of fields or members that can have different types.

We create a variable called data and ascribe it the sensors’ values.

Furthermore, using the Matlab’s script, we have tried to connect the ground station with the CubeSat. The goal is to receive telemetry packets through radiofrequency.

To continue our work with Arduino, we have noticed that it is necessary to change all the serial2 commands to serial. This is to able the communication between Cosmos and Arduino via radiofrequency. The code is the same only that serial2 is changed by serial.

We try to upload the code to arduino and listen with the serial monitor of the arduino ID. But we realized that the struc is send character by character but the serial monitor doesn’t received them correctly. This test did not help us at all.

Now that we have the script, the next step is coordinate with the Blue Team to try to establish connection between the ground station and the CubeSat.

We are not able to connect through radiofrequency so we try to connect Arduino and Cosmos via serial port. This helps us to know that both sides are right because it works.

Cosmos graphics from Telemetry Grapher viewer

  • XML and xtce files

After working with Arduino and the CubeSat, we started to learn XML language in order to be able to write Cosmos’ script in an XTCE file. Our goal is to run Cosmos with an XTCE file instead of a TXT file.

TXT to XTCE diagram

With the help of an example file, we learned the structure of an XTCE file. The program is divided in two main trees: Telemetry Meta Data and Command Meta Data.

But we will focus just in the one that works with Telemetry which has this structure:

  • Parameter Type Set
  • Parameter Set
  • Container Set

XTCE files structure diagram

 

Once we worked on the XTCE file, we ran Cosmos with it. At first, Cosmos didn’t identify the datum but at least it received the telemetry packet correctly. We could notice this error because in the Telemtry Packect Viewer appeared NaN (not a number). The problem was that we did not define “PACKET_DATA_LENGTH” and “PACKET_ID_Data_Type” correctly.

Now Cosmos does receive telemetry but it doesn’t decode it.

In order to correct that we had to change our Arduino’s code. The problem was in the XML file but the way to solve it was through Arduino. Cosmos does not understand the “BitOrder” from XML, which was LITTLE_ENDIAN (mostSignificantBitFirst), so it set it up as BIG_ENDIAN by default. This is the reason why Cosmos received the datum with swap endianness.

Presentation of the Light BlueTeam weekly work: Light_Blue_Team