|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.stellarium.StelUtility
public class StelUtility
Nested Class Summary | |
---|---|
static class |
StelUtility.Coords
Encapsulate longitude/latitude coordinates that were returned by reference in the C++ version. |
(package private) static class
|
StelUtility.Type
|
Field Summary | |
---|---|
static double |
AU
Astronomical Unit |
static double |
M_PI
|
static double |
M_PI_2
|
static double |
M_PI_4
|
Constructor Summary | |
---|---|
StelUtility()
|
Method Summary | |
---|---|
(package private)
static java.lang.String |
colorToString(SColor v)
|
static javax.vecmath.Point3d
|
div(javax.vecmath.Point3d v,
double d)
|
(package private) static double
|
dmsToRad(int d,
double m)
|
(package private) double |
dmsToRad(int d,
int m, double s)
|
static double |
dot(javax.vecmath.Tuple3d v1,
javax.vecmath.Tuple3d v2)
Returns the dot product of 2 Tuple3d. |
static double |
getDecAngle(java.lang.String str)
|
static double |
getGMTShiftFromSystem(double jd)
|
static double |
getGMTShiftFromSystem(double jd,
boolean _local)
Return the number of hours to add to gmt time to get the local time in day jd taking the parameters from system. |
static java.lang.String |
getISO8601TimeUTC(double jd)
Return the time in ISO 8601 format that is : %Y-%m-%d %H:%M:%S |
static double |
getLength(javax.vecmath.Tuple3d v)
|
static double |
getLengthSquared(javax.vecmath.Tuple3d v)
|
static java.lang.String |
getTimeZoneNameFromSystem(double jd)
Return the time zone name taken from system locale |
(package private) static double
|
hmsToRad(int h,
double m)
|
(package private) double |
hmsToRad(int h,
int m, double s)
|
static boolean |
isEmpty(java.lang.String str)
test for nullity and emptyness |
(package private) static boolean
|
iswhite(char c)
strips trailing whitespaces from buf. |
static double |
magToLuminance(double mag,
double surface)
Provide the luminance in cd/m^2 from the magnitude and the surface in arcmin^2 |
(package private) static javax.vecmath.Vector3d
|
mult(javax.vecmath.Matrix4d aMatrix,
javax.vecmath.Vector3d aVector)
Multiply a Matrix4d by a Vector3d |
static javax.vecmath.Vector3d
|
mult(javax.vecmath.Vector3d aVector,
double a)
Multiply the Vector by a scalar |
static java.lang.String |
myStrFTime(int max,
java.lang.String fmt, java.util.Date tm)
Use to remove a boring warning |
static void |
normalize(javax.vecmath.Point3d point3d)
|
static java.lang.String |
printAngleDms(double angle)
|
static java.lang.String |
printAngleDms(double angle,
boolean decimals, boolean useD)
Print the passed angle with the format dd�mm'ss.ss(.ss)" |
static java.lang.String |
printAngleDmsStel(double location)
|
static java.lang.String |
printAngleHms(double angle)
Obtains a human readable angle in the form: hhhmmmss.sss" |
static StelUtility.Coords
|
rectToSphe(javax.vecmath.Tuple3d v)
|
(package private)
static java.lang.String |
skipwhite(java.lang.String s)
salta espacios en blanco |
static void |
spheToRect(double lng,
double lat, double r, javax.vecmath.Tuple3d v)
|
static void |
spheToRect(double lng,
double lat, javax.vecmath.Tuple3d v)
|
(package private) static void
|
spheToRect(double lng,
double lat, javax.vecmath.Vector3d v)
Deprecated. should be a point |
static SColor |
stringToColor(java.lang.String s)
Obtains a Color from a String with the form x,y,z |
(package private)
static double[] |
stringToDoubles(java.lang.String s)
Obtains an array of Doubles from a String with the form x,y,z |
(package private) static float[]
|
stringToFloats(java.lang.String s)
|
static double |
stringToJDay(java.lang.String date)
Convert String int ISO 8601-like format [+/-]YYYY-MM-DDThh:mm:ss (no timzone offset) to julian day TODO: move to better location for reuse |
static javax.vecmath.Point3d
|
stringToPoint3d(java.lang.String s)
Obtains a Point3d from a String with the form x,y,z |
static javax.vecmath.Vector3d
|
stringToVector3d(java.lang.String s)
Obtains a Vector3d from a String with the form x,y,z |
static double[] |
toArray(javax.vecmath.Matrix4d m)
|
static double[] |
toArray(javax.vecmath.Tuple3d v)
|
static float[] |
toArray(javax.vecmath.Tuple3f v)
|
static float[] |
toArray(javax.vecmath.Tuple4f tuple4f)
|
(package private)
static java.lang.String |
trim(java.lang.String x)
|
static java.lang.String |
tuple3dToString(javax.vecmath.Tuple4f v)
|
static java.lang.String |
tuple3fToString(javax.vecmath.Tuple3f v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double M_PI
public static final double M_PI_2
public static final double M_PI_4
public static final double AU
Constructor Detail |
---|
public StelUtility()
Method Detail |
---|
double hmsToRad(int h, int m, double s)
double dmsToRad(int d, int m, double s)
static double hmsToRad(int h, double m)
static double dmsToRad(int d, double m)
static void spheToRect(double lng, double lat, javax.vecmath.Vector3d v)
lng
-
lat
-
v
-
public static void spheToRect(double lng, double lat, javax.vecmath.Tuple3d v)
public static void spheToRect(double lng, double lat, double r, javax.vecmath.Tuple3d v)
public static double stringToJDay(java.lang.String date) throws StellariumException
date
- The string date
StellariumException
- If the date could not be successfuly parsed.
public static void normalize(javax.vecmath.Point3d point3d)
public static StelUtility.Coords rectToSphe(javax.vecmath.Tuple3d v)
public static double getLength(javax.vecmath.Tuple3d v)
public static double getLengthSquared(javax.vecmath.Tuple3d v)
public static javax.vecmath.Vector3d stringToVector3d(java.lang.String s)
public static javax.vecmath.Point3d stringToPoint3d(java.lang.String s)
public static SColor stringToColor(java.lang.String s)
static double[] stringToDoubles(java.lang.String s)
static float[] stringToFloats(java.lang.String s)
public static java.lang.String tuple3dToString(javax.vecmath.Tuple4f v)
public static java.lang.String tuple3fToString(javax.vecmath.Tuple3f v)
static java.lang.String colorToString(SColor v)
public static double magToLuminance(double mag, double surface)
static boolean iswhite(char c)
static java.lang.String trim(java.lang.String x)
static java.lang.String skipwhite(java.lang.String s)
public static double getDecAngle(java.lang.String str)
public static java.lang.String printAngleDms(double angle)
public static java.lang.String printAngleDms(double angle, boolean decimals, boolean useD)
angle
- Angle in radian
decimals
- Define if 2 decimal must also be printed
useD
- Define if letter "d" must be used instead of �
public static java.lang.String printAngleDmsStel(double location)
public static java.lang.String printAngleHms(double angle)
static javax.vecmath.Vector3d mult(javax.vecmath.Matrix4d aMatrix, javax.vecmath.Vector3d aVector)
public static javax.vecmath.Vector3d mult(javax.vecmath.Vector3d aVector, double a)
aVector
-
a
-
public static javax.vecmath.Point3d div(javax.vecmath.Point3d v, double d)
public static double dot(javax.vecmath.Tuple3d v1, javax.vecmath.Tuple3d v2)
v1
- the other vector
v2
- the other vector
public static double[] toArray(javax.vecmath.Matrix4d m)
public static double[] toArray(javax.vecmath.Tuple3d v)
public static float[] toArray(javax.vecmath.Tuple3f v)
public static float[] toArray(javax.vecmath.Tuple4f tuple4f)
public static java.lang.String myStrFTime(int max, java.lang.String fmt, java.util.Date tm)
max
- The maximum number of characters to issue
fmt
- The time format pattern
tm
- The date for format
public static double getGMTShiftFromSystem(double jd)
public static java.lang.String getTimeZoneNameFromSystem(double jd)
jd
- Julian Day
public static double getGMTShiftFromSystem(double jd, boolean _local)
jd
- Julian Day
_local
-
public static java.lang.String getISO8601TimeUTC(double jd)
public static boolean isEmpty(java.lang.String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |