Skip to content

Commit

Permalink
add methods and stubs to Navigation #52 #19
Browse files Browse the repository at this point in the history
  • Loading branch information
yaelAmitay committed Dec 13, 2016
1 parent 2e74fcd commit 3279756
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/main/java/smartcity/accessibility/navigation/Navigation.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,28 @@
* segments of the map that should be avoided in the routes it returns.
*/
public class Navigation {
List<MapSegment> segmentsToAvoid;

public Navigation() {
this.segmentsToAvoid = new ArrayList<MapSegment>();
}

public Route showRoute(Location source, Location destination) {
/**
* [[SuppressWarningsSpartan]]
*/
public Route showRoute(Location source, Location destination, Integer accessabilityThreshold) {
// TODO request rout from S to D from mapquest and return it.
return new Route();
Double radiusOfRoute = calcRadius(source, destination);
List<MapSegment> segmentsToAvoid = getSegmentsToAvoid(source, destination, accessabilityThreshold);
return null;
}

public void addLocationToAvoid(Location __) {
// TODO this function might get Location or MapSegment or something like
// that
// and add it to the segments that need to be avoid in the route.
// for now the method get location which mean the method will find the
// right MapSegement for this location.
private Double calcRadius(Location source, Location destination) {
// calculate the radius of the circle which the route can pass through.
return null;
}

private List<MapSegment> getSegmentsToAvoid(Location source, Location destination, Integer accessabilityThreshold) {
// return list of segment ot avoid
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @author yael This class represents a Leg in the route. this class is needed
* for communication with mapQuest servers.
* Leg in a route is part of the route.(really, look it up)
*/
public class Leg {
private List<Maneuver> maneuvers;
Expand Down

0 comments on commit 3279756

Please sign in to comment.