public class Path extends Object implements Cloneable, Comparable<Path>
Constructor and Description |
---|
Path(double[] start,
double[] goal)
Constructor
|
Path(double startX,
double startY,
double goalX,
double goalY)
Constructor
|
Path(Path p)
Copy constructor
|
Path(Point start,
Point goal)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(PathLink newLink)
Adds a link to the end of the path and updates the estimates
|
Path |
clone()
Implements the Cloneable interface
|
int |
compareTo(Path path2)
Implements the Comparable interface
Compares this path to another link using the "cost" and "remaining" values for comparison
|
List<JAXBElement<?>> |
generateAvclScriptElementList(int vehicleType,
double gpsInterval,
double minWptDist,
double vertical,
int verticalMode,
double speed,
int speedMode)
Generates a set of AVCL commands (waypoints) corresponding to the path
|
List<JAXBElement<?>> |
generateAvclScriptElementList(int vehicleType,
double vertical,
int verticalMode,
double speed,
int speedMode,
String trackMode,
boolean getGPS)
Generates a set of AVCL Waypoints corresponding to a planned route
|
double |
getCost() |
double |
getEstimatedRemaining() |
Point |
getLastPlannedPoint() |
boolean |
isLoop() |
String |
toMATLABString()
Generates a string representation of the Path object that can be used to plot the path in MATLAB
|
String |
toString()
Generates a string representation of the LineSegment object
|
public Path(double[] start, double[] goal)
start
- goal
- public Path(double startX, double startY, double goalX, double goalY)
startX
- goalX
- public Path(Path p)
p
- public Path clone()
public int compareTo(Path path2)
compareTo
in interface Comparable<Path>
public double getCost()
public double getEstimatedRemaining()
public void addLink(PathLink newLink)
newLink
- public Point getLastPlannedPoint()
public boolean isLoop()
public String toMATLABString()
public List<JAXBElement<?>> generateAvclScriptElementList(int vehicleType, double gpsInterval, double minWptDist, double vertical, int verticalMode, double speed, int speedMode)
vehicleType
- enumeration for the type of vehicle (UUV, USV, UGV or UAV)gpsInterval
- distance allowed between GPS fixes (UUV only)minWptDist
- minimum distance between waypointsvertical
- altitude or depth (UUV or UAV only)verticalMode
- enumeration determining how to interpret the vertical valuespeed
- speed to use in transitspeedMode
- enumeration determining knots or meters per secondpublic List<JAXBElement<?>> generateAvclScriptElementList(int vehicleType, double vertical, int verticalMode, double speed, int speedMode, String trackMode, boolean getGPS)
vehicleType
- enumeration for the type of vehicle (AUV, UAV, etc.)vertical
- altitude or depth of command (only relevant for UUVs and UAVs)verticalMode
- enumeration specifying depth, altitude, MSL altitude, or AGL altitudespeed
- knots, meters per second, or percent of propeller rpm (AUV) settingspeedMode
- enumeration for knots or meters per second (not relevant for AUVs)trackMode
- either "track to" or "direct to"getGPS
- set to true if the vehicle is to get a GPS fix on this path (UUV only)