|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.robots.util.gps.Degrees
public class Degrees
Field Summary | |
---|---|
protected double |
_decDegrees
|
protected double |
_decMinutes
|
protected int |
_degrees
|
protected java.lang.String |
_direction
|
protected int |
_minutes
|
protected double |
_seconds
|
protected boolean |
isNegative
|
protected static char |
minChar
|
protected java.text.NumberFormat |
N
|
protected static char |
secChar
|
Constructor Summary | |
---|---|
Degrees()
|
|
Degrees(double degrees)
Construct a postition from decimal degrees DDD.DDDDD to DDD MM" SS' Must use in conjunction with setDirectionString (String pos, String neg) |
|
Degrees(double degrees,
double minutes,
java.lang.String bearing)
Construct a postition from degrees decimalMinutes DDD mm.mmm to DDD MM" SS' |
|
Degrees(java.lang.String direction,
int degrees,
int minutes,
double seconds)
Construct a postition from minutes/seconds. |
Method Summary | |
---|---|
protected void |
convertToDecimalFormat(int degrees,
int minutes,
double seconds)
A circle has 360 degrees, 60 minutes per degree, and 60 seconds per minute. |
double |
getDecimalDegrees()
ddd.ddddd form |
double |
getDecimalMinutes()
mm.mmmm Can make a call to getDegrees (DDD) and concat DDDmm.mmm for decimal minutes form. |
int |
getDegrees()
|
protected boolean |
getDirection()
Get Direction |
java.lang.String |
getDirectionString()
Get Direction String |
int |
getMinutes()
|
double |
getSeconds()
|
protected void |
setDirection(java.lang.String dir)
Set Direction and negative or positive value for this position NE is positive SW is negative |
protected void |
setDirectionString(java.lang.String pos,
java.lang.String neg)
Set Direction "N", "S", "E", "W" |
java.lang.String |
toString()
Return Position as a string in DD MM SS.ss format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int _degrees
protected int _minutes
protected double _seconds
protected double _decMinutes
protected double _decDegrees
protected java.lang.String _direction
protected boolean isNegative
protected static final char minChar
protected static final char secChar
protected java.text.NumberFormat N
Constructor Detail |
---|
public Degrees()
public Degrees(java.lang.String direction, int degrees, int minutes, double seconds)
minutes
- seconds
- public Degrees(double degrees)
degrees
- -- degree decimal formpublic Degrees(double degrees, double minutes, java.lang.String bearing)
degrees
- -- degree decimal formMethod Detail |
---|
public java.lang.String getDirectionString()
public int getDegrees()
public int getMinutes()
public double getSeconds()
public double getDecimalMinutes()
public double getDecimalDegrees()
protected void setDirectionString(java.lang.String pos, java.lang.String neg)
protected void convertToDecimalFormat(int degrees, int minutes, double seconds)
protected boolean getDirection()
protected void setDirection(java.lang.String dir)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |