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


Java AbsoluteDate类代码示例

本文整理汇总了Java中org.orekit.time.AbsoluteDate的典型用法代码示例。如果您正苦于以下问题:Java AbsoluteDate类的具体用法?Java AbsoluteDate怎么用?Java AbsoluteDate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: orbitToQ

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private List<TimeStampedAngularCoordinates> orbitToQ(Orbit orbit, BodyShape earth,
                                                     AbsoluteDate minDate, AbsoluteDate maxDate,
                                                     double step)
    throws OrekitException {
    Propagator propagator = new KeplerianPropagator(orbit);
    propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth)));
    propagator.propagate(minDate);
    final List<TimeStampedAngularCoordinates> list = new ArrayList<TimeStampedAngularCoordinates>();
    propagator.setMasterMode(step, new OrekitFixedStepHandler() {
        public void init(SpacecraftState s0, AbsoluteDate t) {
        }   
        public void handleStep(SpacecraftState currentState, boolean isLast) {
            list.add(new TimeStampedAngularCoordinates(currentState.getDate(),
                                                       currentState.getAttitude().getRotation(),
                                                       Vector3D.ZERO, Vector3D.ZERO));
        }
    });
    propagator.propagate(maxDate);
    return list;
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:21,代码来源:RuggedBuilderTest.java

示例2: createOrbit

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private Orbit createOrbit(double mu)
                throws OrekitException {
    // the following orbital parameters have been computed using
    // Orekit tutorial about phasing, using the following configuration:
    //
    //  orbit.date                          = 2012-01-01T00:00:00.000
    //  phasing.orbits.number               = 143
    //  phasing.days.number                 =  10
    //  sun.synchronous.reference.latitude  = 0
    //  sun.synchronous.reference.ascending = false
    //  sun.synchronous.mean.solar.time     = 10:30:00
    //  gravity.field.degree                = 12
    //  gravity.field.order                 = 12
    AbsoluteDate date = new AbsoluteDate("2012-01-01T00:00:00.000", TimeScalesFactory.getUTC());
    Frame eme2000 = FramesFactory.getEME2000();
    return new CircularOrbit(7173352.811913891,
                             -4.029194321683225E-4, 0.0013530362644647786,
                             FastMath.toRadians(98.63218182243709),
                             FastMath.toRadians(77.55565567747836),
                             FastMath.PI, PositionAngle.TRUE,
                             eme2000, date, mu);
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:23,代码来源:RoughVisibilityEstimatorTest.java

示例3: orbitToQ

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
public static List<TimeStampedAngularCoordinates> orbitToQ(Orbit orbit, BodyShape earth,
                                                     AbsoluteDate minDate, AbsoluteDate maxDate,
                                                     double step)
    throws OrekitException {
    Propagator propagator = new KeplerianPropagator(orbit);
    propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth)));
    propagator.propagate(minDate);
    final List<TimeStampedAngularCoordinates> list = new ArrayList<TimeStampedAngularCoordinates>();
    propagator.setMasterMode(step, new OrekitFixedStepHandler() {
        public void init(SpacecraftState s0, AbsoluteDate t) {
        }   
        public void handleStep(SpacecraftState currentState, boolean isLast) {
            list.add(new TimeStampedAngularCoordinates(currentState.getDate(),
                                                       currentState.getAttitude().getRotation(),
                                                       Vector3D.ZERO, Vector3D.ZERO));
        }
    });
    propagator.propagate(maxDate);
    return list;
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:21,代码来源:TestUtils.java

