Decoding MMX

MMX is the Martian Moons eXploration mission from JAXA. It is a sample return mission that will bring samples of Phobos back to Earth and also study Deimos and the Martian atmosphere. It was launched on 2026-10-19 from Tanegashima Space Center. Starting 14 hours after launch, I made a long observation of the spacecraft with the Allen Telescope Array, on 2026-10-20 from 09:45 UTC to 20:50 UTC. I recorded the X-band telemetry downlink at 8433.7 MHz. This post is an analysis of the recording and the decoded telemetry.

Because the observation is 11 hours long at 6.144 Msps, it is very large. In order to reduce the size to something reasonable for Zenodo (which has 50 GB as the dataset limit), I have downsampled the data to 2.048 Msps 8-bit IQ. Even so, 50 GB can only store about 3.4 hours of data, so the data shared in Zenodo is just the beginning of the recording, up to the size limit. Each linear polarization is stored in a different dataset:

Observation setup

I observed during the first visibility window from the ATA after launch. I used Horizons to fetch the ephemerides and calculate the antenna pointing for the ATA, which is shown here.

I used antenna 1a from the array, and recorded in dual (linear) polarization, as usual. When I began observing, I did a few test recordings at different sample rates to determine the appropriate sample rate for the signal bandwidth. I settled on 6.144 Msps because of some carriers that I saw that I suspected could be ranging tones. However, later I realized that they are even harmonics of the data modulation. The centre frequency I used was 8433.7 MHz. I got this from ITU Explorer. The data is quite difficult to read on the webpage, because there are multiple frequency bands around 8.4 GHz on TX, which are difficult to see due to the band at 32 GHz. However, AI can parse this into numbers quite easily. I suspect the multiple bands are for the main signal and for DOR tones, which are usually ~19 MHz away from the main carrier. Additionally, the listed RX frequency for the X-band uplink can be used to derive the downlink frequency with the usual 880/749 frequency ratio.

Waterfall analysis

As usual, I have computed waterfall data for the IQ recording. I have used an FFT size of \(2^{15}\) points, and integrated 1875 non-overlapping FFTs, which gives a resolution of 187.5 Hz and 10 seconds. The following figure shows the plots of the waterfall and the average power spectral density throughout the whole recording. We see that the modulation is PCM/PSK/bi-phase-L (Manchester encoded data phase modulated with residual carrier), but there are two time periods where the data modulation is absent.

In these plots it is clear that many of the spectral lines that are present are even harmonics of the data subcarrier, since they lie exactly in the nulls of the bi-phase-L modulation.

The following figure shows the average power spectral density during the 11:00 to 11:40 UTC time period, where the data modulation is absent. I believe that the waveform in this period is a PN ranging waveform sent through the spacecraft transponder, but I have not yet tried to match this waveform to the usual PN ranging codes.

Something that can also be seen in the waterfall above is the telecommand loopback. When the data modulation is active, it is rather weak, and indeed absent most of the time. But when the data modulation is switched off, much more power is allocated to the telecommand loopback. This is best seen in the following Inspectrum waterfall, which shows the moment when the data modulation is turned off. The strong carrier in the middle is the residual carrier.

Inspectrum waterfall of the moment when data modulation is switched off

When the ranging modulation starts, the power of the telecommand loopback drops. This can be seen here in Inspectrum, where we see a ranging tone appearing and the telecommand signal decreasing in power.


Inspectrum waterfall of the moment when ranging modulation is switched on

The following waterfall shows a detail of the carrier and telecommand loopback. We see that the telecommand loopback is only present when needed, rather than all the time.

Modulation and coding

As I mentioned above, the modulation is PCM/PSK/bi-phase-L. The baudrate is 209715 baud including Doppler. Coding is \(r = 1/4\) CCSDS Turbo coding with 1115 byte frames. The telemetry frames are CCSDS AOS Space Data Link frames with a Frame Error Control Field (CRC-16).

