docs: add missile-test-interference#1051
Conversation
New pySTK example.
- Path updates to work on Windows + Linux - examples.rst file update
jwinkle8
left a comment
There was a problem hiding this comment.
Thanks for your contributions @apratilas! I've left some comments to clean the example up a bit. Let me know if you have any questions. Thanks!
| @@ -0,0 +1,658 @@ | |||
| # # CommRadar_MissileTest_Interference | |||
There was a problem hiding this comment.
The example title should describe the example's focus and be in title case. Can you adapt the STK tutorial title to make it more concise?
Let's also update the example file name accordingly when we make this change (make sure to update the path in examples.rst when you do this).
| @@ -0,0 +1,658 @@ | |||
| # # CommRadar_MissileTest_Interference | |||
|
|
|||
There was a problem hiding this comment.
Other PySTK examples derived from STK tutorials link to the corresponding tutorial page before the problem statement (example). We should add the same here.
| root = stk.new_object_root() | ||
| root.new_scenario("CommRadar_MissileTest_Interference_SCRIPT") | ||
| # from ansys.stk.core.stkdesktop import STKDesktop | ||
| # stk = STKDesktop.start_application(visible=True) |
There was a problem hiding this comment.
Remove unused references to STKDesktop
|
|
||
| # + | ||
| # root = stk.root | ||
| # root.new_scenario("CommRadar_MissileTest_Interference_SCRIPT") |
|
|
||
| # - | ||
|
|
||
| # + |
There was a problem hiding this comment.
Let's annotate this code block with a short blurb like this.
Same comment for the 2D map widget block too.
| globe_widget.show() | ||
| # - | ||
|
|
||
| # ## Analyzing the telemetry downlink's link budget (2) |
There was a problem hiding this comment.
| # ## Analyzing the telemetry downlink's link budget (2) | |
| # ## Analyzing the telemetry downlink's link budget |
| interference.emitters.add(sxm_10_transmitter.path) | ||
| # - | ||
|
|
||
| # Determining the impact of interference with a Link Budget - Interference report (3) |
There was a problem hiding this comment.
| # Determining the impact of interference with a Link Budget - Interference report (3) | |
| # Determining the impact of interference with a Link Budget - Interference report |
| access.compute_access() | ||
| # - | ||
|
|
||
| # ## Creating a custom report (5) |
There was a problem hiding this comment.
| # ## Creating a custom report (5) | |
| # ## Creating a custom report |
| ship_receiver_filter.order = 4 # Unit | ||
| # - | ||
|
|
||
| # Recomputing the Link Budget - Interference report (4) |
There was a problem hiding this comment.
| # Recomputing the Link Budget - Interference report (4) | |
| # Recomputing the Link Budget - Interference report |
| scenario.start_time, scenario.stop_time, time_step | ||
| ).data_sets.to_pandas_dataframe() | ||
| link_budget_report[["ber"]] | ||
| root.save_scenario() |
There was a problem hiding this comment.
Remove save scenario commands from example
- Rename file to missile-interference-test for clarity - Rename file in examples.rst - Various code fixes
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1051 +/- ##
=======================================
Coverage 89.58% 89.58%
=======================================
Files 67 67
Lines 190995 190995
Branches 1428 1428
=======================================
+ Hits 171106 171108 +2
+ Misses 19474 19472 -2
Partials 415 415 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Code narration + comments. - Couple of code fixes.
Link fix.
- Camera positioning coordinates - variable rename - link fix - removal of one globe_widget
Tutorial link fix.
|
|
||
| # ## Check for interference | ||
|
|
||
| # There are several methods through which you can determine the impact of interference on a system. or less complex systems, like the one in this scenario, you can compute interference effects directly in a Receiver object. |
There was a problem hiding this comment.
| # There are several methods through which you can determine the impact of interference on a system. or less complex systems, like the one in this scenario, you can compute interference effects directly in a Receiver object. | |
| # There are several methods through which you can determine the impact of interference on a system. For less complex systems, like the one in this scenario, you can compute interference effects directly in a Receiver object. |
| ) | ||
| # - | ||
|
|
||
| # We have to enable interfernece before we are able to edit the interference sources: |
There was a problem hiding this comment.
| # We have to enable interfernece before we are able to edit the interference sources: | |
| # We have to enable interference before we are able to edit the interference sources: |
| # - | ||
|
|
||
| # Generate the link information report. | ||
|
|
There was a problem hiding this comment.
There's a closing # - but no opening # +
| # + |
| radar_transmitter.frequency = 2.8 | ||
| # - | ||
|
|
||
| # Set the power of the radar transmitter. This is does not depend on frequency or wavelength. |
There was a problem hiding this comment.
| # Set the power of the radar transmitter. This is does not depend on frequency or wavelength. | |
| # Set the power of the radar transmitter. This does not depend on frequency or wavelength. |
|
|
||
|
|
||
| receiver_model.antenna_control.embedded_model_component_linking.set_component("Helix") | ||
| helixModel = receiver_model.antenna_control.embedded_model_component_linking.component |
There was a problem hiding this comment.
Could we use snake_case to follow the usual variable naming convention?
Typo fixes.
Variable rename to follow convention.
New pySTK example. This example is based off of this tutorial.