Skip to content

Commit 50c87d6

Browse files
committed
Update example code to 2022r1 release.
1 parent c7d2539 commit 50c87d6

File tree

76 files changed

+437
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+437
-955
lines changed

DotNet/CesiumDemo/Cesium/README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Unpack the contents of the Build\Cesium from the STK Web Visualization Library
1+
Unpack the contents of the Build\Cesium from the Cesium Analytics SDK
22
package into this directory, so that Cesium.js is next to this README file.

DotNet/CesiumDemo/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Cesium Demo
22

3-
This application demonstrates a client-server web application which uses STK Components on the server to perform analysis, and [STK Web Visualization Library](http://help.agi.com/AGIComponents/html/StkWebVisualization.htm) on the client (in a web browser) to visualize the results of that analysis using CZML. It also includes demonstrations of each of the specialized graphical features available in STK Web Visualization Library.
3+
This application demonstrates a client-server web application which uses STK Components on the server to perform analysis, and [Cesium Analytics SDK](https://help.agi.com/AGIComponents/html/CesiumAnalyticsSdk.htm) on the client (in a web browser) to visualize the results of that analysis using CZML. It also includes demonstrations of each of the specialized graphical features available in Cesium Analytics SDK.
44

5-
To simplify the application and minimize dependencies, this application uses ASP.NET Web Forms to create a simple web service. Please note that use of STK Components, and the capabilities being demonstrated, are not specific to ASP.NET. STK Components can be integrated with STK Web Visualization Library using any web application framework.
5+
To simplify the application and minimize dependencies, this application uses ASP.NET Web Forms to create a simple web service. Please note that use of STK Components, and the capabilities being demonstrated, are not specific to ASP.NET. STK Components can be integrated with Cesium Analytics SDK using any web application framework.
66

77
The application also contains a small custom user interface to make it easier to explore the visualizations. This user interface is built using [Knockout.js](https://knockoutjs.com/) because it is already included in Cesium. As above, note that the capabilities being demonstrated can be used in any front-end framework.
88

99
## Features
1010

11-
This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of STK Web Visualization Library, including:
11+
This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of Cesium Analytics SDK, including:
1212

1313
* A satellite propagated from a TLE
1414
* Access between a satellite and a ground station
@@ -28,6 +28,6 @@ This example demonstrates visualizing various types of Components objects and an
2828

2929
## Installation
3030

31-
This example requires STK Web Visualization Library, which is included with an STK Components license, and can be downloaded from [AGI's download site](https://support.agi.com/downloads/).
31+
This example requires Cesium Analytics SDK, which is included with an STK Components license, and can be downloaded from [AGI's download site](https://support.agi.com/downloads/).
3232

33-
Unpack the contents of the `Build\Cesium` directory from the STK Web Visualization Library package into the `CesiumDemo\Cesium` directory before building and running the example.
33+
Unpack the contents of the `Build\Cesium` directory from the Cesium Analytics SDK package into the `CesiumDemo\Cesium` directory before building and running the example.

DotNet/Common/SharedAssemblyInfo.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// </auto-generated>
1414
//------------------------------------------------------------------------------
1515

16-
[assembly: AssemblyCompany("Analytical Graphics, Inc.")]
16+
[assembly: AssemblyCompany("AGI, an Ansys Company")]
1717
[assembly: AssemblyProduct("STK Components")]
18-
[assembly: AssemblyCopyright("Copyright © 2007-2019 Analytical Graphics, Inc.")]
18+
[assembly: AssemblyCopyright("Copyright © 2007-2022 Analytical Graphics, Inc.")]
1919
[assembly: AssemblyConfiguration("Release")]
2020
[assembly: AssemblyCulture("")]
2121
[assembly: ComVisible(false)]
22-
[assembly: AssemblyVersion("19.3.400.0")]
23-
[assembly: AssemblyFileVersion("19.3.400.0")]
22+
[assembly: AssemblyVersion("22.1.413.0")]
23+
[assembly: AssemblyFileVersion("22.1.413.0")]
2424
[assembly: NeutralResourcesLanguage("en-US")]
2525

DotNet/Communications/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Communications Demo
22

3-
This application uses the **Communications Library** to setup a call between two locations and visualize the scenario and link budget results. Using [SimpleDigitalTransmitter](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_SimpleDigitalTransmitter.htm), [Transceiver](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_Transceiver.htm) and [SimpleReceiver](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_SimpleReceiver.htm), the application looks at the link budget for the call, allowing the user to vary the transmission power of the calling phone, and on which links to report the link budget parameters. The application also shows how visualization can be incorporated into an analysis scenario, bringing in Insight3D and its various platforms, markers and models. For more information on the Communications Library, see the [Communications](http://help.agi.com/AGIComponents/html/Communications.htm) topic.
3+
This application uses the **Communications Library** to setup a call between two locations and visualize the scenario and link budget results. Using [SimpleDigitalTransmitter](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_SimpleDigitalTransmitter.htm), [Transceiver](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_Transceiver.htm) and [SimpleReceiver](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Communications_SimpleReceiver.htm), the application looks at the link budget for the call, allowing the user to vary the transmission power of the calling phone, and on which links to report the link budget parameters. The application also shows how visualization can be incorporated into an analysis scenario, bringing in Insight3D and its various platforms, markers and models. For more information on the Communications Library, see the [Communications](https://help.agi.com/AGIComponents/html/Communications.htm) topic.
44

55
![Communications Demo](Images/ExampleCommunicationsDemo.jpg)

DotNet/GpsCommunications/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GPS Communications Analysis
22

3-
This application uses the **Communications Library**, the **Navigation Accuracy Library**, and the **Navigation Advanced Library** to model GPS communications at a site for a single time. You can select from nine different GPS signal configurations, and show four different communications metrics for GPS signals received by a [GpsReceiver](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Navigation_GpsReceiver.htm). Additionally, you can add jammers on either L1, L2 or L5 frequencies.
3+
This application uses the **Communications Library**, the **Navigation Accuracy Library**, and the **Navigation Advanced Library** to model GPS communications at a site for a single time. You can select from nine different GPS signal configurations, and show four different communications metrics for GPS signals received by a [GpsReceiver](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Navigation_GpsReceiver.htm). Additionally, you can add jammers on either L1, L2 or L5 frequencies.
44

5-
This example provides a good starting point for understanding the setup of a [GpsCommunicationsFrontEnd](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Navigation_Advanced_GpsCommunicationsFrontEnd.htm), configuring interference sources and retrieving link budgets for analysis. The [Navigation Communications](http://help.agi.com/AGIComponents/html/NavigationCommunications.htm) topic has more information on how this system works.
5+
This example provides a good starting point for understanding the setup of a [GpsCommunicationsFrontEnd](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Navigation_Advanced_GpsCommunicationsFrontEnd.htm), configuring interference sources and retrieving link budgets for analysis. The [Navigation Communications](https://help.agi.com/AGIComponents/html/NavigationCommunications.htm) topic has more information on how this system works.
66

77
![GPS Communications Analysis](Images/ExampleGPSCommunicationsAnalysis.jpg)

DotNet/LotsOfSatellites/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Lots of Satellites
22

3-
This application uses [Sgp4Propagator](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_Sgp4Propagator.htm) to propagate up to 10,000 satellites, which are visualized in Insight3D using [MarkerBatchPrimitive](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Graphics_MarkerBatchPrimitive.htm). Satellites shown in red have access to a ground station located in Australia.
3+
This application uses [Sgp4Propagator](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_Sgp4Propagator.htm) to propagate up to 10,000 satellites, which are visualized in Insight3D using [MarkerBatchPrimitive](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Graphics_MarkerBatchPrimitive.htm). Satellites shown in red have access to a ground station located in Australia.
44

55
![Lots of Satellites](Images/ExampleLotsOfSatellites.jpg)

DotNet/NavAnalyst/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NavAnalyst
22

3-
This reference application shows how many of the [AGI.Foundation.Navigation](http://help.agi.com/AGIComponents/html/N_AGI_Foundation_Navigation.htm) types and methods can be used. This application is designed to show a navigation analyst a quick-look picture of the Dilution of Precision (DOP) for a site, which satellites are in view of that site, and the azimuth and elevation of the satellites at that site. An open-source charting package called [ZedGraph](http://sourceforge.net/projects/zedgraph/) is used to draw the graphs in the application.
3+
This reference application shows how many of the [AGI.Foundation.Navigation](https://help.agi.com/AGIComponents/html/N_AGI_Foundation_Navigation.htm) types and methods can be used. This application is designed to show a navigation analyst a quick-look picture of the Dilution of Precision (DOP) for a site, which satellites are in view of that site, and the azimuth and elevation of the satellites at that site. An open-source charting package called [ZedGraph](http://sourceforge.net/projects/zedgraph/) is used to draw the graphs in the application.
44

5-
For more information on the application, see [the topic for this example](http://help.agi.com/AGIComponents/html/ExampleNavAnalyst.htm) in the STK Components documentation.
5+
For more information on the application, see [the topic for this example](https://help.agi.com/AGIComponents/html/ExampleNavAnalyst.htm) in the STK Components documentation.

DotNet/NumericalPropagationDemo/ForceModelSettings.cs

+57-26
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.IO;
45
using System.Windows.Forms;
6+
using AGI.Foundation;
57
using AGI.Foundation.Celestial;
68
using AGI.Foundation.Geometry;
79
using AGI.Foundation.Propagators;
@@ -58,6 +60,7 @@ public ForceModelSettings(JplDE jplInfo, string gravityFile)
5860
m_gravFile.Text = gravityFile;
5961
m_tides.Items.Add(PERMANENTTIDES);
6062
m_tides.Items.Add(NOTIDES);
63+
m_tides.Items.Add(TIMEVARYINGTIDES);
6164
m_tides.SelectedIndex = 0;
6265
m_tides.DropDownStyle = ComboBoxStyle.DropDownList;
6366

@@ -68,6 +71,7 @@ public ForceModelSettings(JplDE jplInfo, string gravityFile)
6871
m_lastCB = EARTH;
6972
CurrentCentralBody = CentralBodiesFacet.GetFromContext().Earth;
7073
m_primaryCB.SelectedItem = EARTH;
74+
CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()];
7175

7276
// adding all of the possible third bodies
7377
foreach (KeyValuePair<string, double> pair in m_gravConstants)
@@ -195,17 +199,40 @@ public void SetForceModelsOnPoint(PropagationNewtonianPoint point, Scalar area)
195199
}
196200
else
197201
{
198-
SphericalHarmonicsTideType tideType = SphericalHarmonicsTideType.None;
199-
if (m_tides.SelectedItem.ToString() == NOTIDES)
200-
tideType = SphericalHarmonicsTideType.None;
201-
else if (m_tides.SelectedItem.ToString() == PERMANENTTIDES)
202-
tideType = SphericalHarmonicsTideType.PermanentTideOnly;
203-
204202
int order = int.Parse(m_order.Text);
205203
int degree = int.Parse(m_degree.Text);
206204
SphericalHarmonicGravityModel model = SphericalHarmonicGravityModel.ReadFrom(m_gravFile.Text);
205+
SolidTideModel tideModel;
206+
if (m_tides.Enabled)
207+
{
208+
// Only enabled if Earth is selected as central body.
209+
switch (m_tides.SelectedItem.ToString())
210+
{
211+
case NOTIDES:
212+
if (model.IncludesPermanentTides)
213+
model = model.WithoutEarthPermanentTides();
214+
tideModel = null;
215+
break;
216+
case PERMANENTTIDES:
217+
tideModel = model.IncludesPermanentTides ? null : new PermanentSolidTideModel();
218+
break;
219+
case TIMEVARYINGTIDES:
220+
if (model.IncludesPermanentTides)
221+
model = model.WithoutEarthPermanentTides();
222+
tideModel = new Iers2003SolidTideModel(((EarthCentralBody)m_centralBody).OrientationParameters);
223+
break;
224+
default:
225+
throw new UnsupportedCaseException("Invalid tide parameter selection.");
226+
}
227+
}
228+
else
229+
{
230+
// For other central bodies, tides will be automatically inherited from the .grv files based on whether they include permanent tides or not.
231+
tideModel = null;
232+
}
233+
207234
SphericalHarmonicGravity gravity = new SphericalHarmonicGravity(point.IntegrationPoint,
208-
new SphericalHarmonicGravityField(model, degree, order, true, tideType));
235+
new SphericalHarmonicGravityField(model, degree, order, true, tideModel));
209236
point.AppliedForces.Add(gravity);
210237

211238
if (gravity.GravityField.CentralBody.Name != primaryCB)
@@ -258,26 +285,29 @@ private void OnDoneClick(object sender, EventArgs e)
258285
/// <param name="e">Additional information about this event.</param>
259286
private void OnPrimaryCBSelectedIndexChanged(object sender, EventArgs e)
260287
{
261-
if (m_primaryCB.SelectedItem.ToString() != m_lastCB)
288+
if (m_primaryCB.SelectedItem.ToString() == m_lastCB)
289+
return;
290+
291+
m_thirdBodies.Items.Remove(m_primaryCB.SelectedItem.ToString());
292+
m_thirdBodies.Items.Add(m_lastCB);
293+
m_lastCB = m_primaryCB.SelectedItem.ToString();
294+
if (m_primaryCB.SelectedItem.ToString() != EARTH)
262295
{
263-
m_thirdBodies.Items.Remove(m_primaryCB.SelectedItem.ToString());
264-
m_thirdBodies.Items.Add(m_lastCB);
265-
m_lastCB = m_primaryCB.SelectedItem.ToString();
266-
if (m_primaryCB.SelectedItem.ToString() != EARTH)
267-
{
268-
// we only have drag models for the earth
269-
m_lastDragChecked = m_useDrag.Checked;
270-
m_useDrag.Checked = false;
271-
m_useDrag.Enabled = false;
272-
}
273-
else
274-
{
275-
m_useDrag.Checked = m_lastDragChecked;
276-
m_useDrag.Enabled = true;
277-
}
278-
CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()];
279-
CurrentCentralBody = CentralBodiesFacet.GetFromContext().GetByName(m_primaryCB.SelectedItem.ToString());
296+
// we only have drag models for the earth
297+
m_lastDragChecked = m_useDrag.Checked;
298+
m_useDrag.Checked = false;
299+
m_useDrag.Enabled = false;
300+
// We only have default permanent and time-varying tides for Earth.
301+
m_tides.Enabled = false;
302+
}
303+
else
304+
{
305+
m_useDrag.Checked = m_lastDragChecked;
306+
m_useDrag.Enabled = true;
307+
m_tides.Enabled = true;
280308
}
309+
CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()];
310+
CurrentCentralBody = CentralBodiesFacet.GetFromContext().GetByName(m_primaryCB.SelectedItem.ToString());
281311
}
282312

283313
/// <summary>
@@ -355,7 +385,8 @@ private void OnUseSRPCheckedChanged(object sender, EventArgs e)
355385
private const string DUALCONE = "Dual Cone";
356386
private const string CYLINDRICAL = "Cylindrical";
357387

388+
private const string TIMEVARYINGTIDES = "TimeVarying";
358389
private const string PERMANENTTIDES = "Permanent";
359390
private const string NOTIDES = "None";
360391
}
361-
}
392+
}

0 commit comments

Comments
 (0)