Using MCS with Flightkit

This guide will show you how to connect MCS to a Flightkit deployment.

1. Building MCS-compatible Deployments

First, make sure you have the the correct versions of both Flightkit and MCS.

Connecting to MCS requires Flightkit version 2025.3.0 or newer. Flightkit compatibility was introduced in version 22.4.8 of MCS.

You will need a Flightkit workspace with a mission in it. The mission should contain at least one deployment you wish to interact with using MCS.

MCS uses PUS to connect to flight software, so the Flightkit deployments you wish to interact with using MCS need to be PUS compatible. In particular:

  • They must use PUS-based comms stacks, as described in the Communication Protocols Reference.

  • Instances of the core.component.pas.PASTarget component type used to receive requests from MCS must set .b_OmitTimeFields = false in their initialisation data.

The required value of .b_OmitTimeFields changed in Flightkit 2026.4.0 from true to false. PASTarget initialisation data should now be the same whether handling requests from Helix Lab or MCS.

Flightkit provides several PUSCommsDemo deployment types out-of-the-box for you in the FlightkitFoundation bundle. These are instantiated in the EnduroSatObcDemo, KrytenDemo, LinuxDemo and PiDemo missions, and are configured as described above. For demonstration and testing, you can use whichever mission is appropriate to your development environment.

For information about bundles and how to include them within a workspace, refer to the Getting Started guide.

Connecting to the PUSCommsDemo deployment using MCS follows a similar process to how you would normally connect using Helix Lab, with just a few differences. The following sections describe this process using the LinuxDemo mission.

2. Generating a Legacy Spacecraft Database

The MCS uses a legacy Spacecraft Database (SCDB) to interpret the flight software model. This database can be generated while building a mission by using the --legacy-scdbs argument.

Run the following command inside the workspace to build the mission and generate the legacy SCDB.

hfk mission build LinuxDemo --legacy-scdbs

Note that the --legacy-scdbs argument works for both build and generate when working with missions.

This will produce a legacy SCDB in the following directory in the workspace. Replace "X.Y.Z" with the version of FlightkitFoundation you are using.

output/bundles/FlightkitFoundation/X.Y.Z/missions/LinuxDemo/PUSCommsDemo/Default

3. Connecting with MCS

In separate terminals, open MCS Server and Display by running the following commands in the MCS_Server and MCS_Display directories respectively:

. runMCS_Server.sh
. runMCS_Display.sh

Open up the Mission Management window at File > Manage mission…​ and then add in a new asset and target. We recommend you give them the same names as in your Flightkit mission. If you are testing with PUSCommsDemo, the asset is called LinuxAsset and the target is called PUSCommsDemo.

Add a deployment to the target you just created, filling in the following fields:

  • Deployment id - Give this the same name as your deployment instance, e.g. Default.

  • Definition file - Select the legacy SCDB you created as the definition file.

The rest of the fields can be left blank. Then load and import the mission.

Each deployment has a unique deployment ID (different to the ID field populated when adding a deployment!) which the MCS uses when routing packets. We need to specify this in the protocol settings.

Run the following command in the mission’s workspace to find the deployment ID.

grep -rnI DEPLOY_DEPLOYMENT_ID generated

This command will return the deployment ID for each deployment that has ever been generated in the workspace. We just need the relevant deployment ID, which in our case is that for LinuxDemo/PUSCommsDemo/Default.

Go to File > Protocol properties…​ to open the Update protocol properties window and scroll down to Flightkit deployment ID in the General tab. Enter the deployment ID you just found in here.

A workaround for older versions of MCS can be achieved by disabling deployment ID checks, although this is not recommended as it can cause problems when working with multiple deployments. To do this, go to the Monitor tab in the tool bar and uncheck Enable deployment ID checks.

You’re now ready to run your flight software deployment as usual, by executing the binary file.

./output/bundles/FlightkitFoundation/9.0.0/missions/LinuxDemo/PUSCommsDemo/Default/Default

Add in a new TCP Client Connection in the Connections tab in the left-hand menu. Give it a name, then set it to the appropriate Address and Port number specified by the initialisation data of your deployment instance’s TCP server; for PUSCommsDemo these are 127.0.0.1 and 51423 respectively. Ensure that Framing is set to Packet stream.

You can now click Connect…​ to access the deployment.

A good check to make sure it has worked is to invoke the dumpVersion Action in the Version component instance – if you see an output in the terminal, it’s worked!