Here you can find the source of knotsToKmh(Double knots)
public static Double knotsToKmh(Double knots)
//package com.java2s; /**/*from w w w . j a v a2 s .c o m*/ * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ import java.math.BigDecimal; public class Main { private static final BigDecimal KMH_TO_KNOTS = new BigDecimal("0.539956803"); /** * Converts knots to kilometers per hour. */ public static Double knotsToKmh(Double knots) { if (knots == null) { return null; } BigDecimal retour = new BigDecimal(knots); retour = retour.divide(KMH_TO_KNOTS, 2, BigDecimal.ROUND_FLOOR); return retour.doubleValue(); } }