Skip to content

Commit ecac716

Browse files
committed
Add Java SatelliteTracker demo.
1 parent 5a3c821 commit ecac716

24 files changed

Lines changed: 2714 additions & 0 deletions

Java/SatelliteTracker/.classpath

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src" />
4+
<classpathentry including="LeapSecond.dat|SatelliteDatabase/stkSatDb*" kind="src" output="Data" path="commonData" />
5+
<classpathentry including="agi/examples/LeapSecondsFacetHelper.java|agi/examples/TwoLineElementSetHelper.java" kind="src" path="commonSrc" />
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
7+
<classpathentry kind="lib" path="lib/swingx-ws-1.0.jar" sourcepath="lib/src/swingx-ws-1.0-src.zip" />
8+
<classpathentry kind="lib" path="lib/swingx-1.6.jar" sourcepath="lib/src/swingx-1.6-src.zip" />
9+
<classpathentry kind="lib" path="jars/agi.foundation.core-2019r3.jar">
10+
<attributes>
11+
<attribute name="javadoc_location" value="jar:platform:/resource/SatelliteTracker/doc/agi.foundation.javadoc-2019r3.zip!/" />
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="lib" path="jars/agi.foundation.models-2019r3.jar">
15+
<attributes>
16+
<attribute name="javadoc_location" value="jar:platform:/resource/SatelliteTracker/doc/agi.foundation.javadoc-2019r3.zip!/" />
17+
</attributes>
18+
</classpathentry>
19+
<classpathentry kind="lib" path="jars/agi.foundation.platforms-2019r3.jar">
20+
<attributes>
21+
<attribute name="javadoc_location" value="jar:platform:/resource/SatelliteTracker/doc/agi.foundation.javadoc-2019r3.zip!/" />
22+
</attributes>
23+
</classpathentry>
24+
<classpathentry kind="output" path="bin" />
25+
</classpath>

Java/SatelliteTracker/.project

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>SatelliteTracker</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
<linkedResources>
18+
<link>
19+
<name>commonData</name>
20+
<type>2</type>
21+
<locationURI>$%7BPARENT-1-PROJECT_LOC%7D/Common/Data</locationURI>
22+
</link>
23+
<link>
24+
<name>commonSrc</name>
25+
<type>2</type>
26+
<locationURI>$%7BPARENT-1-PROJECT_LOC%7D/Common/src</locationURI>
27+
</link>
28+
<link>
29+
<name>doc</name>
30+
<type>2</type>
31+
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/Documentation</locationURI>
32+
</link>
33+
<link>
34+
<name>jars</name>
35+
<type>2</type>
36+
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/Jars</locationURI>
37+
</link>
38+
</linkedResources>
39+
<filteredResources>
40+
<filter>
41+
<id>1497896520584</id>
42+
<name></name>
43+
<type>10</type>
44+
<matcher>
45+
<id>org.eclipse.ui.ide.multiFilter</id>
46+
<arguments>1.0-name-matches-false-false-ant</arguments>
47+
</matcher>
48+
</filter>
49+
<filter>
50+
<id>1497896520587</id>
51+
<name></name>
52+
<type>10</type>
53+
<matcher>
54+
<id>org.eclipse.ui.ide.multiFilter</id>
55+
<arguments>1.0-name-matches-false-false-dist</arguments>
56+
</matcher>
57+
</filter>
58+
</filteredResources>
59+
</projectDescription>

Java/SatelliteTracker/.settings/org.eclipse.jdt.core.prefs

Lines changed: 326 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
cleanup.add_default_serial_version_id=true
2+
cleanup.add_generated_serial_version_id=false
3+
cleanup.add_missing_annotations=true
4+
cleanup.add_missing_deprecated_annotations=true
5+
cleanup.add_missing_methods=false
6+
cleanup.add_missing_nls_tags=false
7+
cleanup.add_missing_override_annotations=true
8+
cleanup.add_missing_override_annotations_interface_methods=true
9+
cleanup.add_serial_version_id=false
10+
cleanup.always_use_blocks=true
11+
cleanup.always_use_parentheses_in_expressions=false
12+
cleanup.always_use_this_for_non_static_field_access=false
13+
cleanup.always_use_this_for_non_static_method_access=false
14+
cleanup.convert_functional_interfaces=true
15+
cleanup.convert_to_enhanced_for_loop=true
16+
cleanup.correct_indentation=false
17+
cleanup.format_source_code=false
18+
cleanup.format_source_code_changes_only=false
19+
cleanup.insert_inferred_type_arguments=false
20+
cleanup.make_local_variable_final=false
21+
cleanup.make_parameters_final=false
22+
cleanup.make_private_fields_final=true
23+
cleanup.make_type_abstract_if_missing_method=false
24+
cleanup.make_variable_declarations_final=true
25+
cleanup.never_use_blocks=false
26+
cleanup.never_use_parentheses_in_expressions=true
27+
cleanup.organize_imports=true
28+
cleanup.qualify_static_field_accesses_with_declaring_class=false
29+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
30+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
31+
cleanup.qualify_static_member_accesses_with_declaring_class=true
32+
cleanup.qualify_static_method_accesses_with_declaring_class=false
33+
cleanup.remove_private_constructors=true
34+
cleanup.remove_redundant_type_arguments=true
35+
cleanup.remove_trailing_whitespaces=true
36+
cleanup.remove_trailing_whitespaces_all=true
37+
cleanup.remove_trailing_whitespaces_ignore_empty=false
38+
cleanup.remove_unnecessary_casts=true
39+
cleanup.remove_unnecessary_nls_tags=true
40+
cleanup.remove_unused_imports=true
41+
cleanup.remove_unused_local_variables=false
42+
cleanup.remove_unused_private_fields=true
43+
cleanup.remove_unused_private_members=false
44+
cleanup.remove_unused_private_methods=true
45+
cleanup.remove_unused_private_types=true
46+
cleanup.sort_members=false
47+
cleanup.sort_members_all=false
48+
cleanup.use_anonymous_class_creation=false
49+
cleanup.use_blocks=false
50+
cleanup.use_blocks_only_for_return_and_throw=false
51+
cleanup.use_lambda=true
52+
cleanup.use_parentheses_in_expressions=true
53+
cleanup.use_this_for_non_static_field_access=true
54+
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
55+
cleanup.use_this_for_non_static_method_access=true
56+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
57+
cleanup_profile=_demos
58+
cleanup_settings_version=2
59+
eclipse.preferences.version=1
60+
formatter_profile=_demo settings
61+
formatter_settings_version=14
32.9 KB
Loading
179 KB
Loading

