summaryrefslogtreecommitdiff
path: root/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-11-19 13:06:00 -0500
committerBen Burwell <ben.burwell@trifecta.com>2016-11-19 13:06:00 -0500
commit603d7e015bb60eeafa49bf42c2c747c8846e6c46 (patch)
tree7b5efd06f51ccb9eb60eae3c903aa57d90045e4c /src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
parentb8c30e5edd18fc830b944431fda32334af1f9801 (diff)
Use altitude to color planes
Diffstat (limited to 'src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java')
-rw-r--r--src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java b/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
index c1478b3..b7f8aab 100644
--- a/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
+++ b/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
@@ -27,10 +27,10 @@ public class AircraftMapComponent implements ViewComponent {
this.subscribeToChanges();
List<Drawable> planes = new ArrayList<>();
- planes.add(new Plane("JBU1111", 40.6188942, -75.4947205));
- planes.add(new Plane("JBU1112", 40.6178942, -75.4347205));
- planes.add(new Plane("JBU1114", 40.5178942, -75.5347205));
- planes.add(new Plane("JBU1115", 40.3178942, -75.1347205));
+ planes.add(new Plane("JBU1111", 40.6188942, -75.4947205, 36000));
+ planes.add(new Plane("JBU1112", 40.6178942, -75.4347205, 42000));
+ planes.add(new Plane("JBU1114", 40.5178942, -75.5347205, 3500));
+ planes.add(new Plane("JBU1115", 40.3178942, -75.1347205, 0));
this.mapPanel.setPlanes(planes);
}
@@ -94,9 +94,7 @@ public class AircraftMapComponent implements ViewComponent {
List<Drawable> planes = new ArrayList<>();
store.getAircraft().values().forEach(aircraft -> {
String name = !aircraft.getCallsign().isEmpty() ? aircraft.getCallsign() : aircraft.getHexIdent();
- double lat = aircraft.getCurrentPosition().getLatitude();
- double lon = aircraft.getCurrentPosition().getLongitude();
- planes.add(new Plane(name, lat, lon));
+ planes.add(new Plane(name, aircraft.getCurrentPosition()));
});
mapPanel.setPlanes(planes);
mapPanel.validate();