List of utility methods to do Kilometer Convert to
float | kmToKnots(int km) Convert kilometers into international nautical miles . return (float) (km / KnotsToKm); |
double | kmToMiles(double k) km To Miles return k / KilometersPerMile;
|
double[] | kmToRtheta(final double x, final double y) Converts km from radar to range/heading double range = 1e3 * Math.sqrt(x * x + y * y); double azimuth = 90 - Math.toDegrees(Math.PI / 2 - Math.atan2(x, y)); if (azimuth < 0) azimuth += 360; return new double[] { range, azimuth }; |