The Stages Of Phil Runs

1395 Words Aug 3rd, 2015 6 Pages
When PHIL runs, it has three distinct stages that the code runs through. First is the initialization stage. This is where the code that needs to be set-up first runs. The next stage is the execution stage, which is arguably the most important stage. This is where the majority of the code executes. Any code in the execution stage repeats until the user terminates it. The final stage is the termination stage, which happens after the user terminates the execution stage. This is where all tasks stop and any code which needs to complete, can do so safely. Tasks in PHIL are pieces of code that will execute repeatedly. Tasks can be anything from the satellite propagation to the sensors. The Lua script handles the scheduling, initializing, execution, and termination of these tasks. Each task runs according to how the Lua script has it scheduled and the code will continue to run until the user gives the command to terminate the task. Figure 2 shows the architecture of PHIL. This portion of the reboot focuses on the simulation side and not the flight software side. As these tasks run, they may have data that other tasks require to successfully run. A way of handling this transfer of data from one task to another is to adopt a Publish and Subscribe System. This system allows for the transferring of variables without getting in the way of the scheduler and makes sure that all tasks receive the same data for that given moment of time. For example: The satellite propagation publishes…

More about The Stages Of Phil Runs

Open Document