本文整理汇总了Java中gov.nasa.worldwind.globes.Earth.WGS84_EQUATORIAL_RADIUS属性的典型用法代码示例。如果您正苦于以下问题:Java Earth.WGS84_EQUATORIAL_RADIUS属性的具体用法?Java Earth.WGS84_EQUATORIAL_RADIUS怎么用?Java Earth.WGS84_EQUATORIAL_RADIUS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gov.nasa.worldwind.globes.Earth
的用法示例。
在下文中一共展示了Earth.WGS84_EQUATORIAL_RADIUS属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMaxEffectiveAltitude
public Double getMaxEffectiveAltitude(Double radius)
{
if (radius == null)
radius = Earth.WGS84_EQUATORIAL_RADIUS;
// Find first non-empty level. Compute altitude at which it comes into effect.
for (int i = 0; i < this.getLevels().getLastLevel().getLevelNumber(); i++)
{
if (this.levels.isLevelEmpty(i))
continue;
// Compute altitude associated with the cell height at which it would switch if it had a lower-res level.
// That cell height is twice that of the current lowest-res level.
double texelSize = this.levels.getLevel(i).getTexelSize();
double cellHeight = 2 * radius * texelSize;
return cellHeight * Math.pow(10, this.getDetailFactor());
}
return null;
}
示例2: getMinEffectiveAltitude
public Double getMinEffectiveAltitude(Double radius)
{
if (radius == null)
radius = Earth.WGS84_EQUATORIAL_RADIUS;
// Get the cell size for the highest-resolution level.
double texelSize = this.getLevels().getLastLevel().getTexelSize();
double cellHeight = radius * texelSize;
// Compute altitude associated with the cell height at which it would switch if it had higher-res levels.
return cellHeight * Math.pow(10, this.getDetailFactor());
}
示例3: distance
/**
* Distance between two points on the globe (in km)
*
* @param point1
* @param point2
* @param globe
* @return
*/
public static int distance(final RoutePoint point1, final RoutePoint point2) {
final LatLon ll1 = new LatLon(Angle.fromDegrees(point1.getLat()), Angle.fromDegrees(point1.getLon()));
final LatLon ll2 = new LatLon(Angle.fromDegrees(point2.getLat()), Angle.fromDegrees(point2.getLon()));
return (int) (Earth.WGS84_EQUATORIAL_RADIUS * LatLon.greatCircleDistance(ll1, ll2).getRadians() / 1000);
}