|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.nas.route.Route
public class Route
Route is a class which defines a path for an aircraft to follow. It contains a list of RouteNodes that defines a sequence of fixes which define the route.See the source: Route.java
RouteNode,
Serialized Form| Nested Class Summary | |
|---|---|
static interface |
Route.DescentCapturePredictor
|
| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
private java.lang.String |
name
The name of the route. |
static java.text.DecimalFormat |
OFFSET
Route name suffix format (for suffix output string to provide info on route offset). |
private boolean |
restricted
Whether this route has altitude or speed restrictions. |
protected java.util.List<RouteNode> |
rnlist
The OLD list of Route Nodes: this can be removed when recordings before 2007/05/08 are no longer needed. |
protected java.util.List<RouteNode> |
routeNodes
The list of Route Nodes. |
protected java.util.List<RouteSegment> |
routeSegments
The list of Route Segments. |
protected java.util.List<RouteSegment> |
rslist
The OLD list of Route Segments: this can be removed when recordings before 2007/05/08 are no longer needed. |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
Route()
Construct an unnamed route. |
|
Route(java.lang.String routeName)
Construct a named (Empty) route. |
|
| Method Summary | |
|---|---|
boolean |
add(Route rteToAdd)
Adds (appends) a route to the end of this route. |
void |
addRouteNode(Fix center,
RouteNode rn)
Adds a route node to the route. |
boolean |
addRouteNode(RouteNode rn)
Adds a route node to the route. |
RouteSegment |
calcMinDistanceToTrailingFix(Position position)
Returns the RouteSegment of this Route that has the trailing fix that is closest to the given Position. |
Route |
clone()
Generates a deep copy of the Route. |
int |
compare(Fix firstFix,
Fix secondFix)
Returns an integer value that is less than zero if firstFix is before secondFix, a value that is greater than zero if firstFix is after the secondFix, or a value that is zero if firstFix is equal to secondFix. |
boolean |
contains(Fix theFix)
Returns whether this route contains the specified fix. |
boolean |
containsNode(RouteNode theNode)
Returns whether this route contains the specified route node. |
void |
debug()
Sends information about a route to the TgMsg.debug() output |
RouteSegment |
determineCaptureSegment(Position thePosition)
Determines a RouteSegment to capture on this Route object given a position, satisfying the criteria 1 and 2 in the Lateral Guidance System. |
RouteSegment |
determineCaptureSegmentOrRadial(Position position)
Determines a RouteSegment to capture on this Route object given a position, satisfying the criteria 1 and 2 in the Lateral Guidance System. |
RouteSegment |
detNearestSegment(Position position)
Determines the nearest RouteSegment for capture, satisfying criteria 1 and criteria 2 (See the analysis for the Lateral Guidance System for complete details). |
RouteSegment |
detNearestSegmentOrRadial(Position position)
Determines the nearest RouteSegment for capture, satisfying criteria 1 and criteria 2 (See the analysis for the Lateral Guidance System for complete details). |
Distance |
distanceBetween(Fix startFix,
Fix endFix)
Returns the distance between the two specified fixes on the route. |
Distance |
distanceToFix(Position currPos,
RouteSegment currSeg,
Fix target)
Returns the distance along the route from an object with currPos, which is assumed to lie somewhere along currSeg to the target Fix somewhere along the Route. |
Fix |
getAlternativeFix(RouteNode theNode)
Returns the alternative fix for the fix contained in the RouteNode argument. |
RouteNode |
getFirstNode()
Returns the first RouteNode of this Route. |
RouteSegment |
getFirstSegment()
Returns the first RouteSegment in this Route |
int |
getIndexOfNode(Fix theFix)
Searches for the RouteNode that contains the specified fix. |
RouteNode |
getLastNode()
Returns the last RouteNode of this Route. |
java.lang.String |
getName()
Returns the name of the Route. |
RouteNode |
getNextAltitudeRestriction(Fix fix)
Gets the next altitude restricted route node after the specified fix. |
RouteNode |
getRouteNode(Fix theFix)
Gets the RouteNode that contains the specified fix. |
RouteNode |
getRouteNode(java.lang.String fixName)
Returns the route node reference containing the fix with the specified name, or null if a route node containing the fix does not exist. |
RouteNode |
getRouteNodeAt(int idx)
Returns the RouteNode at the specified index. |
int |
getRouteNodeCount()
Returns the number of RouteNodes in this route. |
java.util.Iterator<RouteNode> |
getRouteNodeIterator()
Returns an Iterator over the RouteNodes in the Route. |
java.util.Iterator<RouteSegment> |
getRouteSegmentIterator()
Returns an Iterator over the RouteSegments in the Route. |
java.util.List<RouteSegment> |
getRouteSegmentList()
Returns (a Reference to) the list of RouteSegments contained in this Route |
java.lang.String |
getRouteWithBracketLogic()
Returns the route as a dot string with any actions or restrictions in brackets. |
Route |
getSubRoute(Fix theStartFix)
Returns the portion of this route starting at the start fix and continuing through the fixes including the end of the route; returns null if a fix is not on the route. |
Route |
getSubRoute(Fix theStartFix,
Fix theEndFix)
Returns the portion of this route starting at the start fix and continuing through the fixes including the end of the route; returns null if a fix is not on the route; if the end fix precedes the start fix on the original Route, the order of the returned subroute is reversed compared to the original. |
Route |
getSubRoute(Position position,
Fix helperFix)
Returns a portion of this route based upon a position and a helper fix; returns null if there is a problem determining the subroute. |
boolean |
isEmpty()
Returns whether this Route is empty (has no route nodes). |
boolean |
isRestricted()
|
static void |
main(java.lang.String[] args)
|
private void |
readObject(java.io.ObjectInputStream in)
If rslist and rnlist are of obsolete type faa.tg.list.TgList, convert to typed Vectors. |
void |
restrictionCaptureTest(Route.DescentCapturePredictor predictor)
Do route validation on altitude restrictions. |
Distance |
routeFollowingDistance(Fix startFix,
Fix endFix,
Distance turnRadius)
This gets the length of the route as followed by the aircraft: this distance calculation is generally shorter than Route.totalLength() because most turns (on the segment changes) will shorten the path. |
int |
size()
Gets the number of RouteNodes in this route. |
java.lang.String |
toDotSepString()
Returns a representation of this Route with dots (.) between the fixes. |
java.lang.String |
toDraText()
Prints DR&A text information to a String. |
java.lang.String |
toNasString()
Returns the route in nas format Basically fix..fix... |
java.lang.String |
toSpaceSepString()
Returns a representation of this Route with spaces between the fixes. |
java.lang.String |
toString()
Returns a string representation of this Route. |
Distance |
totalLength()
This gets the length of the route: this is not quite the same as the length of the path an aircraft will take while following the route, since aircraft will cut corners to some extent on turns (based on their turn radius). |
private boolean |
validFix(boolean enforce,
Fix fix,
AircraftEquipment equip)
Returns whether a fix is valid |
java.lang.String |
validWithNavigationLimits(boolean enforce,
AcType type)
Returns whether an an aircraft could follow its route if it was forced to obey the limitations of its navigation equipment. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
public static final java.text.DecimalFormat OFFSET
private java.lang.String name
protected final java.util.List<RouteNode> rnlist
protected final java.util.List<RouteSegment> rslist
private boolean restricted
protected java.util.List<RouteNode> routeNodes
protected java.util.List<RouteSegment> routeSegments
| Constructor Detail |
|---|
public Route()
public Route(java.lang.String routeName)
routeName - the name of the route.| Method Detail |
|---|
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundExceptionpublic RouteSegment getFirstSegment()
public java.util.List<RouteSegment> getRouteSegmentList()
public Distance distanceToFix(Position currPos,
RouteSegment currSeg,
Fix target)
currPos - AC position, which is somewhere on given RouteSegment.currSeg - The current route segment being followed.target - A Fix along the route, beyond the route segment.public java.lang.String getName()
getName in interface ManagedObjectpublic boolean addRouteNode(RouteNode rn)
rn - the route node.
public void addRouteNode(Fix center,
RouteNode rn)
rn - the route node.public RouteNode getNextAltitudeRestriction(Fix fix)
fix - The fix after which to look for restrictions (if null,
looks at the first fix of the route).
java.lang.IllegalArgumentException - If fix is not on route.public RouteNode getRouteNode(Fix theFix)
theFix - the fix to find the route node of.
public RouteNode getRouteNode(java.lang.String fixName)
fixName - The name of the fix to get the RouteNode for.
public Route getSubRoute(Position position,
Fix helperFix)
position - the position in space used to determine which
routeSegment would be intercepted.helperFix - a fix along the route used to determine which
direction the subRoute should be constructed in.
public Distance distanceBetween(Fix startFix,
Fix endFix)
startFix - The first fix to appear in the subroute.endFix - The last fix to appear in the subroute.
java.lang.IllegalArgumentException - A fix is not on the route, or end fix
is not after start fix.
public Route getSubRoute(Fix theStartFix,
Fix theEndFix)
theStartFix - the first fix in the new subroute.theEndFix - the last fix in the new subroute.public Route getSubRoute(Fix theStartFix)
theStartFix - the first fix to appear in the subroute.public boolean add(Route rteToAdd)
rteToAdd - the route to be added to the end of this route.public int size()
public int getIndexOfNode(Fix theFix)
theFix - the fix
public Distance totalLength()
#routeFollowingDistance(Fix, Fix, Distance)public boolean contains(Fix theFix)
theFix - the fix.
public boolean containsNode(RouteNode theNode)
theNode - The RouteNode to find in this Route.public Fix getAlternativeFix(RouteNode theNode)
theNode - the node
public int compare(Fix firstFix,
Fix secondFix)
public java.util.Iterator<RouteNode> getRouteNodeIterator()
public java.util.Iterator<RouteSegment> getRouteSegmentIterator()
public RouteNode getFirstNode()
public RouteNode getLastNode()
public RouteNode getRouteNodeAt(int idx)
idx - the index into the route.public int getRouteNodeCount()
public boolean isEmpty()
public Route clone()
clone in class java.lang.Objectpublic java.lang.String toDotSepString()
public java.lang.String toSpaceSepString()
public java.lang.String toNasString()
public java.lang.String getRouteWithBracketLogic()
public java.lang.String toDraText()
toDraText in interface TextWritablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void debug()
public RouteSegment determineCaptureSegment(Position thePosition)
NOTE: this may not always pick the best/shortest capture segment:
check whether your results are what you looking for.
thePosition - is the current position of an object.
java.lang.NullPointerException - If first segment of route is null.public RouteSegment determineCaptureSegmentOrRadial(Position position)
NOTE: this may not always pick the best/shortest capture segment:
check whether your results are what you looking for.
position - is the current position of an object.
java.lang.NullPointerException - If first segment of route is null.public RouteSegment detNearestSegment(Position position)
position - Position to find the nearest RouteSegment to.
public RouteSegment detNearestSegmentOrRadial(Position position)
NOTE: If the Route is a RouteWEndRadial, this will also check the
end radial segment. Uses next() to iterate through the segments,
not the routeSegment iterator.
position - Position to find the nearest RouteSegment to.
public RouteSegment calcMinDistanceToTrailingFix(Position position)
position - the position given.public boolean isRestricted()
public java.lang.String validWithNavigationLimits(boolean enforce,
AcType type)
enforce - - whether to enforce equipment restrictionstype - - the aircraft's type
private boolean validFix(boolean enforce,
Fix fix,
AircraftEquipment equip)
enforce - - whether to enforce equipment restrictionsfix - - the fixequip - - the aircraft's equipment
public Distance routeFollowingDistance(Fix startFix,
Fix endFix,
Distance turnRadius)
If the aircraft turn radius changes, the route length will also change.
startFix - The start fix on the route to find the distance for.endFix - The end fix on the route to find the distance for.turnRadius - The turn radius of the aircraft following the route.
java.lang.IllegalArgumentException - Start fix not found in route.
public void restrictionCaptureTest(Route.DescentCapturePredictor predictor)
throws UnableToComplyException
UnableToComplyExceptionpublic static final void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||