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


Java RotationOrder.ZXZ属性代码示例

本文整理汇总了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;
	}
 
开发者ID:ianmalcolm,项目名称:DeadReckoning,代码行数:19,代码来源:GeoPoint.java

示例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());
  }

}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:15,代码来源:RotationOrderTest.java

示例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;
}
 
开发者ID:momega,项目名称:spacesimulator,代码行数:7,代码来源:VectorUtils.java

示例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);
}
 
开发者ID:ianmalcolm,项目名称:DeadReckoning,代码行数:6,代码来源:Attitude.java

示例5: getRotation

public Rotation getRotation(KeplerianOrbit keplerianOrbit) {
    return new Rotation(RotationOrder.ZXZ, -keplerianOrbit.getArgumentOfPeriapsis(), -keplerianOrbit.getInclination(), -keplerianOrbit.getAscendingNode());
}
 
开发者ID:momega,项目名称:spacesimulator2,代码行数:3,代码来源:KeplerianUtils.java

示例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;
}
 
开发者ID:momega,项目名称:spacesimulator2,代码行数:48,代码来源:ThrustModel.java


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