use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightSouth.
public static Survey createStraightSouth() {
Survey survey = new Survey("Test Straight Survey South");
Leg leg0 = new Leg(5, 180, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 180, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 180, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class Space3DUtilsTest method testTransform1MNorth.
@Test
public void testTransform1MNorth() {
Leg north1MLeg = new Leg(1, 0, 0);
Coord3D result = Space3DUtils.toCartesian(Coord3D.ORIGIN, north1MLeg);
Coord3D expected = new Coord3D(0, 1, 0);
assertEquals(expected, result);
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class Space3DUtilsTest method testTransform10mNEUAndBack.
@Test
public void testTransform10mNEUAndBack() {
Leg northEastAndUp10M = new Leg(10, 45, 45);
Coord3D result = Space3DUtils.toCartesian(Coord3D.ORIGIN, northEastAndUp10M);
Leg reverse = new Leg(10, 225, -45);
result = Space3DUtils.toCartesian(result, reverse);
assertEquals(Coord3D.ORIGIN, result);
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class Space3DUtilsTest method testTransform1MEast.
@Test
public void testTransform1MEast() {
Leg east1MLeg = new Leg(1, 90, 0);
Coord3D result = Space3DUtils.toCartesian(Coord3D.ORIGIN, east1MLeg);
Coord3D expected = new Coord3D(1, 0, 0);
assertEquals(expected, result);
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class StationRenameTest method testAverageLegs.
@Test
public void testAverageLegs() {
Leg leg1 = new Leg(10, 359, -1);
Leg leg2 = new Leg(20, 1, +1);
List<Leg> legs = new ArrayList<>(2);
legs.add(leg1);
legs.add(leg2);
Leg avgLeg = SurveyUpdater.averageLegs(legs);
Assert.assertEquals("Dist", 15.0, avgLeg.getDistance(), SexyTopo.ALLOWED_DOUBLE_DELTA);
Assert.assertEquals("Azm", 0.0, avgLeg.getAzimuth(), SexyTopo.ALLOWED_DOUBLE_DELTA);
Assert.assertEquals("Inc", 0.0, avgLeg.getInclination(), SexyTopo.ALLOWED_DOUBLE_DELTA);
}
Aggregations