Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
Satellite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher Reis
Satellite
Commits
4160ff26
Commit
4160ff26
authored
Oct 29, 2015
by
Christopher Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed SatelliteDB to static
parent
2d236a4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
SatelliteDB.java
src/satellite/SatelliteDB.java
+19
-19
No files found.
src/satellite/SatelliteDB.java
View file @
4160ff26
...
@@ -35,10 +35,10 @@ import predict4java.*;
...
@@ -35,10 +35,10 @@ import predict4java.*;
public
class
SatelliteDB
{
public
class
SatelliteDB
{
ArrayList
<
SatelliteTrack
>
database
=
new
ArrayList
<
SatelliteTrack
>();
static
ArrayList
<
SatelliteTrack
>
database
=
new
ArrayList
<
SatelliteTrack
>();
boolean
databaseSet
=
false
;
static
boolean
databaseSet
=
false
;
String
name
=
"SatelliteDB"
;
static
String
name
=
"SatelliteDB"
;
GroundStationPosition
groundstation
;
static
GroundStationPosition
groundstation
;
final
static
GroundStationPosition
ALBUQUERQUE
=
new
GroundStationPosition
(
35.0873191
,
-
106.6376107
,
5500
,
"Albuquerque"
);
final
static
GroundStationPosition
ALBUQUERQUE
=
new
GroundStationPosition
(
35.0873191
,
-
106.6376107
,
5500
,
"Albuquerque"
);
final
static
GroundStationPosition
STORMLAKE
=
new
GroundStationPosition
(
42.6436
,
95.2019
,
1440
,
"Storm Lake"
);
final
static
GroundStationPosition
STORMLAKE
=
new
GroundStationPosition
(
42.6436
,
95.2019
,
1440
,
"Storm Lake"
);
...
@@ -46,7 +46,7 @@ public class SatelliteDB {
...
@@ -46,7 +46,7 @@ public class SatelliteDB {
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
boolean
downloadTLE
(
String
in_url
,
String
file
){
public
static
boolean
downloadTLE
(
String
in_url
,
String
file
){
URL
url
;
URL
url
;
...
@@ -98,7 +98,7 @@ public class SatelliteDB {
...
@@ -98,7 +98,7 @@ public class SatelliteDB {
}
}
}
}
public
void
TLEReader
(
String
file
){
public
static
void
TLEReader
(
String
file
){
//TODO
//TODO
FileReader
in
=
null
;
FileReader
in
=
null
;
...
@@ -133,41 +133,41 @@ public class SatelliteDB {
...
@@ -133,41 +133,41 @@ public class SatelliteDB {
}
}
public
void
setGroundstation
(
GroundStationPosition
gPos
){
public
static
void
setGroundstation
(
GroundStationPosition
gPos
){
groundstation
=
gPos
;
groundstation
=
gPos
;
}
}
public
void
getSatellites_GPS
(){
public
static
void
getSatellites_GPS
(){
downloadTLE
(
"https://celestrak.com/NORAD/elements/gps-ops.txt"
,
"
gps
"
);
downloadTLE
(
"https://celestrak.com/NORAD/elements/gps-ops.txt"
,
"
GPS
"
);
//TLEReader("gps.txt");
//TLEReader("gps.txt");
databaseSet
=
true
;
databaseSet
=
true
;
}
}
public
void
getSatellites_Stations
(){
public
static
void
getSatellites_Stations
(){
downloadTLE
(
"https://celestrak.com/NORAD/elements/stations.txt"
,
"
s
tations"
);
downloadTLE
(
"https://celestrak.com/NORAD/elements/stations.txt"
,
"
S
tations"
);
//TLEReader("stations.txt");
//TLEReader("stations.txt");
databaseSet
=
true
;
databaseSet
=
true
;
}
}
public
void
getSatellites_NOAA
(){
public
static
void
getSatellites_NOAA
(){
downloadTLE
(
"https://celestrak.com/NORAD/elements/noaa.txt"
,
"
noaa
"
);
downloadTLE
(
"https://celestrak.com/NORAD/elements/noaa.txt"
,
"
NOAA
"
);
//TLEReader("noaa.txt");
//TLEReader("noaa.txt");
databaseSet
=
true
;
databaseSet
=
true
;
}
}
public
void
getSatellites_Iridium
(){
public
static
void
getSatellites_Iridium
(){
downloadTLE
(
"https://celestrak.com/NORAD/elements/iridium.txt"
,
"Iridium"
);
downloadTLE
(
"https://celestrak.com/NORAD/elements/iridium.txt"
,
"Iridium"
);
//TLEReader("noaa.txt");
//TLEReader("noaa.txt");
databaseSet
=
true
;
databaseSet
=
true
;
}
}
public
void
getSatellites_GEO
(){
public
static
void
getSatellites_GEO
(){
downloadTLE
(
"https://celestrak.com/NORAD/elements/geo.txt"
,
"Geostationary"
);
downloadTLE
(
"https://celestrak.com/NORAD/elements/geo.txt"
,
"Geostationary"
);
//TLEReader("noaa.txt");
//TLEReader("noaa.txt");
databaseSet
=
true
;
databaseSet
=
true
;
}
}
public
int
getSatIndex
(
String
sat
){
public
static
int
getSatIndex
(
String
sat
){
for
(
int
i
=
0
;
i
<
database
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
database
.
size
();
i
++){
sat
=
sat
.
trim
();
sat
=
sat
.
trim
();
...
@@ -180,16 +180,16 @@ public class SatelliteDB {
...
@@ -180,16 +180,16 @@ public class SatelliteDB {
}
}
public
int
getSize
(){
public
static
int
getSize
(){
return
database
.
size
();
return
database
.
size
();
}
}
public
SatelliteTrack
sat
(
int
i
){
public
static
SatelliteTrack
sat
(
int
i
){
SatelliteTrack
satTrack
=
database
.
get
(
i
);
SatelliteTrack
satTrack
=
database
.
get
(
i
);
return
satTrack
;
return
satTrack
;
}
}
public
boolean
satExist
(
String
string
){
public
static
boolean
satExist
(
String
string
){
int
selectedSatellite
=
getSatIndex
(
string
);
int
selectedSatellite
=
getSatIndex
(
string
);
if
(
selectedSatellite
>=
0
){
if
(
selectedSatellite
>=
0
){
//System.out.println(this.getSat(selectedSatellite).getTLE().getName() + " Exists!");
//System.out.println(this.getSat(selectedSatellite).getTLE().getName() + " Exists!");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment