Implementation

Implement your own custom signal

To implement a custom signal, you need to develop a C++ shared library (.dll on Windows, .so on linux). Any modern C++ IDE should be compatible. Everything you need to implement is defined in the header file custom_signal_interface.h.

All elapsed time arguments are in millisecond, relative to the simulation start time. All PRN arguments are the legacy signal PRN number.

Implement ICustomSignal

You need to at least implement ICustomSignal for your shared library to be usable by Skydel. This class is instantiated at every simulation start and destroyed at every simulation stop. In your implementation .cpp file, you must add the following line and replace MyCustomSignal with your class name:

DEFINE_CUSTOM_SIGNAL(MyCustomSignal)

Implement ICustomSignalCode

The key function of that class is getChips. It is called every millisecond for every visible satellites. Your implementation must copy the code chips potentially multiplied by a navigation message bit. The chips must be the ones at transmission time, Skydel will handle the propagation delay. The chips are uint8 values of either 1 or –1, anything else leads to an undefined behavior. The chips buffer is guaranteed to be getNumberOfChipsPerMSec() + getExtraAllocSize() long but only the getNumberOfChipsPerMSec() will be used for the simulation. getExtraAllocSize() is useful if you need some padding to optimize your chips generation algorithm.

Implement ICustomSignalNavMsg

Your navigation message implementation will not return anything directly to Skydel (the navigation message is modulated with the ranging code inside the DLL). It is a facility to receive simulation data (such as satellite’s ephemerides, ionospheric terms, UTC terms and polar motion terms) and set some internal state accordingly. The buildNavMsg function is called every getNavMsgDurationMs() milliseconds, aligned to the constellation's time of week. You can offset this message by returning something other than 0 in getTOWOffset().

Last updated