Deleted redundant and deprecated code (Visualiser)
- References to deprecated objects replaced - Deprecated Constants class removed - general redundant code deleted
This commit is contained in:
@@ -2,12 +2,12 @@ package seng302.Model;
|
||||
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
import org.junit.Test;
|
||||
import seng302.Constants;
|
||||
import seng302.GPSCoordinate;
|
||||
|
||||
import java.awt.geom.Point2D;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static seng302.Model.Leg.NM_TO_METERS;
|
||||
|
||||
/**
|
||||
* Created by esa46 on 22/03/17.
|
||||
@@ -20,7 +20,7 @@ public class LegTest {
|
||||
public void calculateDistanceHandles5nmNorth() {
|
||||
GeodeticCalculator calc = new GeodeticCalculator();
|
||||
calc.setStartingGeographicPoint(0, 0);
|
||||
calc.setDirection(0, 5 * Constants.NMToMetersConversion);
|
||||
calc.setDirection(0, 5 * NM_TO_METERS);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_MARKER, endMarker, 0);
|
||||
@@ -31,7 +31,7 @@ public class LegTest {
|
||||
public void calculateDistanceHandles12nmEast() {
|
||||
GeodeticCalculator calc = new GeodeticCalculator();
|
||||
calc.setStartingGeographicPoint(0, 0);
|
||||
calc.setDirection(90, 12 * Constants.NMToMetersConversion);
|
||||
calc.setDirection(90, 12 * NM_TO_METERS);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_MARKER, endMarker, 0);
|
||||
@@ -42,7 +42,7 @@ public class LegTest {
|
||||
public void calculateDistanceHandlesHalfnmSouth() {
|
||||
GeodeticCalculator calc = new GeodeticCalculator();
|
||||
calc.setStartingGeographicPoint(0, 0);
|
||||
calc.setDirection(180, 0.5 * Constants.NMToMetersConversion);
|
||||
calc.setDirection(180, 0.5 * NM_TO_METERS);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_MARKER, endMarker, 0);
|
||||
@@ -53,7 +53,7 @@ public class LegTest {
|
||||
public void calculateDistanceHandlesPoint1nmWest() {
|
||||
GeodeticCalculator calc = new GeodeticCalculator();
|
||||
calc.setStartingGeographicPoint(0, 0);
|
||||
calc.setDirection(-90, 0.1 * Constants.NMToMetersConversion);
|
||||
calc.setDirection(-90, 0.1 * NM_TO_METERS);
|
||||
|
||||
Marker endMarker = getEndMarker(calc.getDestinationGeographicPoint());
|
||||
Leg test = new Leg("Test", ORIGIN_MARKER, endMarker, 0);
|
||||
|
||||
Reference in New Issue
Block a user