AnalyticalGraphicsInc / STKCodeExamples

Example scripts and applications for automating and developing with STK and STK Engine.
https://support.agi.com/
MIT License
190 stars 135 forks source link

Adding an LK file to FFD file converter for STK antennas (and an LK test file generator), and a satellite pass conflict resolution script utilizing an interval tree. #225

Closed danielhuynh0 closed 1 year ago

danielhuynh0 commented 1 year ago

Describe the changes in this pull request

I added two new folders of scripts:

  1. I added a folder (LKtoFFDConverter) of two scripts that I wrote for a case concerning the conversion and combining of two LK files (one each for magnitude & phase) into a single FFD file that will allow an antenna within STK to consider both magnitude and phase from LK files. Typically, an antenna in STK will only consider a single LK file, limiting it to only magnitude or phase. The converter script has functionality in which it can take in a command line argument to specify any of 4 types of polarization (vertical, horizontal, LHCP, RHCP) and converts it with the correct calculations for a corresponding FFD file.

    • I also wrote a simple LK file generator for testing purposes that can be edited and reused for generating test LK files (with random values) in general.
  2. I added a second folder (SatelliteConflictFreePassesUsingIntervalTree). It contains a single script used for satellite orbit conflict removal. This script was used in a specific case for a customer: there is a ground facility that is attempting to calculate line of sight access to a constellation of satellites. The customer wants all the passes (pass number, time intervals, satellite name) that are "conflict free", the definition of conflict free being so:

    • A pass is conflict free if for the entire pass through the ground facility's line of sight access no other satellite enters that line of sight access region of the ground facility such that the facility now has line of sight access to two satellites. Even if a satellite is halfway through its pass without conflict, the moment another satellite enters the region, BOTH PASSES ARE REMOVED.
    • We are not looking for non-conflicting time intervals. We are looking for PASSES. For example, for a satellite that is halfway through its pass before another satellite enters the region, we do not care about the time interval such that it was the only satellite in the region. We will delete the entire pass including the time interval where it was initially unconflicted. We only keep time intervals and pass data in which the ENTIRE pass was valid and unconflicted.
    • If the region is unsymmetrical, generating reports on STK will recognize them as two different accesses even if they were on the same pass. We will merge any two accesses that are a part of the same pass as such.
    • The time between the valid pass of one satellite and the valid pass of the next valid satellite must be at least 3 minutes or else both will also be invalid.

Checklist before requesting a review