Skip to content

Adding new data points

Franz Miltz edited this page Aug 7, 2021 · 1 revision

Overall structure

The data, that is sent to Mission Control GUI, consists of 3 parts:

  1. CRUCIAL. This includes data points, which are displayed across the whole GUI in various fixed points, for example, velocity, acceleration, position and current State Machine state.
  2. STATUS. This includes data points (usually bool values), which are displayed in the STATUS tab, for example, module statuses.
  3. ADDITIONAL. This includes every other data point that is not part of crucial or status data. Usually it has a numerical or string type and is displayed in the GUI's DATA section.

Editability

If you want to edit something that belongs to CRUCIAL or STATUS data, you have to contact someone that is responsible for GUI, as the changes require the modification of GUI.

Otherwise, you can add/edit your own data points under ADDITIONAL data, and GUI will automatically accommodate new changes.

Adding new data points to ADDITIONAL DATA

File location

The file that you have to edit is telemetry/writer.cpp and the function is packAdditionalData()

Add function with parameters

If you want to simply add a new data point, use function add() with parameters:

  • name - it specifies the name that will be showed next to the value.
  • min - it specifies the minimum value for only int and float type data. The GUI will notify user if actual value goes below the minimum value.
  • max - it specifies the maximum value for only int and float type data. The GUI will notify user if actual value goes above the maximum value.
  • unit - it specifies the unit for only int and float type data.
  • value - actual value, which could be of any implemented type.

Hierarchy

If you want to add a hierarchy to data, you should use startList(string name) and endList()

IMPORTANT: startList(name) and endList() are paired, so do not mix them up or change their order. Think about them as if they are brackets.

For example:

  • Batteries
    • LP 1
      • Charge
      • Voltage
    • LP 2
      • Charge
      • Voltage

Code:

startList("Batteries");

startList("LP 1");
add("Charge", 0, 100, "%", <value>);
add("Voltage", 0, 5, "V", <value>);
endList(); // LP 1

startList("LP 2");
add("Charge", 0, 100, "%", <value>);
add("Voltage", 0, 5, "V", <value>);
endList(); // LP 2

endList(); // Batteries
Clone this wiki locally