wonderly.jeaprs.aprs.data
Class Distance
java.lang.Object
|
+--wonderly.jeaprs.aprs.data.Distance
- public class Distance
- extends java.lang.Object
This class provides geographical distance calculations using integer math
with static tables. This eliminates the use of floating point, but with
a loss of some precision.
- Version:
- 1.0
- Author:
- Gregg Wonderly -
The information contained in this document is Copyright 2001-2003,
Gregg Wonderly, all rights reserved.
Method Summary |
static long |
stationDistanceMiles(long lt1,
long lg1,
long lt2,
long lg2)
Fixed point calculation of distance between two points. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
onePointOneSix
public static final long onePointOneSix
kiloPerDegree
public static final long kiloPerDegree
Distance
public Distance()
stationDistanceMiles
public static long stationDistanceMiles(long lt1,
long lg1,
long lt2,
long lg2)
- Fixed point calculation of distance between two points. Error is about
1.5 miles at 15 miles distance due to rounding.