I have used the GNU Radio flowgraph shown below to decode the telemetry. This uses the Auto-Polarization block from gr-satellites, since the SNR from a single linear polarization is not sufficiently high for error-free decode, especially when the spacecraft gets farther. The other interesting feature of this flowgraph is how I have handled the Manchester coded data. I use a Polyphase Arbitrary Resampler to resample to 8 samples per symbol, and then run the data through a pulse shape filter for the Manchester pulse: \([1, 1, 1, 1, -1, -1, -1, -1]\). Symbol synchronization is done at the output of this filter with the Gardner TED as usual. This Manchester matched filter approach works reasonably well, but I have not investigated how it compares in performance to other approaches I have used in the past.

MMX decoder GNU Radio flowgraph

The following plot shows the GUI of the flowgraph processing the beginning of the recording. Note that the spectral lines corresponding to even harmonics of the data subcarrier appear in the real part at the PLL output. This is to be expected, because they are even powers of a purely imaginary subcarrier.

MMX decoder GNU Radio GUI

Telemetry analysis

As mentioned above, MMX transmits AOS Space Data Link frames. The spacecraft ID is 0xe4, which is indeed assigned to MMX in the SANA registry. In this recording, virtual channels 0, 1, 62 and 63 are in use. Virtual channel 0 is used to transmit real-time telemetry. Virtual channel 1 is used to transmit stored (backorbit) telemetry. Virtual channel 62 is used to send spacecraft time periodically. Virtual channel 63 is the only-idle-data channel, as specified by the AOS protocol. All the AOS frames carry an Operational Control Field (OCF) that contains a Communications Link Control Word (CLCW).

The following figure shows the virtual channel usage over time. The horizontal axis corresponds to the relative number of all the decoded telemetry frames, so the time gaps in which the telemetry signal is off do not appear in this plot. We can see that real-time telemetry (VC 0) gets a relatively high share of the downlink, slightly above 80%. Virtual channel 62 corresponds to a very small bandwidth. The rest of the downlink is used to send only-idle-data (VC 63) most of the time, or backorbit telemetry (VC 1) when requested, which happens twice in this recording. When VC 1 is active, the rate of VC 62 also drops.

The following plot shows the average frame loss over time in virtual channel 0. The loss is computed as the increment in the virtual channel frame count minus one, so an average loss of 1 really means that every other frame is received (50% frame error rate). The horizontal axis is the virtual channel frame count, so the gaps where the telemetry is off are represented. We can also see that during these gaps the virtual channel frame count keeps incrementing at the usual rate, so only the RF transmitter or modulator is off. For the first part of the recording the decode is almost error-free, but in the second half, as the signal gets weaker, the loss increases to around 0.1, which means that in every 10 decoded frames there is one where the sequence count incremented by 2. This corresponds to a frame error rate of 1/11 (9.1%). I have not tried to optimize the decoder to reduce the loss.

The CLCWs contain a static value in all fields except the report value. Interestingly, the no RF available and no bit lock flags are always false, even though we know that most of the time there is no telecommand uplink. It seems that these flags are not functional. The report value increases throughout the recording. Many of these increments happen at times where we don’t see a telecommand uplink in the loopback. I have not investigated this further, but I have three possible explanations in mind: the spacecraft transponder might allow switching off the loopback, so there is a telecommand uplink but we don’t see it; the telecommand uplink is too brief to see in the waterfall plot; these telecommands correspond to pre-scheduled commands that execute at a given time without an uplink (in this case it would be weird for the commands to go through COP and increment the report value when they execute, but it is still a possibility).

Virtual channel 0

Virtual channel 0 contains CCSDS Space Packets using M_PDU. All the packets have a secondary header, which seems to be 8 bytes long. The first 5 bytes of the header contain a timestamp as a CCSDS CUC time code with an explicit P-field and an epoch of 2013-01-01T00:00:00 (I have not tried to determine whether the epoch is UTC, TAI, or something else). The next byte in the header is always a 0, the following byte varies, and the last byte is always 0x65 for APID 817 and 0x60 for the remaining APIDs. The first byte after the secondary header seems to be a packet type. Within the same APID, packets with the same packet type have the same length and structure, except for APID 817. This packet type could arguably form part of the secondary header.

