本文整理汇总了Java中org.apache.commons.math3.util.FastMath.toRadians方法的典型用法代码示例。如果您正苦于以下问题:Java FastMath.toRadians方法的具体用法?Java FastMath.toRadians怎么用?Java FastMath.toRadians使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.util.FastMath
的用法示例。
在下文中一共展示了FastMath.toRadians方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertFromGeoToEarthCentred
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
/**
*
* @param lat
* @param lon
* @return
*/
public static double[] convertFromGeoToEarthCentred(final double lat, final double lon){
double pH=GeoUtils.getGeoidH(lon, lat);
double radLat=FastMath.toRadians(lat);
double radLon=FastMath.toRadians(lon);
// Convert from geographic coordinates to Earth centred Earth fixed coordinates
double cosLat=FastMath.cos(radLat);
double sinLat = FastMath.sin(radLat);
double cosLon =FastMath.cos(radLon);
double sinLon = FastMath.sin(radLon);
double denomTmp = FastMath.sqrt((semiMajorAxis2) *(cosLat*cosLat) + (semiMinorAxis2)*(sinLat*sinLat));
double pX = (semiMajorAxis2/denomTmp + pH) * cosLat * cosLon;
double pY = (semiMajorAxis2/denomTmp + pH) * cosLat * sinLon;
double pZ = (semiMinorAxis2/denomTmp + pH) * sinLat;
double[] pXYZ = {pX ,pY, pZ};
//double[] pXYZ = {4740162.032532615 , 787287.082659188, 4180253.542739194};
return pXYZ;
}
示例2: getIncidence
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
/**
* Calculate the incidence angle
*/
public double getIncidence(int position) {
double incidenceangle = 0.0;
try{
// estimation of incidence angle based on near and range distance values
double nearincidence = FastMath.toRadians(getIncidenceNear().doubleValue());
double sataltitude=getSatelliteAltitude();
double distancerange = sataltitude * FastMath.tan(nearincidence) + position * this.getPixelsize()[0];
incidenceangle = FastMath.atan(distancerange / sataltitude);
}catch(Exception e){
logger.warn("Error calculatiing incidence angle:"+e.getMessage());
}
return incidenceangle;
}
示例3: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double[] lonlat=geotransform.getGeoFromPixel(xPos, yPos);
double slantRange = getSlanteRange(lonlat[1], lonlat[0]);
// double sold=getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[1];
double sampleDistRange= getPixelsize()[0];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage(),ex);
}
return output;
}
示例4: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
if(satelliteSpeed==0){
satelliteSpeed = calcSatelliteSpeed();
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
}
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double slantRange = getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[0];
double sampleDistRange =getPixelsize()[1];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage());
}
return output;
}
示例5: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
if(satelliteSpeed==0){
satelliteSpeed = calcSatelliteSpeed();
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
}
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double slantRange = getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[0];
double sampleDistRange =getPixelsize()[1];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage());
}
return output;
}
示例6: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
if(satelliteSpeed==0){
satelliteSpeed = calcSatelliteSpeed();
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
}
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double slantRange = getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[0];
double sampleDistRange =getPixelsize()[1];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage());
}
return output;
}
示例7: toRadians
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
/** Convert degrees to radians, with error of less than 0.5 ULP
* @return instance converted into radians
*/
public DerivativeStructure toRadians() {
final DerivativeStructure ds = new DerivativeStructure(compiler);
for (int i = 0; i < ds.data.length; ++i) {
ds.data[i] = FastMath.toRadians(data[i]);
}
return ds;
}
示例8: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
if(satelliteSpeed==0){
satelliteSpeed = calcSatelliteSpeed();
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
}
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double slantRange = getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[0];
double sampleDistRange =getPixelsize()[1];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
if ((getSatellite()).equals("RADARSAT")) {
String myImageType = getType();
if (myImageType.equals("RSAT-1-SAR-SGF") || myImageType.equals("RSAT-1-SAR-SGX")) {
output[1] = 20; // This is really range displacement
}
}
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage());
}
return output;
}
示例9: getAmbiguityCorrection
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
@Override
public int[] getAmbiguityCorrection(final int xPos,final int yPos) {
if(satelliteSpeed==0){
satelliteSpeed = calcSatelliteSpeed();
orbitInclination = FastMath.toRadians(getSatelliteOrbitInclination());
}
double temp, deltaAzimuth, deltaRange;
int[] output = new int[2];
try {
// already in radian
double incidenceAngle = getIncidence(xPos);
double slantRange = getSlantRange(xPos,incidenceAngle);
double prf = getPRF(xPos,yPos);
double sampleDistAzim = getPixelsize()[0];
double sampleDistRange =getPixelsize()[1];
temp = (getRadarWaveLenght() * slantRange * prf) /
(2 * satelliteSpeed * (1 - FastMath.cos(orbitInclination) / getRevolutionsPerday()));
//azimuth and delta in number of pixels
deltaAzimuth = temp / sampleDistAzim;
deltaRange = (temp * temp) / (2 * slantRange * sampleDistRange * FastMath.sin(incidenceAngle));
output[0] = (int) FastMath.floor(deltaAzimuth);
output[1] = (int) FastMath.floor(deltaRange);
if ((getSatellite()).equals("RADARSAT")) {
String myImageType = getType();
if (myImageType.equals("RSAT-1-SAR-SGF") || myImageType.equals("RSAT-1-SAR-SGX")) {
output[1] = 20; // This is really range displacement
}
}
} catch (Exception ex) {
logger.error("Problem calculating the Azimuth ambiguity:"+ex.getMessage());
}
return output;
}
示例10: toRadians
import org.apache.commons.math3.util.FastMath; //导入方法依赖的package包/类
/** Convert degrees to radians, with error of less than 0.5 ULP
* @return instance converted into radians
*/
public SparseGradient toRadians() {
return new SparseGradient(FastMath.toRadians(value), FastMath.toRadians(1.0), derivatives);
}