Java BigDecimal getLet(BigDecimal nl, BigDecimal el)

Here you can find the source of getLet(BigDecimal nl, BigDecimal el)

Description

get Let

License

MIT License

Declaration

public static BigDecimal getLet(BigDecimal nl, BigDecimal el) 

Method Source Code


//package com.java2s;
/*/*from ww  w .j a  v a 2 s  .  co  m*/
 * Copyright ? 2007
 * Released under the MIT license
 * http://opensource.org/licenses/mit-license.php
 */

import java.math.BigDecimal;

public class Main {

    public static BigDecimal getLet(BigDecimal nl, BigDecimal el) {
        BigDecimal lat_jp = getLetJp(nl);
        BigDecimal lon_jp = getLonJp(el);
        return lat_jp.subtract(lat_jp.multiply(new BigDecimal(0.00010695)))
                .add(lon_jp.multiply(new BigDecimal(0.000017464))).add(new BigDecimal(0.0046017))
                .setScale(7, BigDecimal.ROUND_HALF_UP);
    }

    public static BigDecimal getLetJp(BigDecimal nl) {
        return nl.divide(new BigDecimal(3600000), 7, BigDecimal.ROUND_HALF_UP);
    }

    public static BigDecimal getLonJp(BigDecimal el) {
        return el.divide(new BigDecimal(3600000), 7, BigDecimal.ROUND_HALF_UP);
    }
}

Related

  1. getFractionalPart(BigDecimal value)
  2. getId(BigDecimal total, BigDecimal step)
  3. getIntLength(BigDecimal val)
  4. getIntValue(BigDecimal b)
  5. getLength(BigDecimal v)
  6. getLetJp(BigDecimal nl)
  7. getLocalHourMinute(BigDecimal gmtHour)
  8. getMaxBigDecimal(@Nonnull final BigDecimal aValue, @Nonnull final BigDecimal... aValues)
  9. getMaxBigDecimal(int precision, int scale)