本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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));
}