diff options
author | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 17:39:05 -0500 |
---|---|---|
committer | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 17:39:05 -0500 |
commit | 9441ed331af3aa6b3ef45bf165e40faad18bc7fd (patch) | |
tree | e4f9155ccce81e3cb2145a41a68dacff6671950a /src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java | |
parent | 4a7ae2831563622ebb4a1d893764afd0e0e0dfbe (diff) |
Use gradle
Diffstat (limited to 'src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java')
-rw-r--r-- | src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java b/src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java deleted file mode 100644 index d3eda40..0000000 --- a/src/com/benburwell/planes/gui/aircraftmap/GeoPoint.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.benburwell.planes.gui.aircraftmap; - -/** - * Created by ben on 11/19/16. - */ -public class GeoPoint { - private double latitude; - private double longitude; - private double altitude; - - public GeoPoint(double latitude, double longitude, double altitude) { - this.latitude = latitude; - this.longitude = longitude; - this.altitude = altitude; - } - - public int getX(AircraftMap map) { - double degreesFromCenter = map.getCenterLongitude() - this.longitude; - double pixelsFromCenter = degreesFromCenter * map.getPixelsPerDegreeLongitude(); - double centerPixels = map.getSize().getWidth() / 2; - int xPosition = (int) (centerPixels - pixelsFromCenter); - return xPosition; - } - - public int getY(AircraftMap map) { - double degreesFromCenter = map.getCenterLatitude() - this.latitude; - double pixelsFromCenter = degreesFromCenter * map.getPixelsPerDegreeLatitude(); - double centerPixels = map.getSize().getHeight() / 2; - int yPosition = (int) (centerPixels + pixelsFromCenter); - return yPosition; - } - - public double getAltitude() { - return this.altitude; - } -} |