The following plot shows the APID activity over time. APIDs 49, 53, 57 and 61 are sent periodically all the time, while APID 817 seems to be sent as a consequence of some events. Note that APID 2047 (the idle APID) is not sent. This might be just because there is never the need to flush an AOS frame with an idle packet in the real-time telemetry, since virtual channel 1 (backorbit telemetry) contains some APID 2047 packets.

The following plots show raster maps of the packets in APID 49 classified by the packet type byte. This shows that each packet type has a different length and field structure. The Jupyter notebook contains plots like this for all the APIDs and packet types.

APID 49 packet type 0x01 contains timestamps in float64 format somewhere within the payload. The format is seconds since the J2000 epoch. The offset between these float64 timestamps and the timestamp in the Space Packet secondary header is always 34.68746944 seconds. TAI is currently 37 seconds ahead of UTC and TT is 32.184 seconds ahead of TAI. So probably different timescales in the float64 and secondary header timestamps explain most of the 34.68 second offset, but there is still an unexplained term of a few seconds, which might be a fixed processing delay.

APID 61 contains ADCS telemetry distributed in packet types 0x00, 0x01 and 0x05. This hints at the existence of other packet types that are omitted because there is not enough bandwidth at this baudrate. In fact, virtual channel 1 (backorbit telemetry) also contains packet types 0x02 and 0x04 for APID 61. Here I give a summary of the most interesting fields in this APID.

In packet type 0x00 there is a field that gives the position vector of MMX with respect to the Sun in ICRF coordinates in metres.

However, this position vector is not totally accurate. It has an error of several thousand kilometres, and it jumps at some point, possibly as a result of something being updated on board. I have tried different timestamp offsets to account for the unknown timescale and spacecraft clock error, but there isn’t an offset that fits well enough.

There is also a velocity vector of MMX with respect to the Sun in ICRF coordinates and m/s.

Like the position vector, this also has a significant error with respect to the Horizons ephemerides. Interestingly, after the jump, the velocity error becomes much smaller.

Another interesting thing is that these position and velocity vectors are not consistent. The velocity vector and the time derivative of the position vector differ significantly, as shown here.

In this APID there are also many quaternion fields. For instance, this is the first quaternion field that appears in packet type 0x00. I will explain what these quaternions are in detail later, since backorbit telemetry is very useful to study them, because it contains manoeuvres other than holding a constant attitude.

These quaternions look constant, but plotting their difference with the first value shows that they vary slowly over time.

The next quaternion field has pretty much the same values. Plotting their difference shows that they differ by noise. It seems that there are independent attitude estimation processes, possibly using redundant sensors as their inputs. This also happens with most other quaternion fields.

The next quaternion field differs from the first one only in what looks like quantization noise (not really visible in this plot), except for some specific moments, where their difference has a larger amplitude, like the noise in the previous plot.

There are other quaternion fields which differ from the first ones in a term which is noise, but that sometimes spikes significantly.

And here is a case of quaternions differing only by what seems to be quantization noise.

There are other quaternion fields that differ significantly from all the quaternions mentioned above. Here are two of these fields.

Another quaternion field differs from the first one in a small constant bias. Maybe this happens because it uses different sensors that have a bias compared to the others.

Another field in this APID gives the unit vector from the Earth to the Sun. This vector is reasonably accurate. Its components have an error on the order of \(10^{-5}\) with respect to Horizons ephemerides.

The next field gives the distance between the Earth and the Sun. It has an error on the order of 600 km compared with Horizons ephemerides.

Virtual channel 1

