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


Java OneAxisEllipsoid类代码示例

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


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

示例1: selectEllipsoid

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
/** Select ellipsoid.
 * @param ellipsoidID reference ellipsoid identifier
 * @param bodyFrame body rotating frame
 * @return selected ellipsoid
 */
private static OneAxisEllipsoid selectEllipsoid(final EllipsoidId ellipsoidID, final Frame bodyFrame) {

    // set up the ellipsoid
    switch (ellipsoidID) {
    case GRS80 :
        return new OneAxisEllipsoid(6378137.0, 1.0 / 298.257222101, bodyFrame);
    case WGS84 :
        return new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
                                    Constants.WGS84_EARTH_FLATTENING,
                                    bodyFrame);
    case IERS96 :
        return new OneAxisEllipsoid(6378136.49, 1.0 / 298.25645, bodyFrame);
    case IERS2003 :
        return new OneAxisEllipsoid(6378136.6, 1.0 / 298.25642, bodyFrame);
    default :
        // this should never happen
        throw RuggedException.createInternalError(null);
    }

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

示例2: parse

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的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

示例3: createInterpolator

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的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

示例4: setProperties

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
@Override
public void setProperties(double equatorialRadius, double flattening, double gm)
{
    try
    {
        this.bodyShape = new OneAxisEllipsoid(equatorialRadius,
                                              flattening,
                                              body.getBodyOrientedFrame());
    }
    catch (OrekitException e)
    {
        throw new RuntimeException("Unable to change the equatorial radius.", e);
    }

    // no exception thrown. change the properties.
    super.setProperties(equatorialRadius, flattening, gm);
}
 
开发者ID:vobject,项目名称:maru,代码行数:18,代码来源:OrekitCentralBody.java

示例5: setEllipsoid

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
/** Set the reference ellipsoid.
 * @param ellipsoid reference ellipsoid
 * @return the builder instance
 * @exception RuggedException if trajectory has been
 * {@link #setTrajectoryAndTimeSpan(InputStream) recovered} from an earlier run and frames mismatch
 * @see #setEllipsoid(EllipsoidId, BodyRotatingFrameId)
 * @see #getEllipsoid()
 */
// CHECKSTYLE: stop HiddenField check
public RuggedBuilder setEllipsoid(final OneAxisEllipsoid ellipsoid)
    throws RuggedException {
    // CHECKSTYLE: resume HiddenField check
    this.ellipsoid = new ExtendedEllipsoid(ellipsoid.getEquatorialRadius(),
                                           ellipsoid.getFlattening(),
                                           ellipsoid.getBodyFrame());
    checkFramesConsistency();
    return this;
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:19,代码来源:RuggedBuilder.java

示例6: RoughVisibilityEstimator

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
/**
 * Simple constructor.
 * @param ellipsoid ground ellipsoid
 * @param frame frame in which position and velocity are defined (may be inertial or body frame)
 * @param positionsVelocities satellite position and velocity (m and m/s in specified frame)
 * @exception OrekitException if position-velocity cannot be converted to body frame
 */
public RoughVisibilityEstimator(final OneAxisEllipsoid ellipsoid, final Frame frame,
                                final List<TimeStampedPVCoordinates> positionsVelocities)
    throws OrekitException {

    this.ellipsoid = ellipsoid;

    // project spacecraft position-velocity to ground
    final Frame bodyFrame = ellipsoid.getBodyFrame();
    final int n = positionsVelocities.size();
    this.pvGround = new ArrayList<TimeStampedPVCoordinates>(n);
    for (final TimeStampedPVCoordinates pv : positionsVelocities) {
        final Transform t = frame.getTransformTo(bodyFrame, pv.getDate());
        pvGround.add(ellipsoid.projectToGround(t.transformPVCoordinates(pv), bodyFrame));
    }

    // initialize first search at mid point
    this.last = n / 2;

    // estimate mean angular rate with respect to indices
    double alpha = 0;
    for (int i = 0; i < n - 1; ++i) {
        // angular motion between points i and i+1
        alpha += Vector3D.angle(pvGround.get(i).getPosition(),
                                pvGround.get(i + 1).getPosition());
    }
    this.rateVSIndices = alpha / n;

    // estimate mean angular rate with respect to time
    final AbsoluteDate firstDate = pvGround.get(0).getDate();
    final AbsoluteDate lastDate  = pvGround.get(pvGround.size() - 1).getDate();
    this.rateVSTime              = alpha / lastDate.durationFrom(firstDate);

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

示例7: save

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
/**
 * Computes altitude, latitude and longitude
 *  
 * The TLE propagator does not propagate orbits in the EME2000 frame but rather in the TEME frame, 
 * which is a strange frame used only by TLE. Due to precession, the TEME frame is not fixed 
 * with respect to EME2000.
 * 
 * The OneAxisEllipsoid object should not be set up with an inertially oriented frame like the EME2000, 
 * but should should be set up with a frame that represents Earth rotation 
 * (i.e. which is fixed with respect to Earth), like ITRF. 
 * 
 * We give a position in ITRF, then we use ITRF as the second argument to transform coordinates with 
 * respect the Earth Ellipsoid. 
 */
private void save(List<SpacecraftState> states) throws IOException, OrekitException {
	final File file = new File(outDir, output);
	final PrintStream out = new PrintStream(file);
	printOutputHeader(out);
	// printOutputHeader(System.out);
	
	final FactoryManagedFrame ITRF = FramesFactory.getITRF(IERSConventions.IERS_2010, true); // tidal effects ignored
	final OneAxisEllipsoid OAE = new OneAxisEllipsoid(
			Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
			Constants.WGS84_EARTH_FLATTENING,
			ITRF);
	for (SpacecraftState state : states) {
		Orbit o = state.getOrbit();
		Vector3D p = o.getPVCoordinates().getPosition();			
		GeodeticPoint gp = OAE.transform(p, ITRF, o.getDate());
		double alt = gp.getAltitude() / 1000;
		double lat = FastMath.toDegrees(gp.getLatitude());
		double lon = FastMath.toDegrees(gp.getLongitude());
		GeoMagneticElements elem = model.calculateField(lon, lat, alt);
		final Vector3D b = elem.getFieldVector();
		// printOutput(System.out, alt, lat, lon, b, elem);
		printOutput(out, alt, lat, lon, b, elem);
	}
	out.close();
	System.out.println("Check in your home directory the output file: " + output);	
}
 
开发者ID:pleira,项目名称:ardusat-magnetic-field,代码行数:41,代码来源:GeomagneticFieldCalculation.java

示例8: createEarth

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
private BodyShape createEarth()
   throws OrekitException {
    return new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
                                Constants.WGS84_EARTH_FLATTENING,
                                FramesFactory.getITRF(IERSConventions.IERS_2010, true));
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:7,代码来源:RuggedBuilderTest.java

示例9: createEarth

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
private BodyShape createEarth()
                throws OrekitException {
    return new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
                                Constants.WGS84_EARTH_FLATTENING,
                                FramesFactory.getITRF(IERSConventions.IERS_2010, true));
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:7,代码来源:RoughVisibilityEstimatorTest.java

示例10: createEarth

import org.orekit.bodies.OneAxisEllipsoid; //导入依赖的package包/类
public static BodyShape createEarth()
   throws OrekitException {
    return new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
                                Constants.WGS84_EARTH_FLATTENING,
                                FramesFactory.getITRF(IERSConventions.IERS_2010, true));
}
 
开发者ID:CS-SI,项目名称:Rugged,代码行数:7,代码来源:TestUtils.java


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