use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method create5MDown.
public static Survey create5MDown() {
Survey survey = new Survey("Test Survey 1m Down");
Leg leg0 = new Leg(5, 0, -90);
SurveyUpdater.updateWithNewStation(survey, leg0);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method create5MEast.
public static Survey create5MEast() {
Survey survey = new Survey("Test Survey 5m east");
Leg leg0 = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg splay0Left = new Leg(1, 0, 0);
SurveyUpdater.update(survey, splay0Left);
Leg splay0Right = new Leg(1, 180, 0);
SurveyUpdater.update(survey, splay0Right);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightNorthWith2EBranchFromS2.
public static Survey createStraightNorthWith2EBranchFromS2() {
Survey survey = new Survey("Test Straight Survey North With 2E Branch");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
survey.setActiveStation(survey.getStationByName("2"));
Leg legBranch = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, legBranch);
Leg legBranch2 = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, legBranch2);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class GraphToListTranslatorTest method testChronoListGeneration.
@Test
public void testChronoListGeneration() {
GraphToListTranslator translator = new GraphToListTranslator();
Survey baseSurvey = BasicTestSurveyCreator.createStraightNorth();
baseSurvey.setActiveStation(baseSurvey.getStationByName("1"));
SurveyUpdater.updateWithNewStation(baseSurvey, new Leg(5, 270, 0));
List<GraphToListTranslator.SurveyListEntry> chronoList = translator.toChronoListOfSurveyListEntries(baseSurvey);
GraphToListTranslator.SurveyListEntry last = chronoList.get(chronoList.size() - 1);
Assert.assertEquals("5", last.getLeg().getDestination().getName());
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class Space3DUtilsTest method testTransform2MNorth.
@Test
public void testTransform2MNorth() {
Leg north2MLeg = new Leg(2, 0, 0);
Coord3D result = Space3DUtils.toCartesian(Coord3D.ORIGIN, north2MLeg);
Coord3D expected = new Coord3D(0, 2, 0);
assertEquals(expected, result);
}
Aggregations