Virtual channel 1 contains backorbit telemetry in CCSDS Space Packets. The format of these packets is essentially the same as in virtual channel 0. Virtual channel 1 is simply pre-recorded telemetry Space Packets that are downlinked at a later time. Unlike in virtual channel 0, there are a few APID 2047 idle packets (a total of 6 in this recording). These are probably used to flush an AOS frame at the end of a playback. Idle space packets don’t have a secondary header and their payload is all zeros.

The secondary header in the other APIDs has the same format as in virtual channel 0. However, the last byte of the secondary header is 0x69 instead of 0x60 for some packets. This happens for one packet in APID 61 and for all packets in APIDs larger than 61 (there is a gap in APID numbering, with no APIDs used between 61 and 1073).

The APIDs that appear in virtual channel 1 are 49, 53, 57, 61, 1073, 1081, 1089, 1090, 1093, 1097, 1098, and 2047. The timestamps of some packets are completely wrong, having timestamps around 2029 (I don’t know how this can happen), close to the start of 2013 (which is the epoch), or somewhere in 2025 and in June 2026 (which maybe happens because the clock of some systems defaults to their build time until it is updated).

If we plot the timestamps which are correct, we see the following. This means that there has been a replay of data from before launch (launch was at 2026-10-19 19:41:03 UTC) until 2026-10-20 12:00 UTC, and then another replay that covers the same time interval and contains many more packets.

Looking at the APIDs used in these replays, we see that the first replay sent only APID 49, while the second replay sent APIDs 49, 53, 57 and 61. The remaining APIDs are not shown in these plots because all their packets contain wrong timestamps. Moreover, in the first replay only 1654 packets from APID 49 were sent, which are those with packet type 0x01, while in the second replay 3111 packets from APID 49 were sent, which are those with packet types 0x00 and 0x02. This explains the difference in number of packets between the two replays.

APIDs 49, 53, 57 and 61 contain the same kind of telemetry data that we have already seen in virtual channel 0. However, the increased time range allows us to identify ADCS telemetry variables more easily. I will discuss this below. APIDs 1073, 1081, 1089, 1090, 1093, 1097, 1098 contain short packets that I haven’t managed to understand. In the case of APID 1073, there are packets of three different lengths, while each of the other APIDs has packets of a single length.

Virtual channel 62

Virtual channel 62 does not contain CCSDS Space Packets. Instead, the whole transfer frame data field is full of zeros except for the last 8 bytes. The first 5 bytes of these 8 bytes contain a CUC timestamp in the same format as the Space Packet secondary headers. The next byte is always 0x00. The last 2 bytes have values that vary. I do not know what these values mean. Maybe they are some sort of raw precise timestamp. The following plot shows the timestamp evolution. Here we can see the decreased transmission rate during virtual channel 1 telemetry replays.

ADCS telemetry

In the second telemetry replay, most data in APID 61 is all zero until some time before 2026-10-19 21:00 UTC. This makes sense, given that launch was at 19:41 UTC, and spacecraft separation was at 20:52 UTC. Some telemetry channels begin having non-zero data even later, which also makes sense, as some non-essential subsystems would start working later.

The following plot shows the first quaternion field in the telemetry replay. We see that around 2026-10-19 23:45 UTC the spacecraft is rotating. That is ideal for us, because it gives us a much easier way of understanding the quaternion conventions and the gyroscope data.

For the study of the ADCS telemetry we choose the following time periods. First, the period where the spacecraft is rotating.

Next, the period where the spacecraft has an attitude that varies very slowly, which is what we already saw in real-time telemetry.

Interpreting this quaternion as the spacecraft body to ICRF rotation in scalar last format, we see that the relative axis of rotation in body frame coordinates during the first interval is always the X axis. This supports this interpretation, since it is very common to rotate slowly about one of the body axes, which is sometimes known as “rotisserie mode”.

The relative angle of rotation shows a constant angular rate of around 0.2 deg/s, which means that a revolution takes 30 minutes.

Now that we have understood the spacecraft rotation, we can look for telemetry fields that can be gyroscope data consistent with this rotation, and find their units. The following plot shows two sets of redundant gyroscopes. During this time period the first channel of each of these 3-element vectors has a positive value. This corresponds to rotation about the X axis. The units of this data are radians/s. We can find similar gyroscope channels in other places in the telemetry.

