|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdriver.ted.utilities.T_Utilities
public class T_Utilities
Title: T_Utilities
Description: This class provides static utility functions.
Copyright: (c) 2002 - 2006
Change History:
| Field Summary | |
|---|---|
static double |
AsToRad
Constant value to convert arcseconds to radians. |
static double |
C
Constant value for the Speed of Light c. |
static double |
DtR
Constant Value for the degrees to Radians conversion factor. |
static double |
EarthEccentricity
Constant value for the Earth's eccentricity. |
static double |
EarthEquatorialRadius
Constant Value for the Earth Equatorial Radius. |
static double |
L1
Constant value for the GPS L1 Frequency. |
static double |
L2
Constant Value for the GPS L2 Frequency. |
static double |
PI
Constant Value for Pi to 24 decimal places. |
| Constructor Summary | |
|---|---|
T_Utilities()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
decimalToDMS(double value,
int precision)
Function to return a string in Degree:Minute:Second format, provided a decimal value. |
static java.lang.String |
decimalToDMSDIRH(double value,
int precision)
Utility to convert signed longitude degree.decimal values to DMS strings with directions added. |
static java.lang.String |
decimalToDMSDIRV(double value,
int precision)
Utility to convert signed latitude degree.decimal values to DMS strings with directions added. |
static java.lang.String |
decimalToRAHMS(double value,
int precision)
Public function to return a string to use in the format hh mm ss.s provided a double and an int precision. |
static java.lang.String |
decimalToTimeHMS(double value,
int precision)
Public function to return a string to use in the format hh:mm:ss provided a double and an int precision. |
static double |
getDecimalOfDouble(double a)
This function gets all numbers to the right of the decimal of the double provided, including sign. |
static int |
getIntOfDouble(double value)
This function casts the double to an int, effectively returning just the integer portion of the double value. |
static java.lang.String |
getPrecisionString(int leading,
int precision)
Public function to return a string to use in the DecimalFormat constructor, provided an integer. |
static double |
normalize(double min,
double max,
double x)
Static Public function to bound a number between a min and max value, using a default precision of 15. |
static double |
normalize(double min,
double max,
double x,
int precision)
Static Public function to bound a number between a min and max value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double C
public static final double L1
public static final double L2
public static final double PI
public static final double DtR
public static final double EarthEquatorialRadius
public static final double EarthEccentricity
public static double AsToRad
| Constructor Detail |
|---|
public T_Utilities()
| Method Detail |
|---|
public static double normalize(double min,
double max,
double x,
int precision)
normalize(-180, 180, 270, 15)
normalize(0,1,23.789456,6)
min - The minimum value the number can havemax - The maximum value the number can havex - The value to boundprecision - The precision of the returned value
public static double normalize(double min,
double max,
double x)
normalize(-180, 180, 270)
normalize(0,1,23.789456)
min - The minimum value the number can havemax - The maximum value the number can havex - The value to bound
public static java.lang.String getPrecisionString(int leading,
int precision)
leading - Specifies the number of leading zeros (to the left of the decimal point)precision - Specifies the number of trailing zeros (to the right of the decimal point)
public static int getIntOfDouble(double value)
value - The double value whose integer part is needed
public static double getDecimalOfDouble(double a)
a - Double value to extract the right side from
public static java.lang.String decimalToDMS(double value,
int precision)
value - The value to convert to DMS formatprecision - The precision of the seconds in the DMS string
public static java.lang.String decimalToDMSDIRV(double value,
int precision)
value - The signed degree value to convert to a DMS stringprecision - The precision of the seconds value in the string
public static java.lang.String decimalToDMSDIRH(double value,
int precision)
value - The signed degree value to convert to a DMS stringprecision - The precision of the seconds value in the string
public static java.lang.String decimalToTimeHMS(double value,
int precision)
value - The value to convert to a time stringprecision - The number of decimal places to show in the seconds
public static java.lang.String decimalToRAHMS(double value,
int precision)
value - The value to convert to a time stringprecision - The number of decimal places to show in the seconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||