uavsim.datatypes
Class ArcNavigational

java.lang.Object
  extended by uavsim.datatypes.A_Arc<AngleNavigational>
      extended by uavsim.datatypes.ArcNavigational

public class ArcNavigational
extends A_Arc<AngleNavigational>

Defines an arc formed by two navigational angles.

Author:
Dan Tappan [23.06.11]

Nested Class Summary
 class ArcNavigational.ArcNavigationalIterator
          Defines the iterator over a navigational arc.
 
Nested classes/interfaces inherited from class uavsim.datatypes.A_Arc
A_Arc.A_ArcIterator
 
Field Summary
 
Fields inherited from class uavsim.datatypes.A_Arc
_angleEnd, _angleStart
 
Constructor Summary
ArcNavigational(AngleNavigational angleStart, AngleNavigational angleEnd)
          Creates an arc with navigational angles.
 
Method Summary
 ArcMathematical convertToArcMathematical()
          Converts the arc to use mathematical angles.
 double getArcLength(boolean isCounterclockwise)
          Determines the length of the arc from start to end.
 ArcNavigational.ArcNavigationalIterator getIteratorInstance(AngleNavigational step, boolean isCounterclockwise, boolean isInclusiveRange)
          Generates an iterator.
 ArcNavigational getReverse()
          Swaps the start and end angles.
 
Methods inherited from class uavsim.datatypes.A_Arc
getAngleEnd, getAngleStart, getSubarcLength, getSubdivisionCount, isContained, isStartBeforeEnd, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArcNavigational

public ArcNavigational(AngleNavigational angleStart,
                       AngleNavigational angleEnd)
Creates an arc with navigational angles.

Parameters:
angleStart - - the start angle
angleEnd - - the end angle
Method Detail

convertToArcMathematical

public ArcMathematical convertToArcMathematical()
Converts the arc to use mathematical angles.

Returns:
the new arc

getArcLength

public double getArcLength(boolean isCounterclockwise)
Determines the length of the arc from start to end.

Specified by:
getArcLength in class A_Arc<AngleNavigational>
Parameters:
isCounterclockwise - - whether to follow the arc counterclockwise
Returns:
the length

getIteratorInstance

public ArcNavigational.ArcNavigationalIterator getIteratorInstance(AngleNavigational step,
                                                                   boolean isCounterclockwise,
                                                                   boolean isInclusiveRange)
Generates an iterator.

Specified by:
getIteratorInstance in class A_Arc<AngleNavigational>
Parameters:
step - - the step
isCounterclockwise - - whether to follow the arc counterclockwise
isInclusiveRange - - whether to include the end angle in the steps
Returns:
the iterator

getReverse

public ArcNavigational getReverse()
Swaps the start and end angles.

Specified by:
getReverse in class A_Arc<AngleNavigational>
Returns:
the new arc