Example usage for org.apache.commons.math3.analysis.function Atanh Atanh

List of usage examples for org.apache.commons.math3.analysis.function Atanh Atanh

Introduction

In this page you can find the example usage for org.apache.commons.math3.analysis.function Atanh Atanh.

Prototype

Atanh

Source Link

Usage

From source file:org.cirdles.ambapo.LatLongToUTM.java

/**
 * Eccentricity helps define the shape of the ellipsoidal representation of
 * the earth//  ww w  .j a  v a2s  .  c o  m
 * 
 * Conformal latitude gives an angle-preserving (conformal) transformation 
 * to the sphere
 * 
 * It defines a transformation from the ellipsoid to a sphere 
 * of arbitrary radius such that the angle of intersection between any two 
 * lines on the ellipsoid is the same as the corresponding angle on the sphere.
 * 
 * @param eccentricity
 * @param latitudeRadians
 * @return BigDecimal conformal latitude
 * 
         
 */
private static BigDecimal calcConformalLatitude(BigDecimal eccentricity, BigDecimal latitudeRadians) {

    BigDecimal conformalLatitude;

    double latRadDouble = latitudeRadians.doubleValue();
    double eccDouble = eccentricity.doubleValue();
    double confLatDouble;

    Atanh atanh = new Atanh();
    Asinh asinh = new Asinh();

    confLatDouble = Math.atan(Math.sinh(
            asinh.value(Math.tan(latRadDouble)) - eccDouble * atanh.value(eccDouble * Math.sin(latRadDouble))));

    conformalLatitude = new BigDecimal(confLatDouble);

    return conformalLatitude;

}

From source file:org.cirdles.ambapo.UTMToLatLong.java

/**
 * /*from  w  w  w. j a  va 2 s.c o m*/
 * @param eccentricity
 * @param tau
 * @return sigma
 */
private static BigDecimal calcSigma(BigDecimal eccentricity, BigDecimal tau) {

    double eccentricityDouble = eccentricity.doubleValue();
    double tauDouble = tau.doubleValue();

    Atanh atanh = new Atanh();
    double sigmaDouble = Math.sinh(eccentricityDouble
            * (atanh.value(eccentricityDouble * tauDouble / Math.sqrt(1 + Math.pow(tauDouble, 2)))));

    BigDecimal sigma = new BigDecimal(sigmaDouble);

    return sigma;

}

From source file:org.cirdles.geoapp.LatLongToUTM.java

private static BigDecimal calcConformalLatitude(BigDecimal eccentricity, BigDecimal latitudeRadians) {

    BigDecimal conformalLatitude;

    double latRadDouble = latitudeRadians.doubleValue();
    double eccDouble = eccentricity.doubleValue();
    double confLatDouble;

    Atanh atanh = new Atanh();
    Asinh asinh = new Asinh();

    confLatDouble = Math.atan(Math.sinh(
            asinh.value(Math.tan(latRadDouble)) - eccDouble * atanh.value(eccDouble * Math.sin(latRadDouble))));

    conformalLatitude = new BigDecimal(confLatDouble);

    return conformalLatitude;

}