You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
733 B
25 lines
733 B
package seng302.Model;
|
|
|
|
|
|
import org.junit.Test;
|
|
import seng302.GPSCoordinate;
|
|
|
|
import java.awt.geom.Point2D;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
/**
|
|
* Created by esa46 on 16/03/17.
|
|
*/
|
|
public class ConstantVelocityRaceTest {
|
|
|
|
@Test
|
|
public void travelling5nmNorthGivesCorrectNewCoordinates() {
|
|
GPSCoordinate oldPos = new GPSCoordinate(0, 0);
|
|
GPSCoordinate newPos = ConstantVelocityRace.calculatePosition(oldPos, 5, 0);
|
|
// assertEquals(newPos.getLatitude(), 0.08374461297528203, );
|
|
// assertEquals(ConstantVelocityRace.calculatePosition(oldPos, 5, 90).getLatitude(), 0.08, 1e-1);
|
|
System.out.println(ConstantVelocityRace.calculatePosition(oldPos, 5, 0).getLongitude());
|
|
}
|
|
}
|