ORCASat Pass Planner: Satellite Operations with Streamlit and Skyfield
- 5 minutes read - 1030 wordsThe ORCASat pass planner application was built to facilitate planning passes for the upcoming week. Since the pass times shift every day, it is convenient to have a snapshot of the upcoming week’s passes so that you can determine when operators need to be available.
The ORCASat pass planner application has the following functionality:
- Details of upcoming passes (length, start time, maximum elevation)
- Ranking of upcoming passes
- Map display of the spacecraft’s ground track
- Tools to generate command sequences
Pass Planner App
I built the prototype for this application in 2022, and the entire C&DH team refined it as we integrated it with the rest of our software and added additional features.
Software
The Python packages Skyfield and Streamlit do the heavy lifting in the pass planner.
Skyfield is used to determine the pass times over the ground station in Victoria. For us, a pass is defined as the period of time between the spacecraft rising 15 degrees over the horizon, and setting 15 degrees above the horizon.
Streamlit provides the user interface for the pass planner. The main control in the app is a dropdown that allows the operator to select a pass to view more information about. Since there is only a single control, Streamlit’s model of rerunning an entire script on UI changes works well for this application.
TLE Input
The TLE is the Two Line Element set that describes a spacecraft’s orbit. It is the data source used by Skyfield to determine when the passes will occur.
The pass planner app had to support several TLE sources over the course of AI&T and into operations.
- International Space Station TLE (used during testing before ORCASat deployed)
- Custom TLEs generated from the state vector we got from the launch provider. This was provided to us shortly after deployment, and we used it during the first few days of commissioning while we were determining which NORAD ID was ORCASat.
- The newest TLE for our NORAD ID (55126) from celestrak.org.
Pass Quality Ranking
When we were designing the pass planner, a key feature we wanted was an ability to rank passes and determine which ones we should operate. It turns out that we didn’t really use this feature, but it’s interesting to discuss why.
Passes were ranked by applying one point to a pass for each of the following attributes:
-
Maximum elevation above 70 degrees. A maximum elevation of 90 degrees means that the spacecraft passes directly over the ground station. This is good because it means the slant ranges (distance) to the spacecraft are smaller, so communications are more reliable.
-
Reasonable time. If a pass will occur between 7:00 AM and 10:00 PM, it is much more likely that someone will be awake and available to fly it.
-
Pass duration. Longer passes are nice because they allow us to downlink more data. A pass gets a point if it is longer than average.
The pass ranking was displayed as a colour code in the UI (green is best, yellow is okay, red and grey are worst).
Why didn’t we use the pass ranking?
I mentioned that we didn’t rely on the pass ranking very much during our planning. Here are several reasons why.
-
During the commissioning phase of your first CubeSat, you can never be quite sure that this pass won’t be your last. For the first few days until you gain some confidence, you’ll likely want to operate every pass that you can.
-
Our comms system performed very well, so maximum elevation did not have a significant impact on our operations. We still often scheduled the more taxing things like large file downlinks during the highest elevation passes, but for regular operations, there wasn’t much of a difference between 50 degrees and 80 degrees for us. We could even sneak in a few commands or small downlinks during the very low (25 degrees or so) maximum elevation passes.
-
Pass times in our orbit were clustered, so we didn’t often get a choice between convenient pass times and inconvenient ones. There were 3 to 5 passes 1.5 hours apart each day, and then roughly an 18 hour gap until the next day’s passes.
-
The main factor for choosing passes was what we wanted to do operationally. For example, if we wanted to get some position samples from the GPS receiver, we’d often take one pass to schedule them, one pass to downlink the files, and during any spare time in each pass, downlink the daily telemetry files. A scenario like that means you’re looking at flying 2-3 passes regardless of how late you need to stay up.
Command Sequence Generation
Shortly after deployment, we added command sequence generation to the pass planner.
Many of our command sequences involved turning something on shortly after a pass ended, collecting some data, and then turning it off shortly before the next pass began. During that later pass, we would often want to downlink the generated data, and many of our data files have a time tag in the file name. These sequences are easy to generate programmatically, but tedious to do by hand.
Command Sequence Page
For any pass selected, the pass planner will generate a sequence of commands for various standard opreations. Generally, the timestamps and file names are computed based on the end time of the selected pass. We would copy the sequences from the pass planner app into our pass plan document, and from there they would go into Houston to be sent to the spacecraft.
Ground Track Map
I always thought that displaying the spacecraft’s ground track was really neat, so I added a map with the ground track into the pass planner.
Skyfield is used to generate the ground track. The input is a set of timestamps every 10 seconds between the start and end of the pass. Skyfield generates the sub-satellite point on the Earth, and those points are plotted with Matplotlib.
Some extra logic is used to crop to a reasonable window, display arrows in the flight direction, and place a marker at the ground station location.
ORCASat Pass 3 Ground Track
Other Similar Tools
- Passtime created by Tristan from ORCASat
- tracksat.space created by alicja.space