Java/SatelliteTracker/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Satellite Tracker
2+
3+
This Swing application computes access between a user-selected satellite viewed from a user-defined location during a user-specified time period, and generates ground tracks on an interactive map component, as well as producing a table of viewing opportunities.
4+
5+
![Satellite Tracker](Images/ExampleSatelliteTrackerJava1.png)
6+
7+
![Satellite Tracker](Images/ExampleSatelliteTrackerJava2.png)
8+
9+
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.
10+
11+
## Compilation
12+
13+
To compile this sample application with Ant:
14+
* Copy your AGI.Foundation.lic file into the src directory.
15+
* Run "ant package".
16+
17+
The application will be compiled, packaged into a jar, and placed in the dist
18+
directory. You can then double-click the SatelliteTracker.jar file to run the
19+
application, or, simply run "ant run".
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
3+
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
4+
<listEntry value="/SatelliteTracker/src/com/agi/satellitetracker/Main.java"/>
5+
</listAttribute>
6+
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
7+
<listEntry value="1"/>
8+
</listAttribute>
9+
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
10+
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
11+
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
12+
</listAttribute>
13+
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.agi.satellitetracker.Main"/>
14+
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="SatelliteTracker"/>
15+
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+HeapDumpOnOutOfMemoryError"/>
16+
</launchConfiguration>

Java/SatelliteTracker/build.xml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<project name="SatelliteTracker" basedir="." default="package">
2+
<property name="jar.name" value="SatelliteTracker.jar" />
3+
4+
<property name="output.dir" value="ant" />
5+
<property name="bin.dir" value="${output.dir}/bin" />
6+
<property name="dist.dir" value="dist" />
7+
<property name="jars.dir" value="../../Jars" />
8+
9+
<target name="clean" description="Clean all generated output.">
10+
<delete dir="${output.dir}" />
11+
<delete dir="${dist.dir}" />
12+
</target>
13+
14+
<target name="prepare">
15+
<mkdir dir="${bin.dir}" />
16+
<mkdir dir="${dist.dir}" />
17+
<path id="project.classpath">
18+
<fileset dir="${jars.dir}">
19+
<include name="agi.foundation.core-*.jar" />
20+
<include name="agi.foundation.models-*.jar" />
21+
<include name="agi.foundation.platforms-*.jar" />
22+
</fileset>
23+
<fileset dir="lib" includes="*.jar" />
24+
</path>
25+
</target>
26+
27+
<target name="compile" depends="prepare" description="Compile source code.">
28+
<fail message="License not present. Copy your STK Components license file, AGI.Foundation.lic, into the src folder.">
29+
<condition>
30+
<not>
31+
<available file="src/AGI.Foundation.lic" />
32+
</not>
33+
</condition>
34+
</fail>
35+
36+
<javac source="1.8" target="1.8" destdir="${bin.dir}" classpathref="project.classpath" includeantruntime="no">
37+
<src path="src" />
38+
<src path="../Common/src/" />
39+
<include name="com/agi/satellitetracker/**" />
40+
<include name="yahoo/maps/**" />
41+
</javac>
42+
</target>
43+
44+
<target name="package" depends="compile" description="Package the application into a jar, and copy all needed resources to the dist directory.">
45+
<!-- Copy library jars to the dist directory -->
46+
<copy todir="${dist.dir}" flatten="true">
47+
<path refid="project.classpath" />
48+
</copy>
49+
50+
<!-- Build the jar file containing the application itself -->
51+
<copy todir="${bin.dir}">
52+
<fileset dir="src" excludes="**/*.java" />
53+
</copy>
54+
55+
<pathconvert property="manifest.classpath" pathsep=" ">
56+
<path refid="project.classpath" />
57+
<flattenmapper />
58+
</pathconvert>
59+
60+
<jar destfile="${dist.dir}/${jar.name}">
61+
<fileset dir="${bin.dir}" />
62+
<manifest>
63+
<attribute name="Class-Path" value="${manifest.classpath}" />
64+
<attribute name="Main-Class" value="com.agi.satellitetracker.Main" />
65+
</manifest>
66+
</jar>
67+
68+
<!-- Copy other resources to the dist directory -->
69+
<copy todir="${dist.dir}/Data">
70+
<fileset dir="../Common/Data">
71+
<include name="LeapSecond.dat" />
72+
<include name="SatelliteDatabase/stkSatDb*" />
73+
</fileset>
74+
</copy>
75+
</target>
76+
77+
<target name="run" depends="package" description="Build and run the demo application.">
78+
<java fork="true" spawn="true" jar="${dist.dir}/${jar.name}" dir="${dist.dir}" />
79+
</target>
80+
</project>

0 commit comments

Comments
 (0)