示例4: createOrbit

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
public static Orbit createOrbit(double mu)
    throws OrekitException {
    // the following orbital parameters have been computed using
    // Orekit tutorial about phasing, using the following configuration:
    //
    //  orbit.date                          = 2012-01-01T00:00:00.000
    //  phasing.orbits.number               = 143
    //  phasing.days.number                 =  10
    //  sun.synchronous.reference.latitude  = 0
    //  sun.synchronous.reference.ascending = false
    //  sun.synchronous.mean.solar.time     = 10:30:00
    //  gravity.field.degree                = 12
    //  gravity.field.order                 = 12
    AbsoluteDate date = new AbsoluteDate("2012-01-01T00:00:00.000", TimeScalesFactory.getUTC());
    Frame eme2000 = FramesFactory.getEME2000();
    return new CircularOrbit(7173352.811913891,
                             -4.029194321683225E-4, 0.0013530362644647786,
                             FastMath.toRadians(98.63218182243709),
                             FastMath.toRadians(77.55565567747836),
                             FastMath.PI, PositionAngle.TRUE,
                             eme2000, date, mu);
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:23,代码来源:TestUtils.java

示例5: SpacecraftToObservedBody

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
/** Simple constructor.
 * @param inertialFrame inertial frame
 * @param bodyFrame observed body frame
 * @param minDate start of search time span
 * @param maxDate end of search time span
 * @param tStep step to use for inertial frame to body frame transforms cache computations
 * @param overshootTolerance tolerance in seconds allowed for {@code minDate} and {@code maxDate} overshooting
 * slightly the position, velocity and quaternions ephemerides
 * @param bodyToInertial transforms sample from observed body frame to inertial frame
 * @param scToInertial transforms sample from spacecraft frame to inertial frame
 */
public SpacecraftToObservedBody(final Frame inertialFrame, final Frame bodyFrame,
                                final AbsoluteDate minDate, final AbsoluteDate maxDate, final double tStep,
                                final double overshootTolerance,
                                final List<Transform> bodyToInertial, final List<Transform> scToInertial) {

    this.inertialFrame      = inertialFrame;
    this.bodyFrame          = bodyFrame;
    this.minDate            = minDate;
    this.maxDate            = maxDate;
    this.tStep              = tStep;
    this.overshootTolerance = overshootTolerance;
    this.bodyToInertial     = bodyToInertial;
    this.scToInertial       = scToInertial;

    this.inertialToBody = new ArrayList<Transform>(bodyToInertial.size());
    for (final Transform b2i : bodyToInertial) {
        inertialToBody.add(b2i.getInverse());
    }

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

示例6: interpolate

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
/** Interpolate transform.
 * @param date date of the transform
 * @param list transforms list to interpolate from
 * @return interpolated transform
 * @exception RuggedException if frames cannot be computed at date
 */
private Transform interpolate(final AbsoluteDate date, final List<Transform> list)
    throws RuggedException {

    // check date range
    if (!isInRange(date)) {
        throw new RuggedException(RuggedMessages.OUT_OF_TIME_RANGE, date, minDate, maxDate);
    }

    final double    s     = date.durationFrom(list.get(0).getDate()) / tStep;
    final int       index = FastMath.max(0, FastMath.min(list.size() - 1, (int) FastMath.rint(s)));

    DumpManager.dumpTransform(this, index, bodyToInertial.get(index), scToInertial.get(index));

    final Transform close = list.get(index);
    return close.shiftedBy(date.durationFrom(close.getDate()));

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

示例7: parse

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void parse(final int l, final File file, final String line, final String[] fields, final DumpReplayer global)
    throws RuggedException {
    try {
        if (fields.length < 10 || !fields[0].equals(SENSOR_NAME) ||
                !fields[2].equals(DATE) || !fields[4].equals(PIXEL_NUMBER) ||
                !fields[6].equals(LOS)) {
            throw new RuggedException(RuggedMessages.CANNOT_PARSE_LINE, l, file, line);
        }
        final String       sensorName  = fields[1];
        final AbsoluteDate date        = new AbsoluteDate(fields[3], TimeScalesFactory.getUTC());
        final int          pixelNumber = Integer.parseInt(fields[5]);
        final Vector3D     los         = new Vector3D(Double.parseDouble(fields[7]),
                                                      Double.parseDouble(fields[8]),
                                                      Double.parseDouble(fields[9]));
        global.getSensor(sensorName).setLOS(date, pixelNumber, los);

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

示例8: getLine

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public double getLine(final AbsoluteDate date) {

    if (datation.size() < 2) {
        return datation.get(0).getFirst();
    }

    // find entries bracketing the date
    int sup = 0;
    while (sup < datation.size() - 1) {
        if (datation.get(sup).getSecond().compareTo(date) >= 0) {
            break;
        }
        ++sup;
    }
    final int inf = (sup == 0) ? sup++ : (sup - 1);

    final double       lInf  = datation.get(inf).getFirst();
    final AbsoluteDate dInf  = datation.get(inf).getSecond();
    final double       lSup  = datation.get(sup).getFirst();
    final AbsoluteDate dSup  = datation.get(sup).getSecond();
    final double       alpha = date.durationFrom(dInf) / dSup.durationFrom(dInf);
    return alpha * lSup + (1 - alpha) * lInf;

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

示例9: orbitToPV

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
public static List<TimeStampedPVCoordinates> orbitToPV(Orbit orbit, BodyShape earth,
                                                 AbsoluteDate minDate, AbsoluteDate maxDate,
                                                 double step)
    throws OrekitException {
    Propagator propagator = new KeplerianPropagator(orbit);
    propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth)));
    propagator.propagate(minDate);
    final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>();
    propagator.setMasterMode(step, new OrekitFixedStepHandler() {
        public void init(SpacecraftState s0, AbsoluteDate t) {
        }   
        public void handleStep(SpacecraftState currentState, boolean isLast) {
            list.add(new TimeStampedPVCoordinates(currentState.getDate(),
                                                  currentState.getPVCoordinates().getPosition(),
                                                  currentState.getPVCoordinates().getVelocity(),
                                                  Vector3D.ZERO));
        }
    });
    propagator.propagate(maxDate);
    return list;
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:22,代码来源:TestUtils.java

示例10: transformLOS

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public FieldVector3D<DerivativeStructure> transformLOS(final int i, final FieldVector3D<DerivativeStructure> los,
                                                       final AbsoluteDate date) {

    // evaluate polynomial, with all its partial derivatives
    final double t = date.durationFrom(referenceDate);
    DerivativeStructure alpha = axisDS.getX().getField().getZero();
    for (int k = angleDS.length - 1; k >= 0; --k) {
        alpha = alpha.multiply(t).add(angleDS[k]);
    }

    return new FieldRotation<DerivativeStructure>(axisDS, alpha).applyTo(los);

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

示例11: createInterpolator

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private SpacecraftToObservedBody createInterpolator(LineSensor sensor)
    throws RuggedException, OrekitException {
    Orbit orbit = new CircularOrbit(7173352.811913891,
                                    -4.029194321683225E-4, 0.0013530362644647786,
                                    FastMath.toRadians(98.63218182243709),
                                    FastMath.toRadians(77.55565567747836),
                                    FastMath.PI, PositionAngle.TRUE,
                                    FramesFactory.getEME2000(), sensor.getDate(1000),
                                    Constants.EIGEN5C_EARTH_MU);
    BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
                                           Constants.WGS84_EARTH_FLATTENING,
                                           FramesFactory.getITRF(IERSConventions.IERS_2010, true));
    AbsoluteDate minDate = sensor.getDate(0);
    AbsoluteDate maxDate = sensor.getDate(2000);
    return new SpacecraftToObservedBody(orbit.getFrame(), earth.getBodyFrame(),
                                        minDate, maxDate, 0.01,
                                        5.0,
                                        orbitToPV(orbit, earth, minDate, maxDate, 0.25), 2,
                                        CartesianDerivativesFilter.USE_P,
                                        orbitToQ(orbit, earth, minDate, maxDate, 0.25), 2,
                                        AngularDerivativesFilter.USE_R);
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:23,代码来源:SensorMeanPlaneCrossingTest.java

示例12: orbitToPV

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private List<TimeStampedPVCoordinates> orbitToPV(Orbit orbit, BodyShape earth,
                                                 AbsoluteDate minDate, AbsoluteDate maxDate,
                                                 double step)
    throws OrekitException {
    Propagator propagator = new KeplerianPropagator(orbit);
    propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth)));
    propagator.propagate(minDate);
    final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>();
    propagator.setMasterMode(step, new OrekitFixedStepHandler() {
        public void init(SpacecraftState s0, AbsoluteDate t) {
        }   
        public void handleStep(SpacecraftState currentState, boolean isLast) {
            list.add(new TimeStampedPVCoordinates(currentState.getDate(),
                                                  currentState.getPVCoordinates().getPosition(),
                                                  currentState.getPVCoordinates().getVelocity(),
                                                  Vector3D.ZERO));
        }
    });
    propagator.propagate(maxDate);
    return list;
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:22,代码来源:SensorMeanPlaneCrossingTest.java

示例13: addSatellitePV

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private static void addSatellitePV(TimeScale gps, Frame eme2000, Frame itrf,
                              ArrayList<TimeStampedPVCoordinates> satellitePVList,
                              String absDate,
                              double px, double py, double pz, double vx, double vy, double vz)
    throws OrekitException {
    AbsoluteDate ephemerisDate = new AbsoluteDate(absDate, gps);
    Vector3D position = new Vector3D(px, py, pz);
    Vector3D velocity = new Vector3D(vx, vy, vz);
    PVCoordinates pvITRF = new PVCoordinates(position, velocity);
    Transform transform = itrf.getTransformTo(eme2000, ephemerisDate);
    PVCoordinates pvEME2000 = transform.transformPVCoordinates(pvITRF); 
    satellitePVList.add(new TimeStampedPVCoordinates(ephemerisDate, pvEME2000.getPosition(), pvEME2000.getVelocity(), Vector3D.ZERO));
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:14,代码来源:InverseLocation.java

示例14: addSatelliteQ

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private static void addSatelliteQ(TimeScale gps, ArrayList<TimeStampedAngularCoordinates> satelliteQList, String absDate,
                                  double q0, double q1, double q2, double q3) {
    AbsoluteDate attitudeDate = new AbsoluteDate(absDate, gps);
    Rotation rotation = new Rotation(q0, q1, q2, q3, true);
    TimeStampedAngularCoordinates pair =
            new TimeStampedAngularCoordinates(attitudeDate, rotation, Vector3D.ZERO, Vector3D.ZERO);
    satelliteQList.add(pair);
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:9,代码来源:DirectLocation.java

示例15: addSatellitePV

import org.orekit.time.AbsoluteDate; //导入依赖的package包/类
private static void addSatellitePV(TimeScale gps, Frame eme2000, Frame itrf,
                              ArrayList<TimeStampedPVCoordinates> satellitePVList,
                              String absDate,
                              double px, double py, double pz, double vx, double vy, double vz)
    throws OrekitException {
    AbsoluteDate ephemerisDate = new AbsoluteDate(absDate, gps);
    Vector3D position = new Vector3D(px, py, pz);
    Vector3D velocity = new Vector3D(vx, vy, vz);
    PVCoordinates pvITRF = new PVCoordinates(position, velocity);
    Transform transform = itrf.getTransformTo(eme2000, ephemerisDate);        
    PVCoordinates pvEME2000 = transform.transformPVCoordinates(pvITRF); 
    satellitePVList.add(new TimeStampedPVCoordinates(ephemerisDate, pvEME2000.getPosition(), pvEME2000.getVelocity(), Vector3D.ZERO));

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


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