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
32f98c7a
Commit
32f98c7a
authored
Nov 16, 2015
by
Christopher Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated PointPlacemark in view 3D
parent
cee370ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
18 deletions
+32
-18
Application.java
src/GUI/Application.java
+2
-1
satelliteTree.java
src/GUI/satelliteTree.java
+1
-1
view3D.java
src/GUI/view3D.java
+29
-16
No files found.
src/GUI/Application.java
View file @
32f98c7a
...
...
@@ -58,6 +58,7 @@ public class Application {
static
ActionListener
addtrack
=
new
ActionListener
()
{
public
void
actionPerformed
(
ActionEvent
evt
)
{
threeDview
.
addSatellite
(
TrackerList
.
getTracks
());
//System.out.println(TrackerList.getTracks().get(0).getLat());
}
};
...
...
@@ -73,7 +74,7 @@ public class Application {
Application
window
=
new
Application
();
window
.
frmSatelliteTracker
.
setVisible
(
true
);
//new javax.swing.Timer(500, updateTracks).start();
new
javax
.
swing
.
Timer
(
10
00
,
addtrack
).
start
();
new
javax
.
swing
.
Timer
(
1000
,
addtrack
).
start
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
src/GUI/satelliteTree.java
View file @
32f98c7a
...
...
@@ -94,7 +94,7 @@ public class satelliteTree extends JInternalFrame {
BufferedImage
img
=
null
;
try
{
img
=
ImageIO
.
read
(
new
File
(
"
D:\\My
Documents\\GitHub\\Satellite\\satellite.png"
));
img
=
ImageIO
.
read
(
new
File
(
"
C:\\Users\\Christopher\\
Documents\\GitHub\\Satellite\\satellite.png"
));
//D:\\MyDocuments\\GitHub\\Satellite\\satellite.png
//C:\\Users\\Christopher\\Documents\\GitHub\\Satellite\\satellite.png
}
catch
(
IOException
e
)
{
...
...
src/GUI/view3D.java
View file @
32f98c7a
...
...
@@ -82,7 +82,7 @@ public class view3D extends JInternalFrame{
}
}
public
void
addTrack
(
String
name
,
Double
lat
,
Double
lon
){
public
void
addTrack
(
String
name
,
Double
lat
,
Double
lon
,
Double
alt
){
Iterable
<
Renderable
>
iter
=
layer
.
getRenderables
();
...
...
@@ -91,27 +91,40 @@ public class view3D extends JInternalFrame{
if
(
rend
instanceof
PointPlacemark
){
PointPlacemark
delp
=
(
PointPlacemark
)
rend
;
if
(
delp
.
getLabelText
().
equals
(
name
)){
delp
.
setPosition
(
Position
.
fromDegrees
(
lat
,
lon
));
delp
.
setPosition
(
Position
.
fromDegrees
(
lat
,
lon
,
alt
*
1000
));
System
.
out
.
println
(
lat
+
" "
+
lon
+
" "
+
alt
*
1000
);
wwd
.
redraw
();
return
;
}
}
}
PointPlacemark
pp
=
new
PointPlacemark
(
Position
.
fromDegrees
(
lat
,
lon
,
1
e4
));
pp
.
setValue
(
AVKey
.
DISPLAY_NAME
,
"Clamp to ground, Audio icon, Heading -45, Globe relative"
);
PointPlacemark
pp
=
new
PointPlacemark
(
Position
.
fromDegrees
(
lat
,
lon
,
alt
*
1000
));
// pp.setValue(AVKey.DISPLAY_NAME, "Clamp to ground, Audio icon, Heading -45, Globe relative");
// pp.setLabelText(name);
// pp.setLineEnabled(false);
// pp.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND);
// PointPlacemarkAttributes attrs = new PointPlacemarkAttributes();
// attrs.setImageAddress("D:\\MyDocuments\\GitHub\\Satellite\\satellite.png");
// attrs.setHeading(-45d);
// attrs.setHeadingReference(AVKey.RELATIVE_TO_GLOBE);
// attrs.setScale(0.05);
// attrs.setImageOffset(new Offset(0.5, 0.5, AVKey.FRACTION, AVKey.FRACTION));
// attrs.setImageOffset(new Offset(19d, 8d, AVKey.PIXELS, AVKey.PIXELS));
// attrs.setLabelColor("ffffffff");
// attrs.setLabelOffset(new Offset(0.9d, 0.6d, AVKey.FRACTION, AVKey.FRACTION));
// pp.setAttributes(attrs);
// layer.addRenderable(pp);
pp
.
setLabelText
(
name
);
pp
.
setValue
(
AVKey
.
DISPLAY_NAME
,
"Label, Semi-transparent, Audio icon"
);
pp
.
setLineEnabled
(
false
);
pp
.
setAltitudeMode
(
WorldWind
.
CLAMP_TO_GROUND
);
PointPlacemarkAttributes
attrs
=
new
PointPlacemarkAttributes
();
attrs
.
setImageAddress
(
"D:\\MyDocuments\\GitHub\\Satellite\\satellite.png"
);
attrs
.
setHeading
(-
45
d
);
attrs
.
setHeadingReference
(
AVKey
.
RELATIVE_TO_GLOBE
);
attrs
.
setScale
(
0.05
);
// attrs.setImageOffset(new Offset(0.5, 0.5, AVKey.FRACTION, AVKey.FRACTION));
attrs
.
setImageOffset
(
new
Offset
(
19
d
,
8
d
,
AVKey
.
PIXELS
,
AVKey
.
PIXELS
));
attrs
.
setLabelColor
(
"ffffffff"
);
attrs
.
setLabelOffset
(
new
Offset
(
0.9d
,
0.6d
,
AVKey
.
FRACTION
,
AVKey
.
FRACTION
));
pp
.
setAttributes
(
attrs
);
pp
.
setAltitudeMode
(
WorldWind
.
RELATIVE_TO_GROUND
);
PointPlacemarkAttributes
attrsP
=
new
PointPlacemarkAttributes
();
attrsP
.
setImageAddress
(
"satellite.png"
);
//attrsP.setImageColor(new Color(1f, 1f, 1f, 0.6f));
attrsP
.
setScale
(
0.1
);
attrsP
.
setImageOffset
(
new
Offset
(
175
d
,
175
d
,
AVKey
.
PIXELS
,
AVKey
.
PIXELS
));
pp
.
setAttributes
(
attrsP
);
layer
.
addRenderable
(
pp
);
// Add the layer to the model.
...
...
@@ -122,7 +135,7 @@ public class view3D extends JInternalFrame{
public
void
addSatellite
(
List
<
satPosition
>
positions
){
for
(
int
i
=
0
;
i
<
positions
.
size
();
i
++){
addTrack
(
positions
.
get
(
i
).
getName
(),
positions
.
get
(
i
).
getLat
(),
positions
.
get
(
i
).
getLon
());
addTrack
(
positions
.
get
(
i
).
getName
(),
positions
.
get
(
i
).
getLat
(),
positions
.
get
(
i
).
getLon
()
,
positions
.
get
(
i
).
getAlt
()
);
}
}
}
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