If we compare the spacecraft body X axis in ICRF with the vector from the spacecraft to the Sun, we see that the X axis was aligned with the Sun vector quite accurately.

In the MMX System Description Document from JAXA we have the following figure that defines the spacecraft frame of reference. There are other figures in that document that show more clearly that the +X axis points in the direction of the high-gain antenna boresight.

In view of this figure, the rotisserie mode makes sense. The spacecraft would be pointing its high-gain antenna towards the Sun, with its solar panels as in the figure to receive maximum sunlight, and rotating slowly about this axis, to guarantee that sometimes the star trackers, low-gain antenna, and possibly other sensors have favourable orientations.

If we look at the second time interval, where the attitude is changing very slowly, we see that the body +X vector follows the vector from the spacecraft to Earth very precisely. That also makes sense. The spacecraft would point its high-gain antenna towards the Earth after the rotisserie mode.

Since the solar panels can rotate about the Y axis to point to the Sun, in an attitude where the +X vector is fixed to a target (the Earth in this case) it makes sense to point the Y axis in a direction that is orthogonal to the Sun vector. In this way, the solar panels can be rotated to be orthogonal to the Sun vector and receive maximum illumination. These two conditions for the attitude define only two possible attitudes (which are related by a 180 deg rotation about the X axis), except in the degenerate case in which the Sun vector and the target vector are collinear.

We can check the angle between the body Y vector and the Sun vector during the second time interval. In fact the angle is essentially 90 deg. Therefore, this shows that during the second interval MMX is pointing its high-gain antenna towards Earth, and its solar panels towards the Sun, which fully defines an attitude modulo the 180 deg rotation about the X axis.

Above I showed two other quaternion fields that are substantially different from the first field, which I denote by \(q_0\). Here is the first of these, which I denote by \(q_6\), since \(q_1\), …, \(q_5\) are all the previous quaternion fields, and they are very similar to \(q_0\).

If we compute the rotation from the \(q_6\) body to the \(q_0\) body, we see that it is constant over time. This means that \(q_6\) simply uses a different body frame.

Looking at the matrix that transforms \(q_6\) body coordinates into \(q_0\) body coordinates, we see that the \(q_6\) body X vector points towards the -X-Z vector of the \(q_0\) body (it is the bisector of the -X and -Z vectors). However, the other two axes of the \(q_6\) body don’t have an interpretation that is so clear in terms of the \(q_0\) body frame or of the spacecraft diagram shown above. I don’t know why the \(q_6\) body frame is defined in this way. Maybe it is the reference frame of a star tracker or an instrument.

There is another quaternion field \(q_7\) that differs significantly from \(q_0\) and \(q_6\).

Similarly to the case of \(q_6\), the rotation between the body coordinates of \(q_7\) and the body coordinates of \(q_0\) is constant over time, so \(q_7\) corresponds to another reference frame fixed to the spacecraft body.

Looking at the matrix that rotates \(q_7\) body coordinates to \(q_0\) body coordinates, we see that the \(q_7\) body X vector also points towards the -X-Z body vector of \(q_0\). The interpretation of the other two vectors is not so clear. However, an interesting relation between the \(q_6\) and \(q_7\) frames is that their body Y axes are related by a mirror symmetry about the body Y axis of \(q_0\) (they match this interpretation with an error of 0.17 deg).

Code and data

The GNU Radio flowgraph used for decoding the telemetry and the Jupyter notebook used for the telemetry analysis are in this repository. The repository also contains a binary file containing all the decoded AOS frames. Since it is 207 MiB, it is stored with git-annex. The Jupyter notebooks used to calculate antenna tracking and plot the waterfall data, as well as the flowgraphs used for decimating the data for Zenodo and for computing the waterfall are in this repository. The links to the Zenodo datasets containing the IQ data are given at the beginning of the post.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.