diff --git a/DotNet/CesiumDemo/Cesium/README.txt b/DotNet/CesiumDemo/Cesium/README.txt index 50fdbd8..318d1b6 100644 --- a/DotNet/CesiumDemo/Cesium/README.txt +++ b/DotNet/CesiumDemo/Cesium/README.txt @@ -1,2 +1,2 @@ -Unpack the contents of the Build\Cesium from the STK Web Visualization Library +Unpack the contents of the Build\Cesium from the Cesium Analytics SDK package into this directory, so that Cesium.js is next to this README file. \ No newline at end of file diff --git a/DotNet/CesiumDemo/README.md b/DotNet/CesiumDemo/README.md index bd72d02..8b64055 100644 --- a/DotNet/CesiumDemo/README.md +++ b/DotNet/CesiumDemo/README.md @@ -1,14 +1,14 @@ # Cesium Demo -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. +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. -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. +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. 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. ## Features -This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of STK Web Visualization Library, including: +This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of Cesium Analytics SDK, including: * A satellite propagated from a TLE * Access between a satellite and a ground station @@ -28,6 +28,6 @@ This example demonstrates visualizing various types of Components objects and an ## Installation -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/). +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/). -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/DotNet/Common/SharedAssemblyInfo.cs b/DotNet/Common/SharedAssemblyInfo.cs index 8f9f958..4264c0f 100644 --- a/DotNet/Common/SharedAssemblyInfo.cs +++ b/DotNet/Common/SharedAssemblyInfo.cs @@ -13,13 +13,13 @@ // //------------------------------------------------------------------------------ -[assembly: AssemblyCompany("Analytical Graphics, Inc.")] +[assembly: AssemblyCompany("AGI, an Ansys Company")] [assembly: AssemblyProduct("STK Components")] -[assembly: AssemblyCopyright("Copyright © 2007-2019 Analytical Graphics, Inc.")] +[assembly: AssemblyCopyright("Copyright © 2007-2022 Analytical Graphics, Inc.")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("19.3.400.0")] -[assembly: AssemblyFileVersion("19.3.400.0")] +[assembly: AssemblyVersion("22.1.413.0")] +[assembly: AssemblyFileVersion("22.1.413.0")] [assembly: NeutralResourcesLanguage("en-US")] diff --git a/DotNet/Communications/README.md b/DotNet/Communications/README.md index 0609b31..8c7e60c 100644 --- a/DotNet/Communications/README.md +++ b/DotNet/Communications/README.md @@ -1,5 +1,5 @@ # Communications Demo -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. +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. ![Communications Demo](Images/ExampleCommunicationsDemo.jpg) diff --git a/DotNet/GpsCommunications/README.md b/DotNet/GpsCommunications/README.md index d807ba5..a124269 100644 --- a/DotNet/GpsCommunications/README.md +++ b/DotNet/GpsCommunications/README.md @@ -1,7 +1,7 @@ # GPS Communications Analysis -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. +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. -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. +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. ![GPS Communications Analysis](Images/ExampleGPSCommunicationsAnalysis.jpg) diff --git a/DotNet/LotsOfSatellites/README.md b/DotNet/LotsOfSatellites/README.md index a950ee6..ac87454 100644 --- a/DotNet/LotsOfSatellites/README.md +++ b/DotNet/LotsOfSatellites/README.md @@ -1,5 +1,5 @@ # Lots of Satellites -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. +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. ![Lots of Satellites](Images/ExampleLotsOfSatellites.jpg) diff --git a/DotNet/NavAnalyst/README.md b/DotNet/NavAnalyst/README.md index 1bd692d..3d36daf 100644 --- a/DotNet/NavAnalyst/README.md +++ b/DotNet/NavAnalyst/README.md @@ -1,5 +1,5 @@ # NavAnalyst -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. +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. -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/DotNet/NumericalPropagationDemo/ForceModelSettings.cs b/DotNet/NumericalPropagationDemo/ForceModelSettings.cs index be9da93..788f5ab 100644 --- a/DotNet/NumericalPropagationDemo/ForceModelSettings.cs +++ b/DotNet/NumericalPropagationDemo/ForceModelSettings.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Windows.Forms; +using AGI.Foundation; using AGI.Foundation.Celestial; using AGI.Foundation.Geometry; using AGI.Foundation.Propagators; @@ -58,6 +60,7 @@ public ForceModelSettings(JplDE jplInfo, string gravityFile) m_gravFile.Text = gravityFile; m_tides.Items.Add(PERMANENTTIDES); m_tides.Items.Add(NOTIDES); + m_tides.Items.Add(TIMEVARYINGTIDES); m_tides.SelectedIndex = 0; m_tides.DropDownStyle = ComboBoxStyle.DropDownList; @@ -68,6 +71,7 @@ public ForceModelSettings(JplDE jplInfo, string gravityFile) m_lastCB = EARTH; CurrentCentralBody = CentralBodiesFacet.GetFromContext().Earth; m_primaryCB.SelectedItem = EARTH; + CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()]; // adding all of the possible third bodies foreach (KeyValuePair pair in m_gravConstants) @@ -195,17 +199,40 @@ public void SetForceModelsOnPoint(PropagationNewtonianPoint point, Scalar area) } else { - SphericalHarmonicsTideType tideType = SphericalHarmonicsTideType.None; - if (m_tides.SelectedItem.ToString() == NOTIDES) - tideType = SphericalHarmonicsTideType.None; - else if (m_tides.SelectedItem.ToString() == PERMANENTTIDES) - tideType = SphericalHarmonicsTideType.PermanentTideOnly; - int order = int.Parse(m_order.Text); int degree = int.Parse(m_degree.Text); SphericalHarmonicGravityModel model = SphericalHarmonicGravityModel.ReadFrom(m_gravFile.Text); + SolidTideModel tideModel; + if (m_tides.Enabled) + { + // Only enabled if Earth is selected as central body. + switch (m_tides.SelectedItem.ToString()) + { + case NOTIDES: + if (model.IncludesPermanentTides) + model = model.WithoutEarthPermanentTides(); + tideModel = null; + break; + case PERMANENTTIDES: + tideModel = model.IncludesPermanentTides ? null : new PermanentSolidTideModel(); + break; + case TIMEVARYINGTIDES: + if (model.IncludesPermanentTides) + model = model.WithoutEarthPermanentTides(); + tideModel = new Iers2003SolidTideModel(((EarthCentralBody)m_centralBody).OrientationParameters); + break; + default: + throw new UnsupportedCaseException("Invalid tide parameter selection."); + } + } + else + { + // For other central bodies, tides will be automatically inherited from the .grv files based on whether they include permanent tides or not. + tideModel = null; + } + SphericalHarmonicGravity gravity = new SphericalHarmonicGravity(point.IntegrationPoint, - new SphericalHarmonicGravityField(model, degree, order, true, tideType)); + new SphericalHarmonicGravityField(model, degree, order, true, tideModel)); point.AppliedForces.Add(gravity); if (gravity.GravityField.CentralBody.Name != primaryCB) @@ -258,26 +285,29 @@ private void OnDoneClick(object sender, EventArgs e) /// Additional information about this event. private void OnPrimaryCBSelectedIndexChanged(object sender, EventArgs e) { - if (m_primaryCB.SelectedItem.ToString() != m_lastCB) + if (m_primaryCB.SelectedItem.ToString() == m_lastCB) + return; + + m_thirdBodies.Items.Remove(m_primaryCB.SelectedItem.ToString()); + m_thirdBodies.Items.Add(m_lastCB); + m_lastCB = m_primaryCB.SelectedItem.ToString(); + if (m_primaryCB.SelectedItem.ToString() != EARTH) { - m_thirdBodies.Items.Remove(m_primaryCB.SelectedItem.ToString()); - m_thirdBodies.Items.Add(m_lastCB); - m_lastCB = m_primaryCB.SelectedItem.ToString(); - if (m_primaryCB.SelectedItem.ToString() != EARTH) - { - // we only have drag models for the earth - m_lastDragChecked = m_useDrag.Checked; - m_useDrag.Checked = false; - m_useDrag.Enabled = false; - } - else - { - m_useDrag.Checked = m_lastDragChecked; - m_useDrag.Enabled = true; - } - CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()]; - CurrentCentralBody = CentralBodiesFacet.GetFromContext().GetByName(m_primaryCB.SelectedItem.ToString()); + // we only have drag models for the earth + m_lastDragChecked = m_useDrag.Checked; + m_useDrag.Checked = false; + m_useDrag.Enabled = false; + // We only have default permanent and time-varying tides for Earth. + m_tides.Enabled = false; + } + else + { + m_useDrag.Checked = m_lastDragChecked; + m_useDrag.Enabled = true; + m_tides.Enabled = true; } + CurrentCentralBodysGravitationalParameter = m_gravConstants[m_primaryCB.SelectedItem.ToString()]; + CurrentCentralBody = CentralBodiesFacet.GetFromContext().GetByName(m_primaryCB.SelectedItem.ToString()); } /// @@ -355,7 +385,8 @@ private void OnUseSRPCheckedChanged(object sender, EventArgs e) private const string DUALCONE = "Dual Cone"; private const string CYLINDRICAL = "Cylindrical"; + private const string TIMEVARYINGTIDES = "TimeVarying"; private const string PERMANENTTIDES = "Permanent"; private const string NOTIDES = "None"; } -} \ No newline at end of file +} diff --git a/DotNet/NumericalPropagationDemo/KeplerianOrbitalElementsEntry.cs b/DotNet/NumericalPropagationDemo/KeplerianOrbitalElementsEntry.cs index 9b9be96..b482577 100644 --- a/DotNet/NumericalPropagationDemo/KeplerianOrbitalElementsEntry.cs +++ b/DotNet/NumericalPropagationDemo/KeplerianOrbitalElementsEntry.cs @@ -1,7 +1,10 @@ -using System; +using System; +using System.Collections.Generic; using System.Windows.Forms; -using AGI.Foundation.Celestial; +using System.ComponentModel; using AGI.Foundation.Coordinates; +using AGI.Foundation.Celestial; +using AGI.Foundation; namespace AGI.Examples { @@ -16,13 +19,19 @@ public partial class KeplerianOrbitalElementsEntry : UserControl public KeplerianOrbitalElementsEntry() { InitializeComponent(); + m_keplerianElements = m_defaultElements; + DisplayOrbitalElements(); + } - m_argumentOfPeriapsis.Text = "0"; - m_eccentricity.Text = "0.1"; - m_inclination.Text = "0.5"; - m_RAAN.Text = "0"; - m_semiMajorAxis.Text = "7800000"; - m_trueAnomaly.Text = "0"; + /// + /// A constructor that takes in and displays a set of orbital elements. + /// + /// The original orbital elements you want to display. + public KeplerianOrbitalElementsEntry(KeplerianElements elements) + { + InitializeComponent(); + m_keplerianElements = elements; + DisplayOrbitalElements(); } /// @@ -32,28 +41,103 @@ public KeplerianElements KeplerianElementValues { get { - try - { - double semimajorAxis = double.Parse(m_semiMajorAxis.Text); - double eccentricity = double.Parse(m_eccentricity.Text); - double inclination = double.Parse(m_inclination.Text); - double argumentOfPeriapsis = double.Parse(m_argumentOfPeriapsis.Text); - double rightAscensionOfAscendingNode = double.Parse(m_RAAN.Text); - double trueAnomaly = double.Parse(m_trueAnomaly.Text); - - return new KeplerianElements(semimajorAxis, eccentricity, inclination, argumentOfPeriapsis, rightAscensionOfAscendingNode, trueAnomaly, WorldGeodeticSystem1984.GravitationalParameter); - } - catch (FormatException) - { - MessageBox.Show("One of your values is not a double", "Invalid orbital element"); + CancelEventArgs answer = new CancelEventArgs(); + KeplerianOrbit_Validating(this, answer); + if (answer.Cancel) return null; + else + return m_keplerianElements; + } + set + { + m_keplerianElements = value; + this.DisplayOrbitalElements(); + } + } + + /// + /// The gravitational parameter associated with this set of elements. + /// + public double GravitationalConstant + { + get { return m_keplerianElements.GravitationalParameter; } + set + { + m_keplerianElements = new KeplerianElements( + m_keplerianElements.SemimajorAxis, + m_keplerianElements.Eccentricity, + m_keplerianElements.Inclination, + m_keplerianElements.ArgumentOfPeriapsis, + m_keplerianElements.RightAscensionOfAscendingNode, + m_keplerianElements.TrueAnomaly, + value); + } + } + + /// + /// This will update the Control with the currently entered set KeplerianElements. + /// + private void DisplayOrbitalElements() + { + m_argumentOfPeriapsis.Text = m_keplerianElements.ArgumentOfPeriapsis.ToString(); + m_eccentricity.Text = m_keplerianElements.Eccentricity.ToString(); + m_inclination.Text = m_keplerianElements.Inclination.ToString(); + m_RAAN.Text = m_keplerianElements.RightAscensionOfAscendingNode.ToString(); + m_semiMajorAxis.Text = m_keplerianElements.SemimajorAxis.ToString(); + m_trueAnomaly.Text = m_keplerianElements.TrueAnomaly.ToString(); + } + + /// + /// This will validate that the values entered in the GUI can be represented as + /// a set of KeplerianElements. + /// + /// What fired this event. + /// Additional information about this event. + private void KeplerianOrbit_Validating(object sender, CancelEventArgs e) + { + double tempSemimajorAxis; + double tempEccentricity; + double tempInclination; + double tempArgumentOfPeriapsis; + double tempRightAscensionOfAscendingNode; + double tempTrueAnomaly; + + try + { + tempSemimajorAxis = double.Parse(m_semiMajorAxis.Text); + tempEccentricity = double.Parse(m_eccentricity.Text); + tempInclination = double.Parse(m_inclination.Text); + tempArgumentOfPeriapsis = double.Parse(m_argumentOfPeriapsis.Text); + tempRightAscensionOfAscendingNode = double.Parse(m_RAAN.Text); + tempTrueAnomaly = double.Parse(m_trueAnomaly.Text); + + m_keplerianElements = new KeplerianElements(tempSemimajorAxis, tempEccentricity, tempInclination, tempArgumentOfPeriapsis, tempRightAscensionOfAscendingNode, tempTrueAnomaly, GravitationalConstant); + } + catch (FormatException) + { + MessageBox.Show("One of your values is not a double", "Invalid orbital element"); + ((Control)sender).Focus(); + if (e != null) + { + e.Cancel = true; } - catch (Exception e) + } + catch (Exception e1) + { + MessageBox.Show(e1.Message, "Bad orbital elements"); + ((Control)sender).Focus(); + if (e != null) { - MessageBox.Show(e.Message, "Bad orbital elements"); - return null; + e.Cancel = true; } } } + + // + // Members + // + + private KeplerianElements m_keplerianElements; + private readonly KeplerianElements m_defaultElements = new KeplerianElements(7800000, 0.1, 0.5, 0, 0, 0, WorldGeodeticSystem1984.GravitationalParameter); } -} \ No newline at end of file +} diff --git a/DotNet/NumericalPropagationDemo/Main.cs b/DotNet/NumericalPropagationDemo/Main.cs index 6d4114d..625769c 100644 --- a/DotNet/NumericalPropagationDemo/Main.cs +++ b/DotNet/NumericalPropagationDemo/Main.cs @@ -176,6 +176,8 @@ private void OnPropagateClick(object sender, EventArgs e) /// private void PropagateSatellite() { + m_keplerianOrbitalElementsEntry.GravitationalConstant = + m_forceModelSettings.CurrentCentralBodysGravitationalParameter; KeplerianElements orbitalElements = m_keplerianOrbitalElementsEntry.KeplerianElementValues; if (orbitalElements == null) return; @@ -310,4 +312,4 @@ static Main() private const string DateFormat = "MMM dd, yyyy HH:mm:ss"; private readonly SimulationAnimation m_animation; } -} \ No newline at end of file +} diff --git a/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.csproj b/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.csproj index b358317..519c9ce 100644 --- a/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.csproj +++ b/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.csproj @@ -13,27 +13,23 @@ 512 None - + true bin\Debug\ TRACE;DEBUG full - AnyCPU + x64 prompt MinimumRecommendedRules.ruleset - false - - - + bin\Release\ TRACE true pdbonly - AnyCPU + x64 prompt MinimumRecommendedRules.ruleset - false diff --git a/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.sln b/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.sln index 65edb1e..205d59f 100644 --- a/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.sln +++ b/DotNet/NumericalPropagationDemo/NumericalPropagationDemo.sln @@ -5,14 +5,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NumericalPropagationDemo", EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Release|Any CPU.Build.0 = Release|Any CPU + {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Debug|x64.ActiveCfg = Debug|x64 + {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Debug|x64.Build.0 = Debug|x64 + {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Release|x64.ActiveCfg = Release|x64 + {C9229FE6-AA6A-4E54-BEBE-C5900F7AB828}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DotNet/NumericalPropagationDemo/README.md b/DotNet/NumericalPropagationDemo/README.md index ca91ff9..73dde60 100644 --- a/DotNet/NumericalPropagationDemo/README.md +++ b/DotNet/NumericalPropagationDemo/README.md @@ -1,5 +1,5 @@ # Numerical Propagation Demo -This application uses a [NumericalPropagator](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_NumericalPropagator.htm) to propagate a satellite, which is then visualized in Insight3D using a [MarkerGraphicsExtension](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Platforms_MarkerGraphicsExtension.htm) and a [PathPrimitive](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Graphics_PathPrimitive.htm). Force models can be configured to act on the satellite's orbit being propagated, specifically: [SphericalHarmonicGravity](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_SphericalHarmonicGravity.htm), [TwoBodyGravity](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_TwoBodyGravity.htm), [SimpleSolarRadiationForce](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_SimpleSolarRadiationForce.htm), [ThirdBodyGravity](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_ThirdBodyGravity.htm), and [AtmosphericDragForce](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_AtmosphericDragForce.htm). A [RungeKutta4Integrator](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_NumericalMethods_RungeKutta4Integrator.htm) or [RungeKuttaFehlberg78Integrator](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_NumericalMethods_RungeKuttaFehlberg78Integrator.htm) can be configured for use by the propagator. The state described by the [NumericalPropagatorDefinition](http://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_NumericalPropagatorDefinition.htm) in this demo contains just a position and velocity representing one satellite. More generally, the state can contain any number of elements to be propagated including multiple positions, mass, or other parameters with their own differential equations. For more information see the [Orbit Propagation](http://help.agi.com/AGIComponents/html/OrbitPropagation.htm) topic. +This application uses a [NumericalPropagator](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_NumericalPropagator.htm) to propagate a satellite, which is then visualized in Insight3D using a [MarkerGraphicsExtension](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Platforms_MarkerGraphicsExtension.htm) and a [PathPrimitive](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Graphics_PathPrimitive.htm). Force models can be configured to act on the satellite's orbit being propagated, specifically: [SphericalHarmonicGravity](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_SphericalHarmonicGravity.htm), [TwoBodyGravity](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_TwoBodyGravity.htm), [SimpleSolarRadiationForce](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_SimpleSolarRadiationForce.htm), [ThirdBodyGravity](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_ThirdBodyGravity.htm), and [AtmosphericDragForce](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Celestial_AtmosphericDragForce.htm). A [RungeKutta4Integrator](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_NumericalMethods_RungeKutta4Integrator.htm) or [RungeKuttaFehlberg78Integrator](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_NumericalMethods_RungeKuttaFehlberg78Integrator.htm) can be configured for use by the propagator. The state described by the [NumericalPropagatorDefinition](https://help.agi.com/AGIComponents/html/T_AGI_Foundation_Propagators_NumericalPropagatorDefinition.htm) in this demo contains just a position and velocity representing one satellite. More generally, the state can contain any number of elements to be propagated including multiple positions, mass, or other parameters with their own differential equations. For more information see the [Orbit Propagation](https://help.agi.com/AGIComponents/html/OrbitPropagation.htm) topic. ![Numerical Propagation Demo](Images/ExampleNumericalPropagationDemo.jpg) diff --git a/Java/CesiumDemo/.classpath b/Java/CesiumDemo/.classpath index adf996f..93d633f 100644 --- a/Java/CesiumDemo/.classpath +++ b/Java/CesiumDemo/.classpath @@ -5,43 +5,43 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + + \ No newline at end of file diff --git a/Java/CesiumDemo/CesiumDemo.launch b/Java/CesiumDemo/CesiumDemo.launch index 38d324f..a15f3fa 100644 --- a/Java/CesiumDemo/CesiumDemo.launch +++ b/Java/CesiumDemo/CesiumDemo.launch @@ -10,7 +10,7 @@ - + diff --git a/Java/CesiumDemo/README.md b/Java/CesiumDemo/README.md index 2d8b3b1..88482ec 100644 --- a/Java/CesiumDemo/README.md +++ b/Java/CesiumDemo/README.md @@ -1,14 +1,14 @@ # Cesium Demo -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/AGIComponentsJava/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. +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. -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. +To simplify the application and minimize dependencies, this application uses [Jetty][https://www.eclipse.org/jetty/] and [Spark][https://sparkjava.com/] to create a simple web service. Please note that use of STK Components, and the capabilities being demonstrated, are not specific to these frameworks. STK Components can be integrated with Cesium Analytics SDK using any web application framework. 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. ## Features -This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of STK Web Visualization Library, including: +This example demonstrates visualizing various types of Components objects and analysis, and the advanced graphical capabilities of Cesium Analytics SDK, including: * A satellite propagated from a TLE * Access between a satellite and a ground station @@ -28,9 +28,9 @@ This example demonstrates visualizing various types of Components objects and an ## Installation -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/). +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/). -Unpack the contents of the `Build\Cesium` directory from the STK Web Visualization Library package into the `CesiumDemo\web\public\Cesium` directory before building and running the example. +Unpack the contents of the `Build\Cesium` directory from the Cesium Analytics SDK package into the `CesiumDemo\web\public\Cesium` directory before building and running the example. Then, to compile this sample application with Ant: * Copy your AGI.Foundation.lic file into the src directory. diff --git a/Java/CesiumDemo/lib/jetty-http-9.4.15.v20190215.jar b/Java/CesiumDemo/lib/jetty-http-9.4.15.v20190215.jar deleted file mode 100644 index 73bac0d..0000000 Binary files a/Java/CesiumDemo/lib/jetty-http-9.4.15.v20190215.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/jetty-http-9.4.44.v20210927.jar b/Java/CesiumDemo/lib/jetty-http-9.4.44.v20210927.jar new file mode 100644 index 0000000..c894e87 Binary files /dev/null and b/Java/CesiumDemo/lib/jetty-http-9.4.44.v20210927.jar differ diff --git a/Java/CesiumDemo/lib/jetty-io-9.4.15.v20190215.jar b/Java/CesiumDemo/lib/jetty-io-9.4.15.v20190215.jar deleted file mode 100644 index 7aeca58..0000000 Binary files a/Java/CesiumDemo/lib/jetty-io-9.4.15.v20190215.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/jetty-io-9.4.44.v20210927.jar b/Java/CesiumDemo/lib/jetty-io-9.4.44.v20210927.jar new file mode 100644 index 0000000..afdcfd5 Binary files /dev/null and b/Java/CesiumDemo/lib/jetty-io-9.4.44.v20210927.jar differ diff --git a/Java/CesiumDemo/lib/jetty-server-9.4.15.v20190215.jar b/Java/CesiumDemo/lib/jetty-server-9.4.15.v20190215.jar deleted file mode 100644 index 86d06d8..0000000 Binary files a/Java/CesiumDemo/lib/jetty-server-9.4.15.v20190215.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/jetty-server-9.4.44.v20210927.jar b/Java/CesiumDemo/lib/jetty-server-9.4.44.v20210927.jar new file mode 100644 index 0000000..42e709d Binary files /dev/null and b/Java/CesiumDemo/lib/jetty-server-9.4.44.v20210927.jar differ diff --git a/Java/CesiumDemo/lib/jetty-util-9.4.15.v20190215.jar b/Java/CesiumDemo/lib/jetty-util-9.4.15.v20190215.jar deleted file mode 100644 index 682313e..0000000 Binary files a/Java/CesiumDemo/lib/jetty-util-9.4.15.v20190215.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/jetty-util-9.4.44.v20210927.jar b/Java/CesiumDemo/lib/jetty-util-9.4.44.v20210927.jar new file mode 100644 index 0000000..a3229c0 Binary files /dev/null and b/Java/CesiumDemo/lib/jetty-util-9.4.44.v20210927.jar differ diff --git a/Java/CesiumDemo/lib/slf4j-api-1.7.25.jar b/Java/CesiumDemo/lib/slf4j-api-1.7.25.jar deleted file mode 100644 index 0143c09..0000000 Binary files a/Java/CesiumDemo/lib/slf4j-api-1.7.25.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/slf4j-api-1.7.35.jar b/Java/CesiumDemo/lib/slf4j-api-1.7.35.jar new file mode 100644 index 0000000..b60823f Binary files /dev/null and b/Java/CesiumDemo/lib/slf4j-api-1.7.35.jar differ diff --git a/Java/CesiumDemo/lib/slf4j-simple-1.7.25.jar b/Java/CesiumDemo/lib/slf4j-simple-1.7.25.jar deleted file mode 100644 index a7260f3..0000000 Binary files a/Java/CesiumDemo/lib/slf4j-simple-1.7.25.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/slf4j-simple-1.7.35.jar b/Java/CesiumDemo/lib/slf4j-simple-1.7.35.jar new file mode 100644 index 0000000..8a70064 Binary files /dev/null and b/Java/CesiumDemo/lib/slf4j-simple-1.7.35.jar differ diff --git a/Java/CesiumDemo/lib/spark-core-2.9.0.jar b/Java/CesiumDemo/lib/spark-core-2.9.3.jar similarity index 50% rename from Java/CesiumDemo/lib/spark-core-2.9.0.jar rename to Java/CesiumDemo/lib/spark-core-2.9.3.jar index a6619e2..c396046 100644 Binary files a/Java/CesiumDemo/lib/spark-core-2.9.0.jar and b/Java/CesiumDemo/lib/spark-core-2.9.3.jar differ diff --git a/Java/CesiumDemo/lib/src/jetty-http-9.4.15.v20190215-sources.jar b/Java/CesiumDemo/lib/src/jetty-http-9.4.15.v20190215-sources.jar deleted file mode 100644 index 75daaad..0000000 Binary files a/Java/CesiumDemo/lib/src/jetty-http-9.4.15.v20190215-sources.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/src/jetty-http-9.4.44.v20210927-sources.jar b/Java/CesiumDemo/lib/src/jetty-http-9.4.44.v20210927-sources.jar new file mode 100644 index 0000000..bcbbd75 Binary files /dev/null and b/Java/CesiumDemo/lib/src/jetty-http-9.4.44.v20210927-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/jetty-io-9.4.15.v20190215-sources.jar b/Java/CesiumDemo/lib/src/jetty-io-9.4.15.v20190215-sources.jar deleted file mode 100644 index ba47674..0000000 Binary files a/Java/CesiumDemo/lib/src/jetty-io-9.4.15.v20190215-sources.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/src/jetty-io-9.4.44.v20210927-sources.jar b/Java/CesiumDemo/lib/src/jetty-io-9.4.44.v20210927-sources.jar new file mode 100644 index 0000000..7a07045 Binary files /dev/null and b/Java/CesiumDemo/lib/src/jetty-io-9.4.44.v20210927-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/jetty-server-9.4.15.v20190215-sources.jar b/Java/CesiumDemo/lib/src/jetty-server-9.4.15.v20190215-sources.jar deleted file mode 100644 index 44139c1..0000000 Binary files a/Java/CesiumDemo/lib/src/jetty-server-9.4.15.v20190215-sources.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/src/jetty-server-9.4.44.v20210927-sources.jar b/Java/CesiumDemo/lib/src/jetty-server-9.4.44.v20210927-sources.jar new file mode 100644 index 0000000..7fcecb8 Binary files /dev/null and b/Java/CesiumDemo/lib/src/jetty-server-9.4.44.v20210927-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/jetty-util-9.4.15.v20190215-sources.jar b/Java/CesiumDemo/lib/src/jetty-util-9.4.15.v20190215-sources.jar deleted file mode 100644 index b9b0a34..0000000 Binary files a/Java/CesiumDemo/lib/src/jetty-util-9.4.15.v20190215-sources.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/src/jetty-util-9.4.44.v20210927-sources.jar b/Java/CesiumDemo/lib/src/jetty-util-9.4.44.v20210927-sources.jar new file mode 100644 index 0000000..cfca761 Binary files /dev/null and b/Java/CesiumDemo/lib/src/jetty-util-9.4.44.v20210927-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/slf4j-api-1.7.25-sources.jar b/Java/CesiumDemo/lib/src/slf4j-api-1.7.35-sources.jar similarity index 65% rename from Java/CesiumDemo/lib/src/slf4j-api-1.7.25-sources.jar rename to Java/CesiumDemo/lib/src/slf4j-api-1.7.35-sources.jar index b2a3d83..726b9d6 100644 Binary files a/Java/CesiumDemo/lib/src/slf4j-api-1.7.25-sources.jar and b/Java/CesiumDemo/lib/src/slf4j-api-1.7.35-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/slf4j-simple-1.7.25-sources.jar b/Java/CesiumDemo/lib/src/slf4j-simple-1.7.25-sources.jar deleted file mode 100644 index f0a2f58..0000000 Binary files a/Java/CesiumDemo/lib/src/slf4j-simple-1.7.25-sources.jar and /dev/null differ diff --git a/Java/CesiumDemo/lib/src/slf4j-simple-1.7.35-sources.jar b/Java/CesiumDemo/lib/src/slf4j-simple-1.7.35-sources.jar new file mode 100644 index 0000000..668a4b2 Binary files /dev/null and b/Java/CesiumDemo/lib/src/slf4j-simple-1.7.35-sources.jar differ diff --git a/Java/CesiumDemo/lib/src/spark-core-2.9.0-sources.jar b/Java/CesiumDemo/lib/src/spark-core-2.9.3-sources.jar similarity index 72% rename from Java/CesiumDemo/lib/src/spark-core-2.9.0-sources.jar rename to Java/CesiumDemo/lib/src/spark-core-2.9.3-sources.jar index 2bcc096..f6df4aa 100644 Binary files a/Java/CesiumDemo/lib/src/spark-core-2.9.0-sources.jar and b/Java/CesiumDemo/lib/src/spark-core-2.9.3-sources.jar differ diff --git a/Java/CesiumDemo/web/public/Cesium/README.txt b/Java/CesiumDemo/web/public/Cesium/README.txt index 50fdbd8..318d1b6 100644 --- a/Java/CesiumDemo/web/public/Cesium/README.txt +++ b/Java/CesiumDemo/web/public/Cesium/README.txt @@ -1,2 +1,2 @@ -Unpack the contents of the Build\Cesium from the STK Web Visualization Library +Unpack the contents of the Build\Cesium from the Cesium Analytics SDK package into this directory, so that Cesium.js is next to this README file. \ No newline at end of file diff --git a/Java/CommunicationsDemo/.classpath b/Java/CommunicationsDemo/.classpath index 48aa7cf..efb786c 100644 --- a/Java/CommunicationsDemo/.classpath +++ b/Java/CommunicationsDemo/.classpath @@ -5,40 +5,40 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Java/CommunicationsDemo/CommunicationsDemo.launch b/Java/CommunicationsDemo/CommunicationsDemo.launch index 91e8b1d..0400786 100644 --- a/Java/CommunicationsDemo/CommunicationsDemo.launch +++ b/Java/CommunicationsDemo/CommunicationsDemo.launch @@ -10,7 +10,7 @@ - + diff --git a/Java/CommunicationsDemo/README.md b/Java/CommunicationsDemo/README.md index f7d10e8..5febff6 100644 --- a/Java/CommunicationsDemo/README.md +++ b/Java/CommunicationsDemo/README.md @@ -1,6 +1,6 @@ # Communications Demo -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/AGIComponentsJava/Javadoc/agi-foundation-communications-SimpleDigitalTransmitter.html), [Transceiver](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-communications-Transceiver.html) and [SimpleReceiver](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-communications-SimpleReceiver.html), 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/AGIComponentsJava/html/Communications.htm) topic. +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/AGIComponentsJava/Javadoc/agi-foundation-communications-SimpleDigitalTransmitter.html), [Transceiver](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-communications-Transceiver.html) and [SimpleReceiver](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-communications-SimpleReceiver.html), 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/AGIComponentsJava/html/Communications.htm) topic. ![Communications Demo](Images/ExampleCommunicationsDemoJava.png) diff --git a/Java/CommunicationsDemo/src/agi/examples/communicationsdemo/Main.java b/Java/CommunicationsDemo/src/agi/examples/communicationsdemo/Main.java index cd0bcc6..f32592e 100644 --- a/Java/CommunicationsDemo/src/agi/examples/communicationsdemo/Main.java +++ b/Java/CommunicationsDemo/src/agi/examples/communicationsdemo/Main.java @@ -242,12 +242,7 @@ public Main() { SceneManager.setAnimation(animation); // Subscribe to the time changed event so we can update our display. - SceneManager.addTimeChanged(new EventHandler() { - @Override - public void invoke(Object sender, TimeChangedEventArgs e) { - sceneManagerTimeChanged(sender, e); - } - }); + SceneManager.addTimeChanged(EventHandler.of(this::sceneManagerTimeChanged)); // Reset to the beginning. animation.reset(); diff --git a/Java/Insight3DApplet/.classpath b/Java/Insight3DApplet/.classpath index b51604f..634f46b 100644 --- a/Java/Insight3DApplet/.classpath +++ b/Java/Insight3DApplet/.classpath @@ -2,35 +2,35 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Java/Insight3DApplet/Insight3DApplet.jnlp.input b/Java/Insight3DApplet/Insight3DApplet.jnlp.input index fabc3b8..0ece786 100644 --- a/Java/Insight3DApplet/Insight3DApplet.jnlp.input +++ b/Java/Insight3DApplet/Insight3DApplet.jnlp.input @@ -2,7 +2,7 @@ Insight3DApplet - Analytical Graphics, Inc. + AGI, an Ansys Company diff --git a/Java/Insight3DApplet/STKComponents.jnlp.input b/Java/Insight3DApplet/STKComponents.jnlp.input index 630c8e5..fd66ad0 100644 --- a/Java/Insight3DApplet/STKComponents.jnlp.input +++ b/Java/Insight3DApplet/STKComponents.jnlp.input @@ -2,7 +2,7 @@ STK Components - Analytical Graphics, Inc. + AGI, an Ansys Company diff --git a/Java/LotsOfSatellites/.classpath b/Java/LotsOfSatellites/.classpath index 309491e..2b729cf 100644 --- a/Java/LotsOfSatellites/.classpath +++ b/Java/LotsOfSatellites/.classpath @@ -5,30 +5,30 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/Java/LotsOfSatellites/LotsOfSatellites.launch b/Java/LotsOfSatellites/LotsOfSatellites.launch index 5232f52..935a146 100644 --- a/Java/LotsOfSatellites/LotsOfSatellites.launch +++ b/Java/LotsOfSatellites/LotsOfSatellites.launch @@ -10,6 +10,7 @@ + diff --git a/Java/LotsOfSatellites/README.md b/Java/LotsOfSatellites/README.md index 24777cb..e83bbfa 100644 --- a/Java/LotsOfSatellites/README.md +++ b/Java/LotsOfSatellites/README.md @@ -1,3 +1,11 @@ +# Lots of Satellites + +This application uses [Sgp4Propagator](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-propagators-Sgp4Propagator.html) to propagate up to 10,000 satellites, which are visualized in Insight3D using [MarkerBatchPrimitive](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-graphics-MarkerBatchPrimitive.html). Satellites shown in red have access to a ground station located in Australia. + +![Lots of Satellites](Images/ExampleLotsOfSatellites.jpg) + +## Compilation + To compile this sample application with Ant: * Copy your AGI.Foundation.lic file into the src directory. * Run "ant package". diff --git a/Java/NumericalPropagationDemo/.classpath b/Java/NumericalPropagationDemo/.classpath index 7ade404..53d4442 100644 --- a/Java/NumericalPropagationDemo/.classpath +++ b/Java/NumericalPropagationDemo/.classpath @@ -6,40 +6,40 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Java/NumericalPropagationDemo/NumericalPropagationDemo.launch b/Java/NumericalPropagationDemo/NumericalPropagationDemo.launch index 5dde9cd..1356154 100644 --- a/Java/NumericalPropagationDemo/NumericalPropagationDemo.launch +++ b/Java/NumericalPropagationDemo/NumericalPropagationDemo.launch @@ -10,6 +10,7 @@ + diff --git a/Java/NumericalPropagationDemo/README.md b/Java/NumericalPropagationDemo/README.md index 84a44b1..b169553 100644 --- a/Java/NumericalPropagationDemo/README.md +++ b/Java/NumericalPropagationDemo/README.md @@ -1,6 +1,6 @@ # Numerical Propagation Demo -This application uses a [NumericalPropagator](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-propagators-NumericalPropagator.html) to propagate a satellite, which is then visualized in Insight3D using a [MarkerGraphicsExtension](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-platforms-MarkerGraphicsExtension.html) and a [PathPrimitive](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-graphics-PathPrimitive.html). Force models can be configured to act on the satellite's orbit being propagated, specifically: [SphericalHarmonicGravity](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-SphericalHarmonicGravity.html), [TwoBodyGravity](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-TwoBodyGravity.html), [SimpleSolarRadiationForce](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-SimpleSolarRadiationForce.html), [ThirdBodyGravity](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-ThirdBodyGravity.html), and [AtmosphericDragForce](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-AtmosphericDragForce.html). A [RungeKutta4Integrator](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-numericalmethods-RungeKutta4Integrator.html) or [RungeKuttaFehlberg78Integrator](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-numericalmethods-RungeKuttaFehlberg78Integrator.html) can be configured for use by the propagator. The state described by the [NumericalPropagatorDefinition](http://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-propagators-NumericalPropagatorDefinition.html) in this demo contains just a position and velocity representing one satellite. More generally, the state can contain any number of elements to be propagated including multiple positions, mass, or other parameters with their own differential equations. For more information see the [Orbit Propagation](http://help.agi.com/AGIComponentsJava/html/OrbitPropagation.htm) topic. +This application uses a [NumericalPropagator](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-propagators-NumericalPropagator.html) to propagate a satellite, which is then visualized in Insight3D using a [MarkerGraphicsExtension](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-platforms-MarkerGraphicsExtension.html) and a [PathPrimitive](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-graphics-PathPrimitive.html). Force models can be configured to act on the satellite's orbit being propagated, specifically: [SphericalHarmonicGravity](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-SphericalHarmonicGravity.html), [TwoBodyGravity](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-TwoBodyGravity.html), [SimpleSolarRadiationForce](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-SimpleSolarRadiationForce.html), [ThirdBodyGravity](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-ThirdBodyGravity.html), and [AtmosphericDragForce](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-celestial-AtmosphericDragForce.html). A [RungeKutta4Integrator](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-numericalmethods-RungeKutta4Integrator.html) or [RungeKuttaFehlberg78Integrator](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-numericalmethods-RungeKuttaFehlberg78Integrator.html) can be configured for use by the propagator. The state described by the [NumericalPropagatorDefinition](https://help.agi.com/AGIComponentsJava/Javadoc/agi-foundation-propagators-NumericalPropagatorDefinition.html) in this demo contains just a position and velocity representing one satellite. More generally, the state can contain any number of elements to be propagated including multiple positions, mass, or other parameters with their own differential equations. For more information see the [Orbit Propagation](https://help.agi.com/AGIComponentsJava/html/OrbitPropagation.htm) topic. ![Numerical Propagation Demo](Images/ExampleNumericalPropagationDemoJava.png) diff --git a/Java/NumericalPropagationDemo/src/agi/examples/numericalpropagationdemo/ForceModelSettings.java b/Java/NumericalPropagationDemo/src/agi/examples/numericalpropagationdemo/ForceModelSettings.java index d941a29..730caac 100644 --- a/Java/NumericalPropagationDemo/src/agi/examples/numericalpropagationdemo/ForceModelSettings.java +++ b/Java/NumericalPropagationDemo/src/agi/examples/numericalpropagationdemo/ForceModelSettings.java @@ -34,8 +34,11 @@ import agi.foundation.celestial.CentralBodiesFacet; import agi.foundation.celestial.CentralBody; import agi.foundation.celestial.ConstantSolarGeophysicalData; +import agi.foundation.celestial.EarthCentralBody; +import agi.foundation.celestial.Iers2003SolidTideModel; import agi.foundation.celestial.JplDE; import agi.foundation.celestial.JplDECentralBody; +import agi.foundation.celestial.PermanentSolidTideModel; import agi.foundation.celestial.ScalarAtmosphericDensity; import agi.foundation.celestial.ScalarDensityJacchiaRoberts; import agi.foundation.celestial.ScalarDensityMsis2000; @@ -45,6 +48,7 @@ import agi.foundation.celestial.ScalarOccultationDualCone; import agi.foundation.celestial.SimpleSolarRadiationForce; import agi.foundation.celestial.SolarGeophysicalData; +import agi.foundation.celestial.SolidTideModel; import agi.foundation.celestial.SphericalHarmonicGravity; import agi.foundation.celestial.SphericalHarmonicGravityField; import agi.foundation.celestial.SphericalHarmonicGravityModel; @@ -224,6 +228,7 @@ public ForceModelSettings(JplDE jplInfo, String gravityFile) { m_moon3B.setEnabled(true); m_dragUse.setEnabled(true); m_dragUse.setSelected(m_lastDragSelection); + m_tides.setEnabled(true); m_centralBody = CentralBodiesFacet.getFromContext().getEarth(); } if (newCBName.equals(MOON)) { @@ -232,8 +237,8 @@ public ForceModelSettings(JplDE jplInfo, String gravityFile) { m_dragUse.setSelected(false); m_dragUse.setEnabled(false); m_moon3B.setEnabled(false); + m_tides.setEnabled(false); m_centralBody = CentralBodiesFacet.getFromContext().getMoon(); - } m_gravitationalParameter = m_gravConstants.get(newCBName.toUpperCase()); }); @@ -356,6 +361,7 @@ public ForceModelSettings(JplDE jplInfo, String gravityFile) { } m_tides.addItem(PERMANENTTIDES); m_tides.addItem(NOTIDES); + m_tides.addItem(TIMEVARYINGTIDES); } } @@ -928,18 +934,27 @@ public void setForceModelsOnPoint(PropagationNewtonianPoint point, Scalar area) CentralBodiesFacet.getFromContext().getByName(primaryCB), m_gravConstants.get(primaryCB.toUpperCase())); point.getAppliedForces().add(gravity); } else { - SphericalHarmonicsTideType tideType = SphericalHarmonicsTideType.NONE; - if (NOTIDES.equals(m_tides.getSelectedItem().toString())) { - tideType = SphericalHarmonicsTideType.NONE; - } else if (PERMANENTTIDES.equals(m_tides.getSelectedItem().toString())) { - tideType = SphericalHarmonicsTideType.PERMANENT_TIDE_ONLY; + SphericalHarmonicGravityModel model = SphericalHarmonicGravityModel.readFrom(m_gravityFieldFile.getText()); + SolidTideModel tideModel; + if (m_tides.isEnabled()) { + // Only enabled if Earth is selected as central body. + if (NOTIDES.equals(m_tides.getSelectedItem().toString())) { + model = model.getIncludesPermanentTides() ? model.withoutEarthPermanentTides() : model; + tideModel = null; + } else if (PERMANENTTIDES.equals(m_tides.getSelectedItem().toString())) { + tideModel = model.getIncludesPermanentTides() ? null : new PermanentSolidTideModel(); + } else { + model = model.getIncludesPermanentTides() ? model.withoutEarthPermanentTides() : model; + tideModel = new Iers2003SolidTideModel(((EarthCentralBody)m_centralBody).getOrientationParameters()); + } + } else { + tideModel = null; } int order = Integer.parseInt(m_order.getText()); int degree = Integer.parseInt(m_degree.getText()); - SphericalHarmonicGravityModel model = SphericalHarmonicGravityModel.readFrom(m_gravityFieldFile.getText()); SphericalHarmonicGravity gravity = new SphericalHarmonicGravity(point.getIntegrationPoint(), - new SphericalHarmonicGravityField(model, degree, order, true, tideType)); + new SphericalHarmonicGravityField(model, degree, order, true, tideModel)); point.getAppliedForces().add(gravity); if (!gravity.getGravityField().getCentralBody().getName().toUpperCase().contentEquals(primaryCB.toUpperCase())) { @@ -1019,6 +1034,7 @@ public CentralBody getCurrentCentralBody() { private final String DUALCONE = "Dual Cone"; private final String CYLINDRICAL = "Cylindrical"; + private final String TIMEVARYINGTIDES = "TimeVarying"; private final String PERMANENTTIDES = "Permanent"; private final String NOTIDES = "None"; diff --git a/Java/SatelliteTracker/.classpath b/Java/SatelliteTracker/.classpath index f9762fa..1403d46 100644 --- a/Java/SatelliteTracker/.classpath +++ b/Java/SatelliteTracker/.classpath @@ -4,21 +4,21 @@ - - - + + + - + - + - + - + - + diff --git a/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava1.png b/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava1.png index 5e8a7e8..a0e05e4 100644 Binary files a/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava1.png and b/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava1.png differ diff --git a/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava2.png b/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava2.png index 2962b2a..b7395c5 100644 Binary files a/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava2.png and b/Java/SatelliteTracker/Images/ExampleSatelliteTrackerJava2.png differ diff --git a/Java/SatelliteTracker/README.md b/Java/SatelliteTracker/README.md index 2d76dbc..6900259 100644 --- a/Java/SatelliteTracker/README.md +++ b/Java/SatelliteTracker/README.md @@ -6,7 +6,7 @@ This Swing application computes access between a user-selected satellite viewed ![Satellite Tracker](Images/ExampleSatelliteTrackerJava2.png) -For more information on the application, see [the topic for this example](http://help.agi.com/AGIComponentsJava/html/ExampleSatelliteTrackerJava.htm) in the STK Components documentation. +For more information on the application, see [the topic for this example](https://help.agi.com/AGIComponentsJava/html/ExampleSatelliteTrackerJava.htm) in the STK Components documentation. ## Compilation diff --git a/Java/SatelliteTracker/SatelliteTracker.launch b/Java/SatelliteTracker/SatelliteTracker.launch index 16b881e..4736121 100644 --- a/Java/SatelliteTracker/SatelliteTracker.launch +++ b/Java/SatelliteTracker/SatelliteTracker.launch @@ -10,6 +10,7 @@ + diff --git a/Java/SatelliteTracker/lib/ThirdPartyLicenses.txt b/Java/SatelliteTracker/lib/ThirdPartyLicenses.txt index e37c9b9..e83f01d 100644 --- a/Java/SatelliteTracker/lib/ThirdPartyLicenses.txt +++ b/Java/SatelliteTracker/lib/ThirdPartyLicenses.txt @@ -1,516 +1,78 @@ -swingx, swingx-ws -================= +commons-logging +=============== + +Licensed under Apache 2.0. + +See META-INF\LICENSE.txt and META-INF\NOTICE.txt inside the JAR. + +jxmapviewer2 +============ Licensed under the LGPL. -> Copyright (c) 2005-2006 Sun Microsystems, Inc., 4150 Network Circle, Santa -> Clara, California 95054, U.S.A. All rights reserved. Use is subject -> to license terms below. Sun, Sun Microsystems and the Sun logo are -> trademarks or registered trademarks of Sun Microsystems, Inc. in the -> U.S. and other countries. -> -> Notice: This product is covered by U.S. export control laws and may be -> subject to the export or import laws in other countries. These laws may -> restrict the fields of use for this software and may require you to -> secure government authorization. -> -> GNU LESSER GENERAL PUBLIC LICENSE -> Version 2.1, February 1999 -> -> Copyright (C) 1991, 1999 Free Software Foundation, Inc. -> 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -> Everyone is permitted to copy and distribute verbatim copies -> of this license document, but changing it is not allowed. -> -> [This is the first released version of the Lesser GPL. It also counts -> as the successor of the GNU Library Public License, version 2, hence -> the version number 2.1.] -> -> Preamble -> -> The licenses for most software are designed to take away your -> freedom to share and change it. By contrast, the GNU General Public -> Licenses are intended to guarantee your freedom to share and change -> free software--to make sure the software is free for all its users. -> -> This license, the Lesser General Public License, applies to some -> specially designated software packages--typically libraries--of the -> Free Software Foundation and other authors who decide to use it. You -> can use it too, but we suggest you first think carefully about whether -> this license or the ordinary General Public License is the better -> strategy to use in any particular case, based on the explanations below. -> -> When we speak of free software, we are referring to freedom of use, -> not price. Our General Public Licenses are designed to make sure that -> you have the freedom to distribute copies of free software (and charge -> for this service if you wish); that you receive source code or can get -> it if you want it; that you can change the software and use pieces of -> it in new free programs; and that you are informed that you can do -> these things. -> -> To protect your rights, we need to make restrictions that forbid -> distributors to deny you these rights or to ask you to surrender these -> rights. These restrictions translate to certain responsibilities for -> you if you distribute copies of the library or if you modify it. -> -> For example, if you distribute copies of the library, whether gratis -> or for a fee, you must give the recipients all the rights that we gave -> you. You must make sure that they, too, receive or can get the source -> code. If you link other code with the library, you must provide -> complete object files to the recipients, so that they can relink them -> with the library after making changes to the library and recompiling -> it. And you must show them these terms so they know their rights. -> -> We protect your rights with a two-step method: (1) we copyright the -> library, and (2) we offer you this license, which gives you legal -> permission to copy, distribute and/or modify the library. -> -> To protect each distributor, we want to make it very clear that -> there is no warranty for the free library. Also, if the library is -> modified by someone else and passed on, the recipients should know -> that what they have is not the original version, so that the original -> author's reputation will not be affected by problems that might be -> introduced by others. -> -> Finally, software patents pose a constant threat to the existence of -> any free program. We wish to make sure that a company cannot -> effectively restrict the users of a free program by obtaining a -> restrictive license from a patent holder. Therefore, we insist that -> any patent license obtained for a version of the library must be -> consistent with the full freedom of use specified in this license. -> -> Most GNU software, including some libraries, is covered by the -> ordinary GNU General Public License. This license, the GNU Lesser -> General Public License, applies to certain designated libraries, and -> is quite different from the ordinary General Public License. We use -> this license for certain libraries in order to permit linking those -> libraries into non-free programs. -> -> When a program is linked with a library, whether statically or using -> a shared library, the combination of the two is legally speaking a -> combined work, a derivative of the original library. The ordinary -> General Public License therefore permits such linking only if the -> entire combination fits its criteria of freedom. The Lesser General -> Public License permits more lax criteria for linking other code with -> the library. -> -> We call this license the "Lesser" General Public License because it -> does Less to protect the user's freedom than the ordinary General -> Public License. It also provides other free software developers Less -> of an advantage over competing non-free programs. These disadvantages -> are the reason we use the ordinary General Public License for many -> libraries. However, the Lesser license provides advantages in certain -> special circumstances. -> -> For example, on rare occasions, there may be a special need to -> encourage the widest possible use of a certain library, so that it becomes -> a de-facto standard. To achieve this, non-free programs must be -> allowed to use the library. A more frequent case is that a free -> library does the same job as widely used non-free libraries. In this -> case, there is little to gain by limiting the free library to free -> software only, so we use the Lesser General Public License. -> -> In other cases, permission to use a particular library in non-free -> programs enables a greater number of people to use a large body of -> free software. For example, permission to use the GNU C Library in -> non-free programs enables many more people to use the whole GNU -> operating system, as well as its variant, the GNU/Linux operating -> system. -> -> Although the Lesser General Public License is Less protective of the -> users' freedom, it does ensure that the user of a program that is -> linked with the Library has the freedom and the wherewithal to run -> that program using a modified version of the Library. -> -> The precise terms and conditions for copying, distribution and -> modification follow. Pay close attention to the difference between a -> "work based on the library" and a "work that uses the library". The -> former contains code derived from the library, whereas the latter must -> be combined with the library in order to run. -> -> GNU LESSER GENERAL PUBLIC LICENSE -> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -> -> 0. This License Agreement applies to any software library or other -> program which contains a notice placed by the copyright holder or -> other authorized party saying it may be distributed under the terms of -> this Lesser General Public License (also called "this License"). -> Each licensee is addressed as "you". -> -> A "library" means a collection of software functions and/or data -> prepared so as to be conveniently linked with application programs -> (which use some of those functions and data) to form executables. -> -> The "Library", below, refers to any such software library or work -> which has been distributed under these terms. A "work based on the -> Library" means either the Library or any derivative work under -> copyright law: that is to say, a work containing the Library or a -> portion of it, either verbatim or with modifications and/or translated -> straightforwardly into another language. (Hereinafter, translation is -> included without limitation in the term "modification".) -> -> "Source code" for a work means the preferred form of the work for -> making modifications to it. For a library, complete source code means -> all the source code for all modules it contains, plus any associated -> interface definition files, plus the scripts used to control compilation -> and installation of the library. -> -> Activities other than copying, distribution and modification are not -> covered by this License; they are outside its scope. The act of -> running a program using the Library is not restricted, and output from -> such a program is covered only if its contents constitute a work based -> on the Library (independent of the use of the Library in a tool for -> writing it). Whether that is true depends on what the Library does -> and what the program that uses the Library does. -> -> 1. You may copy and distribute verbatim copies of the Library's -> complete source code as you receive it, in any medium, provided that -> you conspicuously and appropriately publish on each copy an -> appropriate copyright notice and disclaimer of warranty; keep intact -> all the notices that refer to this License and to the absence of any -> warranty; and distribute a copy of this License along with the -> Library. -> -> You may charge a fee for the physical act of transferring a copy, -> and you may at your option offer warranty protection in exchange for a -> fee. -> -> 2. You may modify your copy or copies of the Library or any portion -> of it, thus forming a work based on the Library, and copy and -> distribute such modifications or work under the terms of Section 1 -> above, provided that you also meet all of these conditions: -> -> a) The modified work must itself be a software library. -> -> b) You must cause the files modified to carry prominent notices -> stating that you changed the files and the date of any change. -> -> c) You must cause the whole of the work to be licensed at no -> charge to all third parties under the terms of this License. -> -> d) If a facility in the modified Library refers to a function or a -> table of data to be supplied by an application program that uses -> the facility, other than as an argument passed when the facility -> is invoked, then you must make a good faith effort to ensure that, -> in the event an application does not supply such function or -> table, the facility still operates, and performs whatever part of -> its purpose remains meaningful. -> -> (For example, a function in a library to compute square roots has -> a purpose that is entirely well-defined independent of the -> application. Therefore, Subsection 2d requires that any -> application-supplied function or table used by this function must -> be optional: if the application does not supply it, the square -> root function must still compute square roots.) -> -> These requirements apply to the modified work as a whole. If -> identifiable sections of that work are not derived from the Library, -> and can be reasonably considered independent and separate works in -> themselves, then this License, and its terms, do not apply to those -> sections when you distribute them as separate works. But when you -> distribute the same sections as part of a whole which is a work based -> on the Library, the distribution of the whole must be on the terms of -> this License, whose permissions for other licensees extend to the -> entire whole, and thus to each and every part regardless of who wrote -> it. -> -> Thus, it is not the intent of this section to claim rights or contest -> your rights to work written entirely by you; rather, the intent is to -> exercise the right to control the distribution of derivative or -> collective works based on the Library. -> -> In addition, mere aggregation of another work not based on the Library -> with the Library (or with a work based on the Library) on a volume of -> a storage or distribution medium does not bring the other work under -> the scope of this License. -> -> 3. You may opt to apply the terms of the ordinary GNU General Public -> License instead of this License to a given copy of the Library. To do -> this, you must alter all the notices that refer to this License, so -> that they refer to the ordinary GNU General Public License, version 2, -> instead of to this License. (If a newer version than version 2 of the -> ordinary GNU General Public License has appeared, then you can specify -> that version instead if you wish.) Do not make any other change in -> these notices. -> -> Once this change is made in a given copy, it is irreversible for -> that copy, so the ordinary GNU General Public License applies to all -> subsequent copies and derivative works made from that copy. -> -> This option is useful when you wish to copy part of the code of -> the Library into a program that is not a library. -> -> 4. You may copy and distribute the Library (or a portion or -> derivative of it, under Section 2) in object code or executable form -> under the terms of Sections 1 and 2 above provided that you accompany -> it with the complete corresponding machine-readable source code, which -> must be distributed under the terms of Sections 1 and 2 above on a -> medium customarily used for software interchange. -> -> If distribution of object code is made by offering access to copy -> from a designated place, then offering equivalent access to copy the -> source code from the same place satisfies the requirement to -> distribute the source code, even though third parties are not -> compelled to copy the source along with the object code. -> -> 5. A program that contains no derivative of any portion of the -> Library, but is designed to work with the Library by being compiled or -> linked with it, is called a "work that uses the Library". Such a -> work, in isolation, is not a derivative work of the Library, and -> therefore falls outside the scope of this License. -> -> However, linking a "work that uses the Library" with the Library -> creates an executable that is a derivative of the Library (because it -> contains portions of the Library), rather than a "work that uses the -> library". The executable is therefore covered by this License. -> Section 6 states terms for distribution of such executables. -> -> When a "work that uses the Library" uses material from a header file -> that is part of the Library, the object code for the work may be a -> derivative work of the Library even though the source code is not. -> Whether this is true is especially significant if the work can be -> linked without the Library, or if the work is itself a library. The -> threshold for this to be true is not precisely defined by law. -> -> If such an object file uses only numerical parameters, data -> structure layouts and accessors, and small macros and small inline -> functions (ten lines or less in length), then the use of the object -> file is unrestricted, regardless of whether it is legally a derivative -> work. (Executables containing this object code plus portions of the -> Library will still fall under Section 6.) -> -> Otherwise, if the work is a derivative of the Library, you may -> distribute the object code for the work under the terms of Section 6. -> Any executables containing that work also fall under Section 6, -> whether or not they are linked directly with the Library itself. -> -> 6. As an exception to the Sections above, you may also combine or -> link a "work that uses the Library" with the Library to produce a -> work containing portions of the Library, and distribute that work -> under terms of your choice, provided that the terms permit -> modification of the work for the customer's own use and reverse -> engineering for debugging such modifications. -> -> You must give prominent notice with each copy of the work that the -> Library is used in it and that the Library and its use are covered by -> this License. You must supply a copy of this License. If the work -> during execution displays copyright notices, you must include the -> copyright notice for the Library among them, as well as a reference -> directing the user to the copy of this License. Also, you must do one -> of these things: -> -> a) Accompany the work with the complete corresponding -> machine-readable source code for the Library including whatever -> changes were used in the work (which must be distributed under -> Sections 1 and 2 above); and, if the work is an executable linked -> with the Library, with the complete machine-readable "work that -> uses the Library", as object code and/or source code, so that the -> user can modify the Library and then relink to produce a modified -> executable containing the modified Library. (It is understood -> that the user who changes the contents of definitions files in the -> Library will not necessarily be able to recompile the application -> to use the modified definitions.) -> -> b) Use a suitable shared library mechanism for linking with the -> Library. A suitable mechanism is one that (1) uses at run time a -> copy of the library already present on the user's computer system, -> rather than copying library functions into the executable, and (2) -> will operate properly with a modified version of the library, if -> the user installs one, as long as the modified version is -> interface-compatible with the version that the work was made with. -> -> c) Accompany the work with a written offer, valid for at -> least three years, to give the same user the materials -> specified in Subsection 6a, above, for a charge no more -> than the cost of performing this distribution. -> -> d) If distribution of the work is made by offering access to copy -> from a designated place, offer equivalent access to copy the above -> specified materials from the same place. -> -> e) Verify that the user has already received a copy of these -> materials or that you have already sent this user a copy. -> -> For an executable, the required form of the "work that uses the -> Library" must include any data and utility programs needed for -> reproducing the executable from it. However, as a special exception, -> the materials to be distributed need not include anything that is -> normally distributed (in either source or binary form) with the major -> components (compiler, kernel, and so on) of the operating system on -> which the executable runs, unless that component itself accompanies -> the executable. -> -> It may happen that this requirement contradicts the license -> restrictions of other proprietary libraries that do not normally -> accompany the operating system. Such a contradiction means you cannot -> use both them and the Library together in an executable that you -> distribute. -> -> 7. You may place library facilities that are a work based on the -> Library side-by-side in a single library together with other library -> facilities not covered by this License, and distribute such a combined -> library, provided that the separate distribution of the work based on -> the Library and of the other library facilities is otherwise -> permitted, and provided that you do these two things: -> -> a) Accompany the combined library with a copy of the same work -> based on the Library, uncombined with any other library -> facilities. This must be distributed under the terms of the -> Sections above. -> -> b) Give prominent notice with the combined library of the fact -> that part of it is a work based on the Library, and explaining -> where to find the accompanying uncombined form of the same work. -> -> 8. You may not copy, modify, sublicense, link with, or distribute -> the Library except as expressly provided under this License. Any -> attempt otherwise to copy, modify, sublicense, link with, or -> distribute the Library is void, and will automatically terminate your -> rights under this License. However, parties who have received copies, -> or rights, from you under this License will not have their licenses -> terminated so long as such parties remain in full compliance. -> -> 9. You are not required to accept this License, since you have not -> signed it. However, nothing else grants you permission to modify or -> distribute the Library or its derivative works. These actions are -> prohibited by law if you do not accept this License. Therefore, by -> modifying or distributing the Library (or any work based on the -> Library), you indicate your acceptance of this License to do so, and -> all its terms and conditions for copying, distributing or modifying -> the Library or works based on it. -> -> 10. Each time you redistribute the Library (or any work based on the -> Library), the recipient automatically receives a license from the -> original licensor to copy, distribute, link with or modify the Library -> subject to these terms and conditions. You may not impose any further -> restrictions on the recipients' exercise of the rights granted herein. -> You are not responsible for enforcing compliance by third parties with -> this License. -> -> 11. If, as a consequence of a court judgment or allegation of patent -> infringement or for any other reason (not limited to patent issues), -> conditions are imposed on you (whether by court order, agreement or -> otherwise) that contradict the conditions of this License, they do not -> excuse you from the conditions of this License. If you cannot -> distribute so as to satisfy simultaneously your obligations under this -> License and any other pertinent obligations, then as a consequence you -> may not distribute the Library at all. For example, if a patent -> license would not permit royalty-free redistribution of the Library by -> all those who receive copies directly or indirectly through you, then -> the only way you could satisfy both it and this License would be to -> refrain entirely from distribution of the Library. -> -> If any portion of this section is held invalid or unenforceable under any -> particular circumstance, the balance of the section is intended to apply, -> and the section as a whole is intended to apply in other circumstances. -> -> It is not the purpose of this section to induce you to infringe any -> patents or other property right claims or to contest validity of any -> such claims; this section has the sole purpose of protecting the -> integrity of the free software distribution system which is -> implemented by public license practices. Many people have made -> generous contributions to the wide range of software distributed -> through that system in reliance on consistent application of that -> system; it is up to the author/donor to decide if he or she is willing -> to distribute software through any other system and a licensee cannot -> impose that choice. -> -> This section is intended to make thoroughly clear what is believed to -> be a consequence of the rest of this License. -> -> 12. If the distribution and/or use of the Library is restricted in -> certain countries either by patents or by copyrighted interfaces, the -> original copyright holder who places the Library under this License may add -> an explicit geographical distribution limitation excluding those countries, -> so that distribution is permitted only in or among countries not thus -> excluded. In such case, this License incorporates the limitation as if -> written in the body of this License. -> -> 13. The Free Software Foundation may publish revised and/or new -> versions of the Lesser General Public License from time to time. -> Such new versions will be similar in spirit to the present version, -> but may differ in detail to address new problems or concerns. -> -> Each version is given a distinguishing version number. If the Library -> specifies a version number of this License which applies to it and -> "any later version", you have the option of following the terms and -> conditions either of that version or of any later version published by -> the Free Software Foundation. If the Library does not specify a -> license version number, you may choose any version ever published by -> the Free Software Foundation. -> -> 14. If you wish to incorporate parts of the Library into other free -> programs whose distribution conditions are incompatible with these, -> write to the author to ask for permission. For software which is -> copyrighted by the Free Software Foundation, write to the Free -> Software Foundation; we sometimes make exceptions for this. Our -> decision will be guided by the two goals of preserving the free status -> of all derivatives of our free software and of promoting the sharing -> and reuse of software generally. -> -> NO WARRANTY -> -> 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -> WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -> EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -> OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -> KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -> PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -> LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -> THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -> -> 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -> WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -> AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -> FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -> CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -> LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -> RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -> FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -> SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -> DAMAGES. -> -> END OF TERMS AND CONDITIONS -> -> How to Apply These Terms to Your New Libraries -> -> If you develop a new library, and you want it to be of the greatest -> possible use to the public, we recommend making it free software that -> everyone can redistribute and change. You can do so by permitting -> redistribution under these terms (or, alternatively, under the terms of the -> ordinary General Public License). -> -> To apply these terms, attach the following notices to the library. It is -> safest to attach them to the start of each source file to most effectively -> convey the exclusion of warranty; and each file should have at least the -> "copyright" line and a pointer to where the full notice is found. -> -> -> Copyright (C) -> -> This library is free software; you can redistribute it and/or -> modify it under the terms of the GNU Lesser General Public -> License as published by the Free Software Foundation; either -> version 2.1 of the License, or (at your option) any later version. -> -> This library is distributed in the hope that it will be useful, -> but WITHOUT ANY WARRANTY; without even the implied warranty of -> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -> Lesser General Public License for more details. -> -> You should have received a copy of the GNU Lesser General Public -> License along with this library; if not, write to the Free Software -> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -> -> Also add information on how to contact you by electronic and paper mail. -> -> You should also get your employer (if you work as a programmer) or your -> school, if any, to sign a "copyright disclaimer" for the library, if -> necessary. Here is a sample; alter the names: -> -> Yoyodyne, Inc., hereby disclaims all copyright interest in the -> library `Frob' (a library for tweaking knobs) written by James Random Hacker. -> -> , 1 April 1990 -> Ty Coon, President of Vice +GNU LESSER GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. +0. Additional Definitions. + +As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. + +“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. + +The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. +1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. +2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. + +3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. + b) Accompany the object code with a copy of the GNU GPL and this license document. + +4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. + d) Do one of the following: + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) + +5. Combined Libraries. + +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. + diff --git a/Java/SatelliteTracker/lib/commons-logging-1.2.jar b/Java/SatelliteTracker/lib/commons-logging-1.2.jar new file mode 100644 index 0000000..93a3b9f Binary files /dev/null and b/Java/SatelliteTracker/lib/commons-logging-1.2.jar differ diff --git a/Java/SatelliteTracker/lib/jxmapviewer2-2.6.jar b/Java/SatelliteTracker/lib/jxmapviewer2-2.6.jar new file mode 100644 index 0000000..9a1ef47 Binary files /dev/null and b/Java/SatelliteTracker/lib/jxmapviewer2-2.6.jar differ diff --git a/Java/SatelliteTracker/lib/src/commons-logging-1.2-sources.jar b/Java/SatelliteTracker/lib/src/commons-logging-1.2-sources.jar new file mode 100644 index 0000000..10655e5 Binary files /dev/null and b/Java/SatelliteTracker/lib/src/commons-logging-1.2-sources.jar differ diff --git a/Java/SatelliteTracker/lib/src/jxmapviewer2-2.6-sources.jar b/Java/SatelliteTracker/lib/src/jxmapviewer2-2.6-sources.jar new file mode 100644 index 0000000..9b76f5d Binary files /dev/null and b/Java/SatelliteTracker/lib/src/jxmapviewer2-2.6-sources.jar differ diff --git a/Java/SatelliteTracker/lib/src/swingx-1.6-src.zip b/Java/SatelliteTracker/lib/src/swingx-1.6-src.zip deleted file mode 100644 index eb15da8..0000000 Binary files a/Java/SatelliteTracker/lib/src/swingx-1.6-src.zip and /dev/null differ diff --git a/Java/SatelliteTracker/lib/src/swingx-ws-1.0-src.zip b/Java/SatelliteTracker/lib/src/swingx-ws-1.0-src.zip deleted file mode 100644 index d00badc..0000000 Binary files a/Java/SatelliteTracker/lib/src/swingx-ws-1.0-src.zip and /dev/null differ diff --git a/Java/SatelliteTracker/lib/swingx-1.6.jar b/Java/SatelliteTracker/lib/swingx-1.6.jar deleted file mode 100644 index 06c15a6..0000000 Binary files a/Java/SatelliteTracker/lib/swingx-1.6.jar and /dev/null differ diff --git a/Java/SatelliteTracker/lib/swingx-ws-1.0.jar b/Java/SatelliteTracker/lib/swingx-ws-1.0.jar deleted file mode 100644 index 22eb983..0000000 Binary files a/Java/SatelliteTracker/lib/swingx-ws-1.0.jar and /dev/null differ diff --git a/Java/SatelliteTracker/src/GeocodeResponse.xsd b/Java/SatelliteTracker/src/GeocodeResponse.xsd deleted file mode 100644 index 6b6defe..0000000 --- a/Java/SatelliteTracker/src/GeocodeResponse.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Java/SatelliteTracker/src/com/agi/satellitetracker/Computation.java b/Java/SatelliteTracker/src/com/agi/satellitetracker/Computation.java index 405ee7e..efaf2d7 100644 --- a/Java/SatelliteTracker/src/com/agi/satellitetracker/Computation.java +++ b/Java/SatelliteTracker/src/com/agi/satellitetracker/Computation.java @@ -47,9 +47,9 @@ public Computation(UserInput userInput) { createSatellite(userInput); createFacility(userInput); - AccessEvaluator accessEval = createAccessEvaluator(userInput); + AccessEvaluator accessEvaluator = createAccessEvaluator(userInput); - calculateAccess(accessEval); + calculateAccess(accessEvaluator); calculateApproachAndDeparture(); calculateGroundTrack(); } @@ -76,9 +76,8 @@ private void createSatellite(UserInput userInput) { private void createFacility(UserInput userInput) { EarthCentralBody earth = CentralBodiesFacet.getFromContext().getEarth(); - // Create a facility at the viewing location. The longitude and latitude - // of the facility's location are specified using radians, so convert - // degrees to radians. + // Create a facility at the viewing location. The longitude and latitude of the + // facility's location are specified using radians, so convert degrees to radians. double longitude = Trig.degreesToRadians(userInput.getLongitude()); double latitude = Trig.degreesToRadians(userInput.getLatitude()); @@ -204,7 +203,7 @@ private void addGroundTracks(JulianDate start, JulianDate end, IEvaluator1 getGroundTracks() { /** * The duration of each ground track segment. */ - private static final Duration s_roundTrackTimeStep = Duration.fromSeconds(60.0); + private static final Duration s_groundTrackTimeStep = Duration.fromSeconds(60.0); private final JulianDate m_startDate; private final JulianDate m_endDate; private Platform m_satellite; diff --git a/Java/SatelliteTracker/src/com/agi/satellitetracker/GoogleGeocoder.java b/Java/SatelliteTracker/src/com/agi/satellitetracker/GoogleGeocoder.java deleted file mode 100644 index a757ea0..0000000 --- a/Java/SatelliteTracker/src/com/agi/satellitetracker/GoogleGeocoder.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.agi.satellitetracker; - -import java.net.URL; -import java.net.URLEncoder; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathFactory; - -import org.w3c.dom.Document; - -/** - * An extremely basic geocoding client for the Google Maps Geocoding API. - * In a real application, use Google's Java client library, which is much more robust. - */ -public final class GoogleGeocoder { - private GoogleGeocoder() {} - - public static GeocoderResult geocode(String address) { - try { - StringBuilder builder = new StringBuilder("https://maps.google.com/maps/api/geocode/xml?address="); - builder.append(URLEncoder.encode(address, "UTF-8")); - builder.append("&key=AIzaSyBBmvXIjzF59K6Yay-8WFxQoAFivIN_hBo"); - - URL url = new URL(builder.toString()); - - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(url.openStream()); - - XPath xpath = XPathFactory.newInstance().newXPath(); - String longitudeString = xpath.evaluate("/GeocodeResponse/result/geometry/location/lng", document); - String latitudeString = xpath.evaluate("/GeocodeResponse/result/geometry/location/lat", document); - - double longitudeDegrees = Double.parseDouble(longitudeString); - double latitudeDegrees = Double.parseDouble(latitudeString); - - return new GeocoderResult(longitudeDegrees, latitudeDegrees); - } catch (Exception e) { - // rethrow and let the application-level UncaughtExceptionHandler show - // the message in a dialog box - throw new RuntimeException(e); - } - } - - public static final class GeocoderResult { - public GeocoderResult(double longitudeDegrees, double latitudeDegrees) { - this.longitudeDegrees = longitudeDegrees; - this.latitudeDegrees = latitudeDegrees; - } - - public final double longitudeDegrees; - public final double latitudeDegrees; - } -} diff --git a/Java/SatelliteTracker/src/com/agi/satellitetracker/ResultsWindow.java b/Java/SatelliteTracker/src/com/agi/satellitetracker/ResultsWindow.java index cbb7564..5167a8e 100644 --- a/Java/SatelliteTracker/src/com/agi/satellitetracker/ResultsWindow.java +++ b/Java/SatelliteTracker/src/com/agi/satellitetracker/ResultsWindow.java @@ -1,16 +1,18 @@ package com.agi.satellitetracker; +import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Rectangle; +import java.awt.Stroke; import java.awt.geom.Path2D; import java.awt.geom.Point2D; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Set; @@ -19,16 +21,14 @@ import javax.swing.JTable; import javax.swing.table.AbstractTableModel; -import org.jdesktop.swingx.JXMapKit; -import org.jdesktop.swingx.JXMapViewer; -import org.jdesktop.swingx.mapviewer.DefaultTileFactory; -import org.jdesktop.swingx.mapviewer.GeoPosition; -import org.jdesktop.swingx.mapviewer.TileFactory; -import org.jdesktop.swingx.mapviewer.TileFactoryInfo; -import org.jdesktop.swingx.mapviewer.Waypoint; -import org.jdesktop.swingx.mapviewer.WaypointPainter; -import org.jdesktop.swingx.painter.CompoundPainter; -import org.jdesktop.swingx.painter.Painter; +import org.jxmapviewer.JXMapKit; +import org.jxmapviewer.JXMapViewer; +import org.jxmapviewer.painter.CompoundPainter; +import org.jxmapviewer.painter.Painter; +import org.jxmapviewer.viewer.DefaultWaypoint; +import org.jxmapviewer.viewer.GeoPosition; +import org.jxmapviewer.viewer.Waypoint; +import org.jxmapviewer.viewer.WaypointPainter; import agi.foundation.Trig; import agi.foundation.coordinates.AzimuthElevationRange; @@ -57,18 +57,17 @@ public ResultsWindow(UserInput userInput, Computation computation) { JXMapKit jxMapKit = new JXMapKit(); jxMapKit.setMiniMapVisible(false); - // use the shared tile factory - jxMapKit.setTileFactory(s_tileFactory); - jxMapKit.setZoom(15); - jxMapKit.setAddressLocation(new GeoPosition(userInput.getLatitude(), userInput.getLongitude())); + + GeoPosition geoPosition = new GeoPosition(userInput.getLatitude(), userInput.getLongitude()); + jxMapKit.setAddressLocation(geoPosition); // create a waypoint marker for the facility position Set waypoints = new HashSet<>(); - waypoints.add(new Waypoint(userInput.getLatitude(), userInput.getLongitude())); + waypoints.add(new DefaultWaypoint(geoPosition)); // construct a waypoint painter that will draw the facility waypoint - WaypointPainter wayPointPainter = new WaypointPainter<>(); + WaypointPainter wayPointPainter = new WaypointPainter<>(); wayPointPainter.setWaypoints(waypoints); // construct our custom map painter class @@ -76,8 +75,9 @@ public ResultsWindow(UserInput userInput, Computation computation) { // construct a compound painter that will use both painters, and use it // as the painter for the map - CompoundPainter painter = new CompoundPainter<>(wayPointPainter, groundTrackPainter); + CompoundPainter painter = new CompoundPainter<>(Arrays.asList(wayPointPainter, groundTrackPainter)); painter.setCacheable(false); + jxMapKit.getMainMap().setOverlayPainter(painter); contentPane.add(jxMapKit, BorderLayout.CENTER); @@ -117,21 +117,18 @@ public void paint(Graphics2D g, JXMapViewer map, int w, int h) { List accessPaths = new ArrayList<>(); List noAccessPaths = new ArrayList<>(); - Iterator groundTrackIterator = m_groundTracks.iterator(); - Path2D.Double path = new Path2D.Double(); - GroundTrackPosition first = groundTrackIterator.next(); + GroundTrackPosition first = m_groundTracks.get(0); addMoveTo(map, path, first.getPosition()); GroundTrackPosition previousPosition = first; boolean previousPositionAccess = first.hasAccess(); - while (groundTrackIterator.hasNext()) { - GroundTrackPosition position = groundTrackIterator.next(); + for (int i = 1; i < m_groundTracks.size(); ++i) { + GroundTrackPosition position = m_groundTracks.get(i); if (previousPositionAccess != position.hasAccess()) { - // if we are switching from access to no access (or vice - // versa) then put the path we build into the appropriate - // list and start a new path + // if we are switching from access to no access (or vice-versa) + // then put the path we build into the appropriate list and start a new path if (previousPositionAccess) accessPaths.add(path); else @@ -143,11 +140,9 @@ public void paint(Graphics2D g, JXMapViewer map, int w, int h) { if (Math.abs(previousPosition.getLongitude() - position.getLongitude()) > Math.PI) { // handle case where ground track crosses the international - // date line and longitude wraps from -180 deg to 180 deg - // (or vice-versa). + // date line and longitude wraps from -180 deg to 180 deg (or vice-versa). - // Use simple linear interpolation to find the position on - // the date line. + // Use simple linear interpolation to find the position on the date line. GroundTrackPosition interpolated = findPointOnEdge(previousPosition, position); // draw line to interpolated position @@ -195,6 +190,10 @@ public void paint(Graphics2D g, JXMapViewer map, int w, int h) { // ...one translated to the copy of the map to the right of the on-screen edge g2.translate(viewportBounds.getX() - vpx + mapSizeInPixels.getWidth(), 0); + Stroke stroke = new BasicStroke(3.0f); + g1.setStroke(stroke); + g2.setStroke(stroke); + // draw no access paths in red g1.setColor(Color.RED); g2.setColor(Color.RED); @@ -345,26 +344,5 @@ public void setColumnWidths(JTable table) { private final List m_departureAers; } - static { - final int max = 17; - // These parameters copied from JXMapKit.setDefaultProvider when passed - // DefaultProviders.OpenStreetMaps - s_tileFactory = new DefaultTileFactory( - new TileFactoryInfo(1, max - 2, max, 256, true, true, "http://tile.openstreetmap.org", "x", "y", "z") { - @Override - public String getTileUrl(int x, int y, int zoom) { - zoom = max - zoom; - return baseURL + "/" + zoom + "/" + x + "/" + y + ".png"; - } - }); - } - private static final long serialVersionUID = 1L; - - /** - * create a single TileFactory shared between all result windows, because - * otherwise, JXMapKit creates a new one every time and there's currently no - * way to dispose it properly. - */ - private static final TileFactory s_tileFactory; } diff --git a/Java/SatelliteTracker/src/com/agi/satellitetracker/SatelliteTracker.java b/Java/SatelliteTracker/src/com/agi/satellitetracker/SatelliteTracker.java index f249afa..3223142 100644 --- a/Java/SatelliteTracker/src/com/agi/satellitetracker/SatelliteTracker.java +++ b/Java/SatelliteTracker/src/com/agi/satellitetracker/SatelliteTracker.java @@ -5,7 +5,6 @@ import java.io.File; import javax.swing.BorderFactory; -import javax.swing.ButtonGroup; import javax.swing.DefaultComboBoxModel; import javax.swing.GroupLayout; import javax.swing.GroupLayout.Alignment; @@ -16,14 +15,11 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; -import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.event.DocumentEvent; -import com.agi.satellitetracker.GoogleGeocoder.GeocoderResult; - import agi.foundation.stk.StkSatelliteDatabase; import agi.foundation.time.GregorianDate; @@ -50,10 +46,6 @@ public SatelliteTracker() { m_calculateButton = new JButton("Calculate"); m_calculateButton.addActionListener(e -> { - if (m_addressButton.isSelected()) { - m_lookupButton.doClick(); - } - Computation computation = new Computation(m_userInput); ResultsWindow resultsWindow = new ResultsWindow(m_userInput, computation); resultsWindow.setVisible(true); @@ -101,17 +93,6 @@ private JPanel createLocationPanel() { JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createTitledBorder(LOCATION_BORDER_LABEL)); - m_addressButton = new JRadioButton(ADDRESS_BUTTON_LABEL, m_userInput.getUseAddress()); - m_addressButton.addActionListener(e -> m_userInput.setUseAddress(true)); - - m_latitudeLongitudeButton = new JRadioButton(LAT_LONG_BUTTON_LABEL, !m_userInput.getUseAddress()); - m_latitudeLongitudeButton.addActionListener(e -> m_userInput.setUseAddress(false)); - - ButtonGroup locationGroup = new ButtonGroup(); - locationGroup.add(m_addressButton); - locationGroup.add(m_latitudeLongitudeButton); - - JPanel addressPanel = createAddressPanel(); JPanel latitudeLongitudePanel = createLatitudeLongitudePanel(); JPanel elevationPanel = createElevationPanel(); @@ -121,19 +102,14 @@ private JPanel createLocationPanel() { layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); - JLabel locationLabel1 = new JLabel(LOCATION_LABEL_1); - JLabel locationLabel2 = new JLabel(LOCATION_LABEL_2); + JLabel locationLabel = new JLabel(LOCATION_LABEL); JLabel elevationLabel1 = new JLabel(ELEVATION_LABEL_1); JLabel elevationLabel2 = new JLabel(ELEVATION_LABEL_2); { // Horizontal group Group group = layout.createParallelGroup(); - group.addComponent(locationLabel1); - group.addComponent(locationLabel2); - group.addComponent(m_addressButton); - group.addComponent(addressPanel); - group.addComponent(m_latitudeLongitudeButton); + group.addComponent(locationLabel); group.addComponent(latitudeLongitudePanel); group.addComponent(elevationLabel1); group.addComponent(elevationLabel2); @@ -144,11 +120,7 @@ private JPanel createLocationPanel() { { // Vertical group Group group = layout.createSequentialGroup(); - group.addComponent(locationLabel1); - group.addComponent(locationLabel2); - group.addComponent(m_addressButton); - group.addComponent(addressPanel); - group.addComponent(m_latitudeLongitudeButton); + group.addComponent(locationLabel); group.addComponent(latitudeLongitudePanel); group.addComponent(elevationLabel1); group.addComponent(elevationLabel2); @@ -159,57 +131,6 @@ private JPanel createLocationPanel() { return panel; } - private JPanel createAddressPanel() { - JPanel panel = new JPanel(); - - m_locationField = new JTextField(m_userInput.getAddress(), 40); - m_locationField.getDocument().addDocumentListener(new DocumentListenerAdapter() { - @Override - protected void documentChanged(DocumentEvent e) { - m_userInput.setAddress(m_locationField.getText()); - } - }); - - m_lookupButton = new JButton("Lookup"); - m_lookupButton.addActionListener(e -> { - // use the Google geocoding web service to get longitude and - // latitude for the current address. - GeocoderResult result = GoogleGeocoder.geocode(m_userInput.getAddress()); - m_longitudeField.setText(String.valueOf(result.longitudeDegrees)); - m_latitudeField.setText(String.valueOf(result.latitudeDegrees)); - m_latitudeLongitudeButton.setSelected(true); - }); - - GroupLayout layout = new GroupLayout(panel); - panel.setLayout(layout); - - layout.setAutoCreateGaps(true); - layout.setAutoCreateContainerGaps(true); - - JLabel locationLabel = makeBold(new JLabel(LOCATION_LABEL)); - locationLabel.setLabelFor(m_locationField); - - { - // Horizontal group - Group group = layout.createSequentialGroup(); - group.addComponent(locationLabel); - group.addComponent(m_locationField); - group.addComponent(m_lookupButton); - layout.setHorizontalGroup(group); - } - - { - // Vertical group - Group group = layout.createParallelGroup(Alignment.BASELINE); - group.addComponent(locationLabel); - group.addComponent(m_locationField); - group.addComponent(m_lookupButton); - layout.setVerticalGroup(group); - } - - return panel; - } - private JPanel createLatitudeLongitudePanel() { JPanel panel = new JPanel(); @@ -530,13 +451,8 @@ public static T makeBold(T c) { private static final long serialVersionUID = 1L; private static final String LOCATION_BORDER_LABEL = "Select a viewing location"; - private static final String LOCATION_LABEL_1 = "Where are you?"; - private static final String LOCATION_LABEL_2 = "Enter an address, city, state, and zip code, or latitude and longitude."; - - private static final String ADDRESS_BUTTON_LABEL = "Specify Address, and either City/State or Zip Code"; - private static final String LAT_LONG_BUTTON_LABEL = "Specify Latitude and Longitude"; + private static final String LOCATION_LABEL = "Where are you? Enter latitude and longitude."; - private static final String LOCATION_LABEL = "Location:"; private static final String LATITUDE_LABEL = "Latitude (deg):"; private static final String LONGITUDE_LABEL = "Longitude (deg):"; @@ -560,9 +476,6 @@ public static T makeBold(T c) { private final UserInput m_userInput; private final Database m_database; - private JRadioButton m_addressButton; - private JRadioButton m_latitudeLongitudeButton; - private JTextField m_locationField; private JTextField m_longitudeField; private JTextField m_latitudeField; private JTextField m_elevationField; @@ -572,5 +485,4 @@ public static T makeBold(T c) { private JTextField m_startDateField; private JTextField m_endDateField; private final JButton m_calculateButton; - private JButton m_lookupButton; } diff --git a/Java/SatelliteTracker/src/com/agi/satellitetracker/UserInput.java b/Java/SatelliteTracker/src/com/agi/satellitetracker/UserInput.java index 170d1d8..7612194 100644 --- a/Java/SatelliteTracker/src/com/agi/satellitetracker/UserInput.java +++ b/Java/SatelliteTracker/src/com/agi/satellitetracker/UserInput.java @@ -11,14 +11,6 @@ public UserInput(GregorianDate startDate) { m_endDate = new GregorianDate(startDate.toDateTime().plusDays(1)); } - public String getAddress() { - return m_address; - } - - public void setAddress(String address) { - m_address = address; - } - public double getLatitude() { return m_latitude; } @@ -83,23 +75,12 @@ public void setTle(String tle) { m_tle = tle; } - public boolean getUseAddress() { - return m_useAddress; - } - - public void setUseAddress(boolean useAddress) { - m_useAddress = useAddress; - } - - private static final String DEFAULT_ADDRESS = "220 Valley Creek Blvd, Exton, PA"; private static final double DEFAULT_LATITUDE = 40.0385776; private static final double DEFAULT_LONGITUDE = -75.5966244; private static final double DEFAULT_ELEVATION = 10.0; private static final String DEFAULT_SPACECRAFT_CATEGORY = "Human Crew"; private static final String DEFAULT_SPACECRAFT = "ISS"; - private boolean m_useAddress = false; - private String m_address = DEFAULT_ADDRESS; private double m_latitude = DEFAULT_LATITUDE; private double m_longitude = DEFAULT_LONGITUDE; private double m_elevation = DEFAULT_ELEVATION; diff --git a/README.md b/README.md index 3727abc..f9d2d28 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ STK Components provides powerful class libraries for either .NET or Java to help More information about STK Components is available from [AGI's website](https://www.agi.com). -The STK Components documentation (available for [.NET](http://help.agi.com/AGIComponents/html/Welcome.htm) and [Java](http://help.agi.com/AGIComponentsJava/html/Welcome.htm)) includes a Programmer's Guide as well as full API documentation for the complete set of capabilities provided by STK Components. +The STK Components documentation (available for [.NET](https://help.agi.com/AGIComponents/html/Welcome.htm) and [Java](https://help.agi.com/AGIComponentsJava/html/Welcome.htm)) includes a Programmer's Guide as well as full API documentation for the complete set of capabilities provided by STK Components. -Full system requirements for STK Components are listed in the documentation ([.NET](http://help.agi.com/AGIComponents/html/SystemRequirements.htm) / [Java](http://help.agi.com/AGIComponentsJava/html/SystemRequirements.htm)). +Full system requirements for STK Components are listed in the documentation ([.NET](https://help.agi.com/AGIComponents/html/SystemRequirements.htm) / [Java](https://help.agi.com/AGIComponentsJava/html/SystemRequirements.htm)). ## What are these example applications?