I was able to simulation a scintillation event using Skydel API! The only thing I would maybe like to improve on is the timing accuracy with which my python script sends commands to the simulation engine. I would like the commands to go to the simulation at a rate of 100Hz but every so often the script gets delayed by 1-2 hundredths of a second because of the other tasks running on the computer. Do anyone have any suggestions for making this timing more accurate and deterministic?
There are 2 types of commands in the API, call and post commands. Both types can take a timestamp as a parameter.
The call method is blocking and this calling mechanism is referred as synchronous. This means that it will stop the script execution until Skydel returns a result (pass or fail). Since these commands stop the execution of the script it is not recommended to set a timestamp (otherwise the script will wait until the timestamp of the command is reached).
The post method is not blocking and this calling mechanism is referred as asynchronous. It is recommended to set a timestamp for these commands to tell Skydel when to apply the command. The post command is stored in Skydel’s internal memory and precisely applied at the timestamp value (with a millisecond resolution). Execution of other tasks on the computer will not affect the time of application of the command.
You can check the example_basic.py script in the ./Skydel-SDX/API folder for an example of the post command with timestamp:
Line 35/36 of the script:
#When simulation elapsed time is 9.567 sec, change satellite 32 power to -25 dB (relative to nominal power)
cmd1 = sim.post(SetPowerForSV(“GPS”, 32, -25, False), 9.567 )