FollowPath(String name) { super(name); path.add(Position.fromDegrees(0, 0, 1e5)); path.add(Position.fromDegrees(1, 3, 1e5)); path.add(Position.fromDegrees(2, 4, 1e5)); path.add(Position.fromDegrees(3, 5, 1e5)); }
static { path = new ArrayList<Position>(); path.add(Position.fromDegrees(0, 0, 1e5)); path.add(Position.fromDegrees(0, 10, 1e5)); path.add(Position.fromDegrees(0, 20, 1e5)); path.add(Position.fromDegrees(0, 30, 1e5)); path.add(Position.fromDegrees(0, 40, 1e5)); path.add(Position.fromDegrees(0, 50, 1e5)); path.add(Position.fromDegrees(0, 60, 1e5)); path.add(Position.fromDegrees(0, 70, 1e5)); }
private Info[] buildFreeShapes() { double elevation = 10e3; ArrayList<Position> positions = new ArrayList<Position>(); positions.add( new Position(Angle.fromDegrees(37.8484), Angle.fromDegrees(-119.9754), elevation)); positions.add( new Position(Angle.fromDegrees(39.3540), Angle.fromDegrees(-110.1526), elevation)); positions.add( new Position(Angle.fromDegrees(38.3540), Angle.fromDegrees(-100.1526), elevation)); ArrayList<Position> positions2 = new ArrayList<Position>(); positions2.add(new Position(Angle.fromDegrees(0), Angle.fromDegrees(-150), elevation)); positions2.add(new Position(Angle.fromDegrees(25), Angle.fromDegrees(-75), elevation)); positions2.add(new Position(Angle.fromDegrees(50), Angle.fromDegrees(0), elevation)); ArrayList<Position> positions3 = new ArrayList<Position>(); for (double lat = 42, lon = -100; lat <= 45; lat += .1, lon += .1) { positions3.add(new Position(Angle.fromDegrees(lat), Angle.fromDegrees(lon), elevation)); } ArrayList<Position> positions4 = new ArrayList<Position>(); positions4.add(new Position(Angle.fromDegrees(90), Angle.fromDegrees(-110), elevation)); positions4.add(new Position(Angle.fromDegrees(-90), Angle.fromDegrees(-110), elevation)); ArrayList<Position> positions5 = new ArrayList<Position>(); for (int i = 0; i < 100; i++) { positions5.add( Position.fromDegrees(38.0 + i * 0.0001, 30.0 + i * 0.0001, 1000.0 + i * 5.0)); } @SuppressWarnings({"UnnecessaryLocalVariable"}) Info[] infos = new Info[] { new Info("Short Path", new Polyline(positions)), new Info("Long Path", new Polyline(positions2)), new Info("Incremental Path", new Polyline(positions3)), new Info("Vertical Path", new Polyline(positions4)), new Info("Small-segment Path", new Polyline(positions5)), new Info("Quad", new Quadrilateral(Sector.fromDegrees(38, 40, -104, -105), elevation)), new Info("None", null) }; return infos; }
protected List<Position> buildGrid(Sector sector, double height, int nLatCells, int nLonCells) { List<Position> grid = new ArrayList<Position>((nLatCells + 1) * (nLonCells + 1)); double dLat = sector.getDeltaLatDegrees() / nLatCells; double dLon = sector.getDeltaLonDegrees() / nLonCells; for (int j = 0; j <= nLatCells; j++) { double lat = j == nLatCells ? sector.getMaxLatitude().degrees : sector.getMinLatitude().degrees + j * dLat; for (int i = 0; i <= nLonCells; i++) { double lon = i == nLonCells ? sector.getMaxLongitude().degrees : sector.getMinLongitude().degrees + i * dLon; grid.add(Position.fromDegrees(lat, lon, height)); } } return grid; }