public class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static double |
cbrt(double x)
Simple cube root
|
static void |
ln_add_hms(LnHms source,
LnHms dest)
add hms to hms
|
static void |
ln_add_secs_hms(LnHms hms,
double seconds)
add seconds to hms
|
static void |
ln_deg_to_dms(double degrees,
LnDms dms)
convert degrees to dms
|
static void |
ln_deg_to_hms(double degrees,
LnHms hms)
convert degrees to hh:mm:ss
|
static BigDecimal |
ln_deg_to_rad(BigDecimal degrees)
BigDecimal variant
|
static double |
ln_deg_to_rad(double degrees)
convert degrees to radians
|
static double |
ln_dms_to_deg(LnDms dms)
convert dms to degrees
|
static double |
ln_dms_to_rad(LnDms dms)
convert dms to radians
|
static void |
ln_equ_to_hequ(LnEquPosn pos,
LnhEquPosn hpos)
void ln_equ_to_hequ(LnEquPosn pos, LnhEquPosn hpos) \brief human double
equatorial position to human readable equatorial position \ingroup
conversion
|
static double |
ln_get_dec_location(String s)
double ln_get_dec_location(String s) \param s Location string \return
angle in degrees
Obtains Latitude, Longitude, RA or Declination from a string.
|
static String |
ln_get_humanr_location(double location)
String ln_get_humanr_location(double location) \param location Location
angle in degress \return Angle string
Obtains a human readable location in the form: ddºmm'ss.ss"
|
static double |
ln_get_light_time(double dist)
\fn double ln_get_light_time (double dist) \param dist Distance in AU
\return Distance in light days.
|
static double |
ln_get_rect_distance(LnRectPosn a,
LnRectPosn b)
\fn double ln_get_rect_distance(LnRectPosn a, LnRectPosn b) \param a
First rectangular coordinate \param b Second rectangular coordinate
\return Distance between a and b.
|
static String |
ln_get_version()
String ln_get_version (void) \return Null terminated version string.
|
static void |
ln_hequ_to_equ(LnhEquPosn hpos,
LnEquPosn pos)
void ln_hequ_to_equ(LnhEquPosn hpos, LnEquPosn pos) \brief human readable
equatorial position to double equatorial position \ingroup conversion
|
static void |
ln_hhrz_to_hrz(LnhHrzPosn hpos,
LnHrzPosn pos)
void ln_hhrz_to_hrz(LnhHrzPosn hpos, LnHrzPosn pos) \brief human readable
horizontal position to double horizontal position \ingroup conversion
|
static void |
ln_hlnlat_to_lnlat(LnhLnlatPosn hpos,
LnLnlatPosn pos)
void ln_hlnlat_to_lnlat(LnhLnlatPosn hpos, LnLnlatPosn pos) \brief human
readable long/lat position to double long/lat position \ingroup
conversion
|
static double |
ln_hms_to_deg(LnHms hms)
convert hours:mins:secs to degrees
|
static double |
ln_hms_to_rad(LnHms hms)
convert hours:mins:secs to radians
|
static void |
ln_hrz_to_hhrz(LnHrzPosn pos,
LnhHrzPosn hpos)
void ln_hrz_to_hhrz(LnHrzPosn pos, LnhHrzPosn hpos) \brief double
horizontal position to human readable horizontal position \ingroup
conversion
|
static String |
ln_hrz_to_nswe(LnHrzPosn pos)
String ln_hrz_to_nswe(LnHrzPosn pos); \brief returns direction of given
azimuth - like N,S,W,E,NSW,...
|
static double |
ln_interpolate3(double n,
double y1,
double y2,
double y3)
double ln_interpolate3 (double n, double y1, double y2, double y3)
\return interpolation value \param n Interpolation factor \param y1
Argument 1 \param y2 Argument 2 \param y3 Argument 3
Calculate an intermediate value of the 3 arguments for the given
interpolation factor.
|
static double |
ln_interpolate5(double n,
double y1,
double y2,
double y3,
double y4,
double y5)
double ln_interpolate5 (double n, double y1, double y2, double y3, double
y4, double y5) \return interpolation value \param n Interpolation factor
\param y1 Argument 1 \param y2 Argument 2 \param y3 Argument 3 \param y4
Argument 4 \param y5 Argument 5
Calculate an intermediate value of the 5 arguments for the given
interpolation factor.
|
static void |
ln_lnlat_to_hlnlat(LnLnlatPosn pos,
LnhLnlatPosn hpos)
void ln_lnlat_to_hlnlat(LnLnlatPosn pos, LnhLnlatPosn hpos) \brief double
long/lat position to human readable long/lat position \ingroup conversion
|
static double |
ln_rad_to_deg(double radians)
convert radians to degrees
|
static void |
ln_rad_to_dms(double radians,
LnDms dms)
convert radians to dms
|
static void |
ln_rad_to_hms(double radians,
LnHms hms)
convert radians to hh:mm:ss
|
static double |
ln_range_degrees(double angle)
puts a large angle in the correct range 0 - 360 degrees
|
static double |
ln_range_radians(double angle)
puts a large angle in the correct range 0 - 2PI radians
|
static double |
ln_range_radians2(double angle)
preserve sign
|
static double |
nan(String code)
Not a Number function generator
|
static String |
trim(String x)
[]----------------------------------------------------------------------
-- [] | trim() & strip() | | | | strips trailing whitespaces from buf. |
| | [
]------------------------------------------------------------------------
[]
|
public static String ln_get_version()
public static double ln_rad_to_deg(double radians)
public static double ln_deg_to_rad(double degrees)
public static BigDecimal ln_deg_to_rad(BigDecimal degrees)
degrees - public static double ln_hms_to_deg(LnHms hms)
public static double ln_hms_to_rad(LnHms hms)
public static void ln_deg_to_hms(double degrees,
LnHms hms)
public static void ln_rad_to_hms(double radians,
LnHms hms)
public static double ln_dms_to_deg(LnDms dms)
public static double ln_dms_to_rad(LnDms dms)
public static void ln_deg_to_dms(double degrees,
LnDms dms)
public static void ln_rad_to_dms(double radians,
LnDms dms)
public static double ln_range_degrees(double angle)
public static double ln_range_radians(double angle)
public static double ln_range_radians2(double angle)
public static void ln_add_secs_hms(LnHms hms, double seconds)
public static void ln_hequ_to_equ(LnhEquPosn hpos, LnEquPosn pos)
public static void ln_equ_to_hequ(LnEquPosn pos, LnhEquPosn hpos)
public static void ln_hhrz_to_hrz(LnhHrzPosn hpos, LnHrzPosn pos)
public static void ln_hrz_to_hhrz(LnHrzPosn pos, LnhHrzPosn hpos)
public static String ln_hrz_to_nswe(LnHrzPosn pos)
public static void ln_hlnlat_to_lnlat(LnhLnlatPosn hpos, LnLnlatPosn pos)
public static void ln_lnlat_to_hlnlat(LnLnlatPosn pos, LnhLnlatPosn hpos)
public static double ln_get_rect_distance(LnRectPosn a, LnRectPosn b)
public static double ln_get_light_time(double dist)
public static String trim(String x)
public static double ln_get_dec_location(String s)
public static String ln_get_humanr_location(double location)
public static double ln_interpolate3(double n,
double y1,
double y2,
double y3)
public static double ln_interpolate5(double n,
double y1,
double y2,
double y3,
double y4,
double y5)
public static double cbrt(double x)
public static double nan(String code)
Copyright © 2019. All rights reserved.