当前位置: 首页>>代码示例>>Java>>正文


Java OrekitException.getSpecifier方法代码示例

本文整理汇总了Java中org.orekit.errors.OrekitException.getSpecifier方法的典型用法代码示例。如果您正苦于以下问题:Java OrekitException.getSpecifier方法的具体用法?Java OrekitException.getSpecifier怎么用?Java OrekitException.getSpecifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.orekit.errors.OrekitException的用法示例。


在下文中一共展示了OrekitException.getSpecifier方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: refineIntersection

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint refineIntersection(final ExtendedEllipsoid ellipsoid,
                                                  final Vector3D position, final Vector3D los,
                                                  final NormalizedGeodeticPoint closeGuess)
    throws RuggedException {
    try {
        DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
        final Vector3D      p  = ellipsoid.pointAtAltitude(position, los, constantElevation);
        final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
        return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(),
                                           closeGuess.getLongitude());
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:17,代码来源:ConstantElevationAlgorithm.java

示例2: refineIntersection

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint refineIntersection(final ExtendedEllipsoid ellipsoid,
                                                  final Vector3D position, final Vector3D los,
                                                  final NormalizedGeodeticPoint closeGuess)
    throws RuggedException {
    try {
        DumpManager.dumpAlgorithm(AlgorithmId.BASIC_SLOW_EXHAUSTIVE_SCAN_FOR_TESTS_ONLY);
        final Vector3D      delta     = ellipsoid.transform(closeGuess).subtract(position);
        final double        s         = Vector3D.dotProduct(delta, los) / los.getNormSq();
        final GeodeticPoint projected = ellipsoid.transform(new Vector3D(1, position, s, los),
                                                            ellipsoid.getBodyFrame(), null);
        final NormalizedGeodeticPoint normalizedProjected = new NormalizedGeodeticPoint(projected.getLatitude(),
                                                                                        projected.getLongitude(),
                                                                                        projected.getAltitude(),
                                                                                        closeGuess.getLongitude());
        final Tile          tile      = cache.getTile(normalizedProjected.getLatitude(),
                                                      normalizedProjected.getLongitude());
        return tile.cellIntersection(normalizedProjected,
                                     ellipsoid.convertLos(normalizedProjected, los),
                                     tile.getFloorLatitudeIndex(normalizedProjected.getLatitude()),
                                     tile.getFloorLongitudeIndex(normalizedProjected.getLongitude()));
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:27,代码来源:BasicScanAlgorithm.java

示例3: selectInertialFrame

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Select inertial frame.
 * @param inertialFrameId inertial frame identifier
 * @return inertial frame
 * @exception RuggedException if data needed for some frame cannot be loaded
 */
private static Frame selectInertialFrame(final InertialFrameId inertialFrameId)
    throws RuggedException {

    try {
        // set up the inertial frame
        switch (inertialFrameId) {
        case GCRF :
            return FramesFactory.getGCRF();
        case EME2000 :
            return FramesFactory.getEME2000();
        case MOD :
            return FramesFactory.getMOD(IERSConventions.IERS_1996);
        case TOD :
            return FramesFactory.getTOD(IERSConventions.IERS_1996, true);
        case VEIS1950 :
            return FramesFactory.getVeis1950();
        default :
            // this should never happen
            throw RuggedException.createInternalError(null);
        }
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts().clone());
    }

}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:31,代码来源:RuggedBuilder.java

示例4: selectBodyRotatingFrame

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Select body rotating frame.
 * @param bodyRotatingFrame body rotating frame identifier
 * @return body rotating frame
 * @exception RuggedException if data needed for some frame cannot be loaded
 */
private static Frame selectBodyRotatingFrame(final BodyRotatingFrameId bodyRotatingFrame)
    throws RuggedException {

    try {
        // set up the rotating frame
        switch (bodyRotatingFrame) {
        case ITRF :
            return FramesFactory.getITRF(IERSConventions.IERS_2010, true);
        case ITRF_EQUINOX :
            return FramesFactory.getITRFEquinox(IERSConventions.IERS_1996, true);
        case GTOD :
            return FramesFactory.getGTOD(IERSConventions.IERS_1996, true);
        default :
            // this should never happen
            throw RuggedException.createInternalError(null);
        }
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts().clone());
    }

}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:27,代码来源:RuggedBuilder.java

示例5: pointOnGround

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Get point on ground along a pixel line of sight.
 * @param position cell position (in body frame)
 * @param los pixel line-of-sight, not necessarily normalized (in body frame)
 * @param centralLongitude reference longitude lc such that the point longitude will
 * be normalized between lc-π and lc+π
 * @return point on ground
 * @exception RuggedException if no such point exists (typically line-of-sight missing body)
 */
public NormalizedGeodeticPoint pointOnGround(final Vector3D position, final Vector3D los,
                                             final double centralLongitude)
    throws RuggedException {
    try {
        DumpManager.dumpEllipsoid(this);
        final GeodeticPoint gp =
                getIntersectionPoint(new Line(position, new Vector3D(1, position, 1e6, los), 1.0e-12),
                                     position, getBodyFrame(), null);
        if (gp == null) {
            throw new RuggedException(RuggedMessages.LINE_OF_SIGHT_DOES_NOT_REACH_GROUND);
        }
        return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(),
                                           centralLongitude);
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:26,代码来源:ExtendedEllipsoid.java

示例6: convertLos

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Convert a line-of-sight from Cartesian to topocentric.
 * @param primary reference point on the line-of-sight (in body frame and Cartesian coordinates)
 * @param secondary secondary point on the line-of-sight, only used to define a direction
 * with respect to the primary point (in body frame and Cartesian coordinates)
 * @return line-of-sight in topocentric frame (East, North, Zenith) of the point,
 * scaled to match radians in the horizontal plane and meters along the vertical axis
 * @exception RuggedException if points cannot be converted to geodetic coordinates
 */
public Vector3D convertLos(final Vector3D primary, final Vector3D secondary)
    throws RuggedException {
    try {

        // switch to geodetic coordinates using primary point as reference
        final GeodeticPoint point = transform(primary, getBodyFrame(), null);
        final Vector3D      los   = secondary.subtract(primary);

        // convert line of sight
        return convertLos(point, los);

    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:24,代码来源:ExtendedEllipsoid.java

示例7: parse

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void parse(final int l, final File file, final String line, final String[] fields, final DumpReplayer global)
    throws RuggedException {
    if (fields.length < 6 || !fields[0].equals(AE) || !fields[2].equals(F) || !fields[4].equals(FRAME)) {
        throw new RuggedException(RuggedMessages.CANNOT_PARSE_LINE, l, file, line);
    }
    final double ae   = Double.parseDouble(fields[1]);
    final double f    = Double.parseDouble(fields[3]);
    final Frame  bodyFrame;
    try {
        bodyFrame = FramesFactory.getFrame(Predefined.valueOf(fields[5]));
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    } catch (IllegalArgumentException iae) {
        throw new RuggedException(RuggedMessages.CANNOT_PARSE_LINE, l, file, line);
    }
    global.ellipsoid = new OneAxisEllipsoid(ae, f, bodyFrame);
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:20,代码来源:DumpReplayer.java

示例8: intersection

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint intersection(final ExtendedEllipsoid ellipsoid,
                                            final Vector3D position, final Vector3D los)
    throws RuggedException {
    try {
        DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
        final Vector3D      p  = ellipsoid.pointAtAltitude(position, los, constantElevation);
        final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
        return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(), 0.0);
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:15,代码来源:ConstantElevationAlgorithm.java

示例9: convertDate

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Convert a date to string with high accuracy.
 * @param date computation date
 * @return converted date
 * @exception RuggedException if date cannot be converted to UTC
 */
private String convertDate(final AbsoluteDate date)
    throws RuggedException {
    try {
        final DateTimeComponents dt = date.getComponents(TimeScalesFactory.getUTC());
        return String.format(Locale.US, "%04d-%02d-%02dT%02d:%02d:%017.14fZ",
                             dt.getDate().getYear(), dt.getDate().getMonth(), dt.getDate().getDay(),
                             dt.getTime().getHour(), dt.getTime().getMinute(), dt.getTime().getSecond());
    } catch (OrekitException oe) {
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:17,代码来源:Dump.java

示例10: pointAtAltitude

import org.orekit.errors.OrekitException; //导入方法依赖的package包/类
/** Get point at some altitude along a pixel line of sight.
 * @param position cell position (in body frame)
 * @param los pixel line-of-sight, not necessarily normalized (in body frame)
 * @param altitude altitude with respect to ellipsoid
 * @return point at altitude
 * @exception RuggedException if no such point exists (typically too negative altitude)
 */
public Vector3D pointAtAltitude(final Vector3D position, final Vector3D los, final double altitude)
    throws RuggedException {
    try {

        DumpManager.dumpEllipsoid(this);

        // point on line closest to origin
        final double   los2   = los.getNormSq();
        final double   dot    = Vector3D.dotProduct(position, los);
        final double   k0     = -dot / los2;
        final Vector3D close0 = new Vector3D(1, position, k0, los);

        // very rough guess: if body is spherical, the desired point on line
        // is at distance ae + altitude from origin
        final double r        = getEquatorialRadius() + altitude;
        final double delta2   = r * r - close0.getNormSq();
        if (delta2 < 0) {
            throw new RuggedException(RuggedMessages.LINE_OF_SIGHT_NEVER_CROSSES_ALTITUDE, altitude);
        }
        final double deltaK   = FastMath.sqrt(delta2 / los2);
        final double k1       = k0 + deltaK;
        final double k2       = k0 - deltaK;
        double k              = (FastMath.abs(k1) <= FastMath.abs(k2)) ? k1 : k2;

        // this loop generally converges in 3 iterations
        for (int i = 0; i < 100; ++i) {

            final Vector3D      point   = new Vector3D(1, position, k, los);
            final GeodeticPoint gpK     = transform(point, getBodyFrame(), null);
            final double        deltaH  = altitude - gpK.getAltitude();
            if (FastMath.abs(deltaH) <= ALTITUDE_CONVERGENCE) {
                return point;
            }

            // improve the offset using linear ratio between
            // altitude variation and displacement along line-of-sight
            k += deltaH / Vector3D.dotProduct(gpK.getZenith(), los);

        }

        // this should never happen
        throw new RuggedException(RuggedMessages.LINE_OF_SIGHT_NEVER_CROSSES_ALTITUDE, altitude);

    } catch (OrekitException oe) {
        // this should never happen
        throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
    }
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:56,代码来源:ExtendedEllipsoid.java


注:本文中的org.orekit.errors.OrekitException.getSpecifier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。