本文整理汇总了Java中org.apache.commons.math3.geometry.euclidean.threed.RotationOrder.ZXZ属性的典型用法代码示例。如果您正苦于以下问题:Java RotationOrder.ZXZ属性的具体用法?Java RotationOrder.ZXZ怎么用?Java RotationOrder.ZXZ使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.geometry.euclidean.threed.RotationOrder
的用法示例。
在下文中一共展示了RotationOrder.ZXZ属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: distance
public static Vector3D distance(GeoPoint p, GeoPoint q) {
GeodeticCalculator calc = new GeodeticCalculator();
calc.setStartingGeographicPoint(p.lon, p.lat);
calc.setDestinationGeographicPoint(q.lon, q.lat);
double dist = calc.getOrthodromicDistance();
double alpha = calc.getAzimuth(); // The azimuth, in decimal degrees
// from -180° to +180°.
Rotation r = new Rotation(RotationOrder.ZXZ, 0, 0,
-FastMath.toRadians(alpha));
Vector3D trip = r.applyTo(new Vector3D(0, 1, 0)).scalarMultiply(dist);
trip = new Vector3D(trip.getX(), trip.getY(), q.ele - p.ele);
// in meters
return trip;
}
示例2: testName
@Test
public void testName() {
RotationOrder[] orders = {
RotationOrder.XYZ, RotationOrder.XZY, RotationOrder.YXZ,
RotationOrder.YZX, RotationOrder.ZXY, RotationOrder.ZYX,
RotationOrder.XYX, RotationOrder.XZX, RotationOrder.YXY,
RotationOrder.YZY, RotationOrder.ZXZ, RotationOrder.ZYZ
};
for (int i = 0; i < orders.length; ++i) {
Assert.assertEquals(getFieldName(orders[i]), orders[i].toString());
}
}
示例3: transform
public static Vector3d transform(KeplerianOrbit keplerianOrbit, Vector3d vector) {
Rotation r = new Rotation(RotationOrder.ZXZ, keplerianOrbit.getAscendingNode(), keplerianOrbit.getInclination(), keplerianOrbit.getArgumentOfPeriapsis());
Vector3D v = toVector3D(vector);
Vector3D rv = r.applyInverseTo(v);
Vector3d result = new Vector3d(rv.getX(), rv.getY(), rv.getZ());
return result;
}
示例4: Attitude
public Attitude(double roll, double pitch, double yaw, long _time) {
// Extrinsic to intrinsic conversion
// rotation in euler ZXZ style
super(RotationOrder.ZXZ, yaw, pitch, roll);
time.setTime(_time);
}
示例5: getRotation
public Rotation getRotation(KeplerianOrbit keplerianOrbit) {
return new Rotation(RotationOrder.ZXZ, -keplerianOrbit.getArgumentOfPeriapsis(), -keplerianOrbit.getInclination(), -keplerianOrbit.getAscendingNode());
}
示例6: getAcceleration
public AccelerationResult getAcceleration(Model model, Spacecraft spacecraft, CartesianState currentState, Timestamp timestamp, double dt) {
Instant instant = instantManager.getInstant(model, spacecraft, timestamp);
SpacecraftState spacecraftState = instant.getSpacecraftState();
AccelerationResult result = new AccelerationResult();
Propulsion propulsion = spacecraft.getPropulsion();
if (propulsion == null) {
result.setSpacecraftState(spacecraftState);
result.setAcceleration(Vector3D.ZERO);
return result;
}
Maneuver maneuver = maneuverService.findManeuver(spacecraft, timestamp);
if (maneuver == null) {
result.setSpacecraftState(spacecraftState);
result.setAcceleration(Vector3D.ZERO);
return result;
}
Vector3D velocity = instant.getCartesianState().getVelocity();
logger.debug("velocity = |{}| or {}", velocity.getNorm(), velocity);
double dm = propulsion.getMassFlow() * maneuver.getThrottle() * dt;
double thrust = propulsion.getMassFlow() * maneuver.getThrottle() * propulsion.getSpecificImpulse() * MathUtils.G0;
double a = thrust / spacecraftState.getMass();
SpacecraftState newSpacecraftState = new SpacecraftState();
newSpacecraftState.setMass(spacecraftState.getMass() - dm);
newSpacecraftState.setFuel(spacecraftState.getFuel() - dm);
newSpacecraftState.setEngineActived(true);
Vector3D acceleration;
if (maneuver.isInverse()) {
acceleration = velocity.negate().normalize().scalarMultiply(a);
} else {
Rotation r = new Rotation(RotationOrder.ZXZ, 0, maneuver.getThrottleAlpha(), maneuver.getThrottleDelta());
acceleration = r.applyTo(velocity.normalize()).scalarMultiply(a);
}
logger.debug("burst at {} with acceleration |{}| or vector {} ", TimeUtils.timeAsString(timestamp), acceleration.getNorm(), acceleration);
result.setSpacecraftState(newSpacecraftState);
result.setAcceleration(acceleration);
return result;
}