Commit fb66d157 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Replaced XXX_SIGMA with XXX_MAG_SIGMA and XXX_DIR_SIGMA in OCM.

parent eed72fcc
......@@ -44,13 +44,19 @@ public class Maneuver implements TimeStamped {
private OnOff accelerationInterpolation;
/** One σ percent error on acceleration magnitude. */
private double accelerationSigma;
private double accelerationMagnitudeSigma;
/** One σ angular off-nominal acceleration direction. */
private double accelerationDirectionSigma;
/** Velocity increment. */
private double[] dV;
/** One σ percent error on velocity magnitude. */
private double dvSigma;
/** One σ percent error on ΔV magnitude. */
private double dvMagSigma;
/** One σ angular off-nominal ΔV direction. */
private double dvDirSigma;
/** Thrust. */
private double[] thrust;
......@@ -65,7 +71,10 @@ public class Maneuver implements TimeStamped {
private double thrustIsp;
/** One σ percent error on thrust magnitude. */
private double thrustSigma;
private double thrustMagnitudeSigma;
/** One σ angular off-nominal thrust direction. */
private double thrustDirectionSigma;
/** Identifier of resulting "child" object deployed from this host. */
private String deployId;
......@@ -76,9 +85,12 @@ public class Maneuver implements TimeStamped {
/** Decrement in host mass as a result of deployment (shall be ≤ 0). */
private double deployMass;
/** One σ percent error on deployment velocity magnitude. */
/** One σ percent error on deployment ΔV magnitude. */
private double deployDvSigma;
/** One σ angular off-nominal deployment vector direction. */
private double deployDirSigma;
/** Ratio of child-to-host ΔV vectors. */
private double deployDvRatio;
......@@ -167,15 +179,29 @@ public class Maneuver implements TimeStamped {
/** Get one σ percent error on acceleration magnitude.
* @return one σ percent error on acceleration magnitude
*/
public double getAccelerationSigma() {
return accelerationSigma;
public double getAccelerationMagnitudeSigma() {
return accelerationMagnitudeSigma;
}
/** Set one σ percent error on acceleration magnitude.
* @param accelerationSigma one σ percent error on acceleration magnitude
* @param accelerationMagnitudeSigma one σ percent error on acceleration magnitude
*/
public void setAccelerationMagnitudeSigma(final double accelerationMagnitudeSigma) {
this.accelerationMagnitudeSigma = accelerationMagnitudeSigma;
}
/** Get one σ angular off-nominal acceleration direction.
* @return one σ angular off-nominal acceleration direction
*/
public void setAccelerationSigma(final double accelerationSigma) {
this.accelerationSigma = accelerationSigma;
public double getAccelerationDirectionSigma() {
return accelerationDirectionSigma;
}
/** Set one σ angular off-nominal acceleration direction.
* @param accelerationDirectionSigma one σ angular off-nominal acceleration direction
*/
public void setAccelerationDirectionSigma(final double accelerationDirectionSigma) {
this.accelerationDirectionSigma = accelerationDirectionSigma;
}
/** Get velocity increment.
......@@ -193,20 +219,33 @@ public class Maneuver implements TimeStamped {
dV[i] = dVi;
}
/** Get one σ percent error on velocity magnitude.
* @return one σ percent error on velocity magnitude
/** Get one σ percent error on ΔV magnitude.
* @return one σ percent error on ΔV magnitude
*/
public double getDvSigma() {
return dvSigma;
public double getDvMagSigma() {
return dvMagSigma;
}
/** Set one σ percent error on velocity magnitude.
* @param dvSigma one σ percent error on velocity magnitude
/** Set one σ percent error on ΔV magnitude.
* @param dvMagSigma one σ percent error on ΔV magnitude
*/
public void setDvSigma(final double dvSigma) {
this.dvSigma = dvSigma;
public void setDvMagSigma(final double dvMagSigma) {
this.dvMagSigma = dvMagSigma;
}
/** Get one σ angular off-nominal ΔV direction.
* @return one σ angular off-nominal ΔV direction
*/
public double getDvDirSigma() {
return dvDirSigma;
}
/** Set one σ angular off-nominal ΔV direction.
* @param dvDirSigma one σ angular off-nominal ΔV direction
*/
public void setDvDirSigma(final double dvDirSigma) {
this.dvDirSigma = dvDirSigma;
}
/** Get thrust.
* @return thrust
......@@ -268,15 +307,29 @@ public class Maneuver implements TimeStamped {
/** Get one σ percent error on thrust magnitude.
* @return one σ percent error on thrust magnitude
*/
public double getThrustSigma() {
return thrustSigma;
public double getThrustMagnitudeSigma() {
return thrustMagnitudeSigma;
}
/** Set one σ percent error on thrust magnitude.
* @param thrustSigma one σ percent error on thrust magnitude
* @param thrustMagnitudeSigma one σ percent error on thrust magnitude
*/
public void setThrustMagnitudeSigma(final double thrustMagnitudeSigma) {
this.thrustMagnitudeSigma = thrustMagnitudeSigma;
}
/** Get one σ angular off-nominal thrust direction.
* @return one σ angular off-nominal thrust direction
*/
public double getThrustDirectionSigma() {
return thrustDirectionSigma;
}
/** Set one σ angular off-nominal thrust direction.
* @param thrustDirectionSigma one σ angular off-nominal thrust direction
*/
public void setThrustSigma(final double thrustSigma) {
this.thrustSigma = thrustSigma;
public void setThrustDirectionSigma(final double thrustDirectionSigma) {
this.thrustDirectionSigma = thrustDirectionSigma;
}
/** Get identifier of resulting "child" object deployed from this host.
......@@ -322,20 +375,34 @@ public class Maneuver implements TimeStamped {
this.deployMass = deployMass;
}
/** Get one σ percent error on deployment velocity magnitude.
* @return one σ percent error on deployment velocity magnitude
/** Get one σ percent error on deployment ΔV magnitude.
* @return one σ percent error on deployment ΔV magnitude
*/
public double getDeployDvSigma() {
return deployDvSigma;
}
/** Set one σ percent error on deployment velocity magnitude.
* @param deployDvSigma one σ percent error on deployment velocity magnitude
/** Set one σ percent error on deployment ΔV magnitude.
* @param deployDvSigma one σ percent error on deployment ΔV magnitude
*/
public void setDeployDvSigma(final double deployDvSigma) {
this.deployDvSigma = deployDvSigma;
}
/** Get one σ angular off-nominal deployment vector direction.
* @return one σ angular off-nominal deployment vector direction
*/
public double getDeployDirSigma() {
return deployDirSigma;
}
/** Set one σ angular off-nominal deployment vector direction.
* @param deployDirSigma one σ angular off-nominal deployment vector direction
*/
public void setDeployDirSigma(final double deployDirSigma) {
this.deployDirSigma = deployDirSigma;
}
/** Get ratio of child-to-host ΔV vectors.
* @return ratio of child-to-host ΔV vectors
*/
......
......@@ -86,9 +86,14 @@ public enum ManeuverFieldType {
(u, converter, maneuver) -> maneuver.getAccelerationInterpolation().name()),
/** One σ percent error on acceleration magnitude. */
ACC_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setAccelerationSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getAccelerationSigma()))),
ACC_MAG_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setAccelerationMagnitudeSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getAccelerationMagnitudeSigma()))),
/** One σ off-nominal acceleration direction. */
ACC_DIR_SIGMA("°",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setAccelerationDirectionSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getAccelerationDirectionSigma()))),
/** Velocity increment along X axis. */
DV_X("km/s",
......@@ -105,10 +110,15 @@ public enum ManeuverFieldType {
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDv(2, toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDv().getZ()))),
/** One σ percent error on velocity magnitude. */
DV_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDvSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDvSigma()))),
/** One σ percent error on ΔV magnitude. */
DV_MAG_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDvMagSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDvMagSigma()))),
/** One σ angular off-nominal ΔV direction. */
DV_DIR_SIGMA("°",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDvDirSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDvDirSigma()))),
/** Thrust component along X axis. */
THR_X("N",
......@@ -148,9 +158,14 @@ public enum ManeuverFieldType {
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getThrustIsp()))),
/** One σ percent error on thrust magnitude. */
THR_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setThrustSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getThrustSigma()))),
THR_MAG_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setThrustMagnitudeSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getThrustMagnitudeSigma()))),
/** One σ angular off-nominal thrust direction. */
THR_DIR_SIGMA("°",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setThrustDirectionSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getThrustDirectionSigma()))),
/** Identifier of resulting "child" object deployed from this host. */
DEPLOY_ID("n/a",
......@@ -177,11 +192,16 @@ public enum ManeuverFieldType {
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDeployMass(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDeployMass()))),
/** One σ percent error on deployment velocity magnitude. */
/** One σ percent error on deployment ΔV magnitude. */
DEPLOY_DV_SIGMA("%",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDeployDvSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDeployDvSigma()))),
/** One σ angular off-nominal deployment vector direction. */
DEPLOY_DIR_SIGMA("°",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDeployDirSigma(toSI(field, u)),
(u, converter, maneuver) -> AccurateFormatter.format(u.fromSI(maneuver.getDeployDirSigma()))),
/** Ratio of child-to-host ΔV vectors. */
DEPLOY_DV_RATIO("n/a",
(field, u, context, maneuver, lineNumber, fileName) -> maneuver.setDeployDvRatio(toSI(field, u)),
......
......@@ -122,7 +122,7 @@ public class NdmWriterTest {
List<NdmConstituent<?, ?>> pool = buildPool(pb);
RandomGenerator random = new Well19937a(0x4a21ffc6d5b7dbe6l);
for (int i = 0; i < 10; ++i) {
for (int i = 0; i < 100; ++i) {
final String[] comments = new String[random.nextInt(3)];
for (int k = 0; k < comments.length; ++k) {
......
......@@ -768,32 +768,35 @@ public class OcmParserTest {
Assert.assertNull(man.get(1).getMetadata().getManReferenceFrame().asFrame());
Assert.assertNull(man.get(1).getMetadata().getManReferenceFrame().asCelestialBodyFrame());
Assert.assertEquals(OrbitRelativeFrame.RSW_ROTATING, man.get(1).getMetadata().getManReferenceFrame().asOrbitRelativeFrame());
Assert.assertEquals(10, man.get(1).getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_ABSOLUTE, man.get(1).getMetadata().getManComposition().get(0));
Assert.assertEquals(ManeuverFieldType.TIME_RELATIVE, man.get(1).getMetadata().getManComposition().get(1));
Assert.assertEquals(ManeuverFieldType.MAN_DURA, man.get(1).getMetadata().getManComposition().get(2));
Assert.assertEquals(ManeuverFieldType.THR_X, man.get(1).getMetadata().getManComposition().get(3));
Assert.assertEquals(ManeuverFieldType.THR_Y, man.get(1).getMetadata().getManComposition().get(4));
Assert.assertEquals(ManeuverFieldType.THR_Z, man.get(1).getMetadata().getManComposition().get(5));
Assert.assertEquals(ManeuverFieldType.THR_SIGMA, man.get(1).getMetadata().getManComposition().get(6));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, man.get(1).getMetadata().getManComposition().get(7));
Assert.assertEquals(ManeuverFieldType.THR_ISP, man.get(1).getMetadata().getManComposition().get(8));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, man.get(1).getMetadata().getManComposition().get(9));
Assert.assertEquals(8, man.get(1).getMetadata().getManUnits().size());
Assert.assertEquals(11, man.get(1).getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_ABSOLUTE, man.get(1).getMetadata().getManComposition().get( 0));
Assert.assertEquals(ManeuverFieldType.TIME_RELATIVE, man.get(1).getMetadata().getManComposition().get( 1));
Assert.assertEquals(ManeuverFieldType.MAN_DURA, man.get(1).getMetadata().getManComposition().get( 2));
Assert.assertEquals(ManeuverFieldType.THR_X, man.get(1).getMetadata().getManComposition().get( 3));
Assert.assertEquals(ManeuverFieldType.THR_Y, man.get(1).getMetadata().getManComposition().get( 4));
Assert.assertEquals(ManeuverFieldType.THR_Z, man.get(1).getMetadata().getManComposition().get( 5));
Assert.assertEquals(ManeuverFieldType.THR_MAG_SIGMA, man.get(1).getMetadata().getManComposition().get( 6));
Assert.assertEquals(ManeuverFieldType.THR_DIR_SIGMA, man.get(1).getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, man.get(1).getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.THR_ISP, man.get(1).getMetadata().getManComposition().get( 9));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, man.get(1).getMetadata().getManComposition().get(10));
Assert.assertEquals(9, man.get(1).getMetadata().getManUnits().size());
Assert.assertEquals("s", man.get(1).getMetadata().getManUnits().get(0).getName());
Assert.assertEquals("N", man.get(1).getMetadata().getManUnits().get(1).getName());
Assert.assertEquals("N", man.get(1).getMetadata().getManUnits().get(2).getName());
Assert.assertEquals("N", man.get(1).getMetadata().getManUnits().get(3).getName());
Assert.assertEquals("%", man.get(1).getMetadata().getManUnits().get(4).getName());
Assert.assertEquals("n/a", man.get(1).getMetadata().getManUnits().get(5).getName());
Assert.assertEquals("s", man.get(1).getMetadata().getManUnits().get(6).getName());
Assert.assertEquals("n/a", man.get(1).getMetadata().getManUnits().get(7).getName());
Assert.assertEquals("deg", man.get(1).getMetadata().getManUnits().get(5).getName());
Assert.assertEquals("n/a", man.get(1).getMetadata().getManUnits().get(6).getName());
Assert.assertEquals("s", man.get(1).getMetadata().getManUnits().get(7).getName());
Assert.assertEquals("n/a", man.get(1).getMetadata().getManUnits().get(8).getName());
Assert.assertEquals(1, man.get(1).getManeuvers().size());
Assert.assertEquals(500.0, man.get(1).getManeuvers().get(0).getDate().durationFrom(t0), 1.0e-10);
Assert.assertEquals(100, man.get(1).getManeuvers().get(0).getDuration(), 1.0e-10);
Assert.assertEquals( 0.0, man.get(1).getManeuvers().get(0).getThrust().getX(), 1.0e-10);
Assert.assertEquals( 0.5, man.get(1).getManeuvers().get(0).getThrust().getY(), 1.0e-10);
Assert.assertEquals( 0.05, man.get(1).getManeuvers().get(0).getThrustSigma(), 1.0e-10);
Assert.assertEquals( 0.05, man.get(1).getManeuvers().get(0).getThrustMagnitudeSigma(), 1.0e-10);
Assert.assertEquals( 1.0, FastMath.toDegrees(man.get(1).getManeuvers().get(0).getThrustDirectionSigma()), 1.0e-10);
Assert.assertEquals(OnOff.ON, man.get(1).getManeuvers().get(0).getThrustInterpolation());
Assert.assertTrue(man.get(1).getManeuvers().get(0).getThrustInterpolation().isOn());
Assert.assertEquals(300.0, man.get(1).getManeuvers().get(0).getThrustIsp(), 1.0e-10);
......@@ -1078,7 +1081,7 @@ public class OcmParserTest {
Assert.assertEquals(8000.0, m0.getMetadata().getDcRefTime().durationFrom(epoch), 1.0e-10);
Assert.assertEquals( 10.0, m0.getMetadata().getDcTimePulseDuration(), 1.0e-10);
Assert.assertEquals(200.0, m0.getMetadata().getDcTimePulsePeriod(), 1.0e-10);
Assert.assertEquals(20, m0.getMetadata().getManComposition().size());
Assert.assertEquals(23, m0.getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_ABSOLUTE, m0.getMetadata().getManComposition().get( 0));
Assert.assertEquals(ManeuverFieldType.TIME_RELATIVE, m0.getMetadata().getManComposition().get( 1));
Assert.assertEquals(ManeuverFieldType.MAN_DURA, m0.getMetadata().getManComposition().get( 2));
......@@ -1087,18 +1090,21 @@ public class OcmParserTest {
Assert.assertEquals(ManeuverFieldType.ACC_Y, m0.getMetadata().getManComposition().get( 5));
Assert.assertEquals(ManeuverFieldType.ACC_Z, m0.getMetadata().getManComposition().get( 6));
Assert.assertEquals(ManeuverFieldType.ACC_INTERP, m0.getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.ACC_SIGMA, m0.getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.DV_X, m0.getMetadata().getManComposition().get( 9));
Assert.assertEquals(ManeuverFieldType.DV_Y, m0.getMetadata().getManComposition().get(10));
Assert.assertEquals(ManeuverFieldType.DV_Z, m0.getMetadata().getManComposition().get(11));
Assert.assertEquals(ManeuverFieldType.DV_SIGMA, m0.getMetadata().getManComposition().get(12));
Assert.assertEquals(ManeuverFieldType.THR_X, m0.getMetadata().getManComposition().get(13));
Assert.assertEquals(ManeuverFieldType.THR_Y, m0.getMetadata().getManComposition().get(14));
Assert.assertEquals(ManeuverFieldType.THR_Z, m0.getMetadata().getManComposition().get(15));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, m0.getMetadata().getManComposition().get(16));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, m0.getMetadata().getManComposition().get(17));
Assert.assertEquals(ManeuverFieldType.THR_ISP, m0.getMetadata().getManComposition().get(18));
Assert.assertEquals(ManeuverFieldType.THR_SIGMA, m0.getMetadata().getManComposition().get(19));
Assert.assertEquals(ManeuverFieldType.ACC_MAG_SIGMA, m0.getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.ACC_DIR_SIGMA, m0.getMetadata().getManComposition().get( 9));
Assert.assertEquals(ManeuverFieldType.DV_X, m0.getMetadata().getManComposition().get(10));
Assert.assertEquals(ManeuverFieldType.DV_Y, m0.getMetadata().getManComposition().get(11));
Assert.assertEquals(ManeuverFieldType.DV_Z, m0.getMetadata().getManComposition().get(12));
Assert.assertEquals(ManeuverFieldType.DV_MAG_SIGMA, m0.getMetadata().getManComposition().get(13));
Assert.assertEquals(ManeuverFieldType.DV_DIR_SIGMA, m0.getMetadata().getManComposition().get(14));
Assert.assertEquals(ManeuverFieldType.THR_X, m0.getMetadata().getManComposition().get(15));
Assert.assertEquals(ManeuverFieldType.THR_Y, m0.getMetadata().getManComposition().get(16));
Assert.assertEquals(ManeuverFieldType.THR_Z, m0.getMetadata().getManComposition().get(17));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, m0.getMetadata().getManComposition().get(18));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, m0.getMetadata().getManComposition().get(19));
Assert.assertEquals(ManeuverFieldType.THR_ISP, m0.getMetadata().getManComposition().get(20));
Assert.assertEquals(ManeuverFieldType.THR_MAG_SIGMA, m0.getMetadata().getManComposition().get(21));
Assert.assertEquals(ManeuverFieldType.THR_DIR_SIGMA, m0.getMetadata().getManComposition().get(22));
Assert.assertEquals(m0.getMetadata().getManComposition().size() - 2, m0.getMetadata().getManUnits().size());
for (int i = 0; i < m0.getMetadata().getManUnits().size(); ++i) {
ManeuverFieldType type = m0.getMetadata().getManComposition().get(i + 2);
......@@ -1137,7 +1143,7 @@ public class OcmParserTest {
Assert.assertEquals(12000.0, m1.getMetadata().getDcRefTime().durationFrom(epoch), 1.0e-10);
Assert.assertEquals( 20.0, m1.getMetadata().getDcTimePulseDuration(), 1.0e-10);
Assert.assertEquals(400.0, m1.getMetadata().getDcTimePulsePeriod(), 1.0e-10);
Assert.assertEquals(19, m1.getMetadata().getManComposition().size());
Assert.assertEquals(22, m1.getMetadata().getManComposition().size());
Assert.assertEquals(0.0,
Vector3D.distance(m1.getMetadata().getDcRefDir(),
Vector3D.PLUS_I),
......@@ -1150,7 +1156,7 @@ public class OcmParserTest {
1.0e-10);
Assert.assertEquals(25.0, FastMath.toDegrees(m1.getMetadata().getDcPhaseStartAngle()), 1.0e-10);
Assert.assertEquals(35.0, FastMath.toDegrees(m1.getMetadata().getDcPhaseStopAngle()), 1.0e-10);
Assert.assertEquals(19, m1.getMetadata().getManComposition().size());
Assert.assertEquals(22, m1.getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_RELATIVE, m1.getMetadata().getManComposition().get( 0));
Assert.assertEquals(ManeuverFieldType.MAN_DURA, m1.getMetadata().getManComposition().get( 1));
Assert.assertEquals(ManeuverFieldType.DELTA_MASS, m1.getMetadata().getManComposition().get( 2));
......@@ -1158,18 +1164,21 @@ public class OcmParserTest {
Assert.assertEquals(ManeuverFieldType.ACC_Y, m1.getMetadata().getManComposition().get( 4));
Assert.assertEquals(ManeuverFieldType.ACC_Z, m1.getMetadata().getManComposition().get( 5));
Assert.assertEquals(ManeuverFieldType.ACC_INTERP, m1.getMetadata().getManComposition().get( 6));
Assert.assertEquals(ManeuverFieldType.ACC_SIGMA, m1.getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.DV_X, m1.getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.DV_Y, m1.getMetadata().getManComposition().get( 9));
Assert.assertEquals(ManeuverFieldType.DV_Z, m1.getMetadata().getManComposition().get(10));
Assert.assertEquals(ManeuverFieldType.DV_SIGMA, m1.getMetadata().getManComposition().get(11));
Assert.assertEquals(ManeuverFieldType.THR_X, m1.getMetadata().getManComposition().get(12));
Assert.assertEquals(ManeuverFieldType.THR_Y, m1.getMetadata().getManComposition().get(13));
Assert.assertEquals(ManeuverFieldType.THR_Z, m1.getMetadata().getManComposition().get(14));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, m1.getMetadata().getManComposition().get(15));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, m1.getMetadata().getManComposition().get(16));
Assert.assertEquals(ManeuverFieldType.THR_ISP, m1.getMetadata().getManComposition().get(17));
Assert.assertEquals(ManeuverFieldType.THR_SIGMA, m1.getMetadata().getManComposition().get(18));
Assert.assertEquals(ManeuverFieldType.ACC_MAG_SIGMA, m1.getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.ACC_DIR_SIGMA, m1.getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.DV_X, m1.getMetadata().getManComposition().get( 9));
Assert.assertEquals(ManeuverFieldType.DV_Y, m1.getMetadata().getManComposition().get(10));
Assert.assertEquals(ManeuverFieldType.DV_Z, m1.getMetadata().getManComposition().get(11));
Assert.assertEquals(ManeuverFieldType.DV_MAG_SIGMA, m1.getMetadata().getManComposition().get(12));
Assert.assertEquals(ManeuverFieldType.DV_DIR_SIGMA, m1.getMetadata().getManComposition().get(13));
Assert.assertEquals(ManeuverFieldType.THR_X, m1.getMetadata().getManComposition().get(14));
Assert.assertEquals(ManeuverFieldType.THR_Y, m1.getMetadata().getManComposition().get(15));
Assert.assertEquals(ManeuverFieldType.THR_Z, m1.getMetadata().getManComposition().get(16));
Assert.assertEquals(ManeuverFieldType.THR_EFFIC, m1.getMetadata().getManComposition().get(17));
Assert.assertEquals(ManeuverFieldType.THR_INTERP, m1.getMetadata().getManComposition().get(18));
Assert.assertEquals(ManeuverFieldType.THR_ISP, m1.getMetadata().getManComposition().get(19));
Assert.assertEquals(ManeuverFieldType.THR_MAG_SIGMA, m1.getMetadata().getManComposition().get(20));
Assert.assertEquals(ManeuverFieldType.THR_DIR_SIGMA, m1.getMetadata().getManComposition().get(21));
Assert.assertEquals(m1.getMetadata().getManComposition().size() - 1, m1.getMetadata().getManUnits().size());
for (int i = 0; i < m1.getMetadata().getManUnits().size(); ++i) {
ManeuverFieldType type = m1.getMetadata().getManComposition().get(i + 1);
......@@ -1178,26 +1187,28 @@ public class OcmParserTest {
}
Assert.assertEquals(2, m1.getManeuvers().size());
Assert.assertEquals(1000.0, m1.getManeuvers().get(0).getDate().durationFrom(epoch), 1.0e-10);
Assert.assertEquals(0.02, m1.getManeuvers().get(0).getThrustSigma(), 1.0e-10);
Assert.assertEquals(0.02, m1.getManeuvers().get(0).getThrustMagnitudeSigma(), 1.0e-10);
Assert.assertEquals(4.3, FastMath.toDegrees(m1.getManeuvers().get(0).getThrustDirectionSigma()), 1.0e-10);
Assert.assertEquals(OnOff.OFF, m1.getManeuvers().get(0).getAccelerationInterpolation());
Assert.assertEquals(1600.0, m1.getManeuvers().get(1).getDate().durationFrom(epoch), 1.0e-10);
Assert.assertEquals( 25.0, m1.getManeuvers().get(1).getDv().getX(), 1.0e-10);
ManeuverHistory m2 = file.getData().getManeuverBlocks().get(2);
Assert.assertEquals("this is number 3 MAN comment", m2.getMetadata().getComments().get(0));
Assert.assertEquals("maneuver 3", m2.getMetadata().getManID());
Assert.assertEquals("DEPLOYMENT", m2.getMetadata().getManDeviceID());
Assert.assertEquals(9 , m2.getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_ABSOLUTE, m2.getMetadata().getManComposition().get( 0));
Assert.assertEquals(ManeuverFieldType.DEPLOY_ID, m2.getMetadata().getManComposition().get( 1));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_X, m2.getMetadata().getManComposition().get( 2));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_Y, m2.getMetadata().getManComposition().get( 3));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_Z, m2.getMetadata().getManComposition().get( 4));
Assert.assertEquals(ManeuverFieldType.DEPLOY_MASS, m2.getMetadata().getManComposition().get( 5));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_SIGMA, m2.getMetadata().getManComposition().get( 6));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_RATIO, m2.getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_CDA, m2.getMetadata().getManComposition().get( 8));
Assert.assertEquals("this is number 3 MAN comment", m2.getMetadata().getComments().get(0));
Assert.assertEquals("maneuver 3", m2.getMetadata().getManID());
Assert.assertEquals("DEPLOYMENT", m2.getMetadata().getManDeviceID());
Assert.assertEquals(10, m2.getMetadata().getManComposition().size());
Assert.assertEquals(ManeuverFieldType.TIME_ABSOLUTE, m2.getMetadata().getManComposition().get( 0));
Assert.assertEquals(ManeuverFieldType.DEPLOY_ID, m2.getMetadata().getManComposition().get( 1));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_X, m2.getMetadata().getManComposition().get( 2));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_Y, m2.getMetadata().getManComposition().get( 3));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_Z, m2.getMetadata().getManComposition().get( 4));
Assert.assertEquals(ManeuverFieldType.DEPLOY_MASS, m2.getMetadata().getManComposition().get( 5));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_SIGMA, m2.getMetadata().getManComposition().get( 6));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DIR_SIGMA, m2.getMetadata().getManComposition().get( 7));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_RATIO, m2.getMetadata().getManComposition().get( 8));
Assert.assertEquals(ManeuverFieldType.DEPLOY_DV_CDA, m2.getMetadata().getManComposition().get( 9));
Assert.assertEquals(m2.getMetadata().getManComposition().size() - 1, m2.getMetadata().getManUnits().size());
for (int i = 0; i < m2.getMetadata().getManUnits().size(); ++i) {
ManeuverFieldType type = m2.getMetadata().getManComposition().get(i + 1);
......
......@@ -58,9 +58,9 @@ MAN_BASIS = CANDIDATE
MAN_DEVICE_ID = THR_01
MAN_PURPOSE = ORBIT
MAN_REF_FRAME = RSW_ROTATING
MAN_COMPOSITION = TIME_ABSOLUTE, TIME_RELATIVE, MAN_DURA, THR_X, THR_Y, THR_Z, THR_SIGMA, THR_INTERP, THR_ISP, THR_EFFIC
MAN_UNITS = [s, N, N, N, %, n/a, s, n/a]
1998-12-18T14:36:35.1172 500.0 100.0 0.0 0.5 0.0 5.0 ON 300.0 0.95
MAN_COMPOSITION = TIME_ABSOLUTE, TIME_RELATIVE, MAN_DURA, THR_X, THR_Y, THR_Z, THR_MAG_SIGMA, THR_DIR_SIGMA, THR_INTERP, THR_ISP, THR_EFFIC
MAN_UNITS = [s, N, N, N, %, deg, n/a, s, n/a]
1998-12-18T14:36:35.1172 500.0 100.0 0.0 0.5 0.0 5.0 1.0 ON 300.0 0.95
MAN_STOP
PERT_START
......
......@@ -216,10 +216,10 @@ DC_EXEC_STOP = 95.0
DC_REF_TIME = 8000.0
DC_TIME_PULSE_DURATION = 10.0 [s]
DC_TIME_PULSE_PERIOD = 200.0 [s]
MAN_COMPOSITION = TIME_ABSOLUTE,TIME_RELATIVE,MAN_DURA,DELTA_MASS,ACC_X,ACC_Y,ACC_Z,ACC_INTERP,ACC_SIGMA,DV_X,DV_Y,DV_Z,DV_SIGMA,THR_X,THR_Y,THR_Z,THR_EFFIC,THR_INTERP,THR_ISP,THR_SIGMA
MAN_UNITS = [s,kg,km/s**2,km/s**2,km/s**2,n/a,%,km/s,km/s,km/s,%,N,N,N,n/a,n/a,s,%]
2019-07-23T00:00:00 0.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 ON 1.0 0.025 0.0015 0.00029 2.0 1.0 2.0 3.0 0.95 ON 330.0 2.0
2019-07-23T00:10:00 600.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 ON 1.0 0.025 0.0015 0.00029 2.0 1.0 2.0 3.0 0.95 ON 330.0 2.0
MAN_COMPOSITION = TIME_ABSOLUTE,TIME_RELATIVE,MAN_DURA,DELTA_MASS,ACC_X,ACC_Y,ACC_Z,ACC_INTERP,ACC_MAG_SIGMA,ACC_DIR_SIGMA,DV_X,DV_Y,DV_Z,DV_MAG_SIGMA,DV_DIR_SIGMA,THR_X,THR_Y,THR_Z,THR_EFFIC,THR_INTERP,THR_ISP,THR_MAG_SIGMA,THR_DIR_SIGMA
MAN_UNITS = [s,kg,km/s**2,km/s**2,km/s**2,n/a,%,deg,km/s,km/s,km/s,%,deg,N,N,N,n/a,n/a,s,%,deg]
2019-07-23T00:00:00 0.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 ON 1.0 3.1 0.025 0.0015 0.00029 2.0 5.2 1.0 2.0 3.0 0.95 ON 330.0 2.0 4.3
2019-07-23T00:10:00 600.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 ON 1.0 3.1 0.025 0.0015 0.00029 2.0 5.2 1.0 2.0 3.0 0.95 ON 330.0 2.0 4.3
MAN_STOP
MAN_START
......@@ -252,26 +252,26 @@ DC_BODY_FRAME = SENSOR_3
DC_BODY_TRIGGER = 0.707 0.0 0.707
DC_PA_START_ANGLE = 25.0 [deg]
DC_PA_STOP_ANGLE = 35.0 [deg]
MAN_COMPOSITION = TIME_RELATIVE,MAN_DURA,DELTA_MASS,ACC_X,ACC_Y,ACC_Z,ACC_INTERP,ACC_SIGMA,DV_X,DV_Y,DV_Z,DV_SIGMA,THR_X,THR_Y,THR_Z,THR_EFFIC,THR_INTERP,THR_ISP,THR_SIGMA
MAN_UNITS = [s,kg,km/s**2,km/s**2,km/s**2,n/a,%,km/s,km/s,km/s,%,N,N,N,n/a,n/a,s,%]
1000.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 OFF 1.0 0.025 0.0015 0.00029 2.0 1.0 2.0 3.0 0.95 ON 330.0 2.0
1600.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 OFF 1.0 0.025 0.0015 0.00029 2.0 1.0 2.0 3.0 0.95 ON 330.0 2.0
MAN_COMPOSITION = TIME_RELATIVE,MAN_DURA,DELTA_MASS,ACC_X,ACC_Y,ACC_Z,ACC_INTERP,ACC_MAG_SIGMA,ACC_DIR_SIGMA,DV_X,DV_Y,DV_Z,DV_MAG_SIGMA,DV_DIR_SIGMA,THR_X,THR_Y,THR_Z,THR_EFFIC,THR_INTERP,THR_ISP,THR_MAG_SIGMA,THR_DIR_SIGMA
MAN_UNITS = [s,kg,km/s**2,km/s**2,km/s**2,n/a,%,deg,km/s,km/s,km/s,%,deg,N,N,N,n/a,n/a,s,%,deg]
1000.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 OFF 1.0 3.1 0.025 0.0015 0.00029 2.0 5.2 1.0 2.0 3.0 0.95 ON 330.0 2.0 4.3
1600.0 200.0 -5.0 0.000734092785 0.000189779834 0.0000794872502 OFF 1.0 3.1 0.025 0.0015 0.00029 2.0 4.2 1.0 2.0 3.0 0.95 ON 330.0 2.0 4.3
MAN_STOP
MAN_START
COMMENT this is number 3 MAN comment
MAN_ID = maneuver 3
MAN_DEVICE_ID = DEPLOYMENT
MAN_COMPOSITION = TIME_ABSOLUTE,DEPLOY_ID,DEPLOY_DV_X,DEPLOY_DV_Y,DEPLOY_DV_Z,DEPLOY_MASS,DEPLOY_DV_SIGMA,DEPLOY_DV_RATIO,DEPLOY_DV_CDA
MAN_UNITS = [n/a,km/s,km/s,km/s,kg,%,n/a,m**2]
2019-07-23T09:45:00 BEE_1 0.0001 0.0003 0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:46:00 BEE_2 0.0001 0.0003 -0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:47:00 BEE_3 0.0001 -0.0003 0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:48:00 BEE_4 0.0001 -0.0003 -0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:49:00 BEE_5 -0.0001 0.0003 0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:50:00 BEE_6 -0.0001 0.0003 -0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:51:00 BEE_7 -0.0001 -0.0003 0.0002 -0.4 5.0 -0.05 0.022
2019-07-23T09:52:00 BEE_8 -0.0001 -0.0003 -0.0002 -0.4 5.0 -0.05 0.022
MAN_COMPOSITION = TIME_ABSOLUTE,DEPLOY_ID,DEPLOY_DV_X,DEPLOY_DV_Y,DEPLOY_DV_Z,DEPLOY_MASS,DEPLOY_DV_SIGMA,DEPLOY_DIR_SIGMA,DEPLOY_DV_RATIO,DEPLOY_DV_CDA
MAN_UNITS = [n/a,km/s,km/s,km/s,kg,%,deg,n/a,m**2]
2019-07-23T09:45:00 BEE_1 0.0001 0.0003 0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:46:00 BEE_2 0.0001 0.0003 -0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:47:00 BEE_3 0.0001 -0.0003 0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:48:00 BEE_4 0.0001 -0.0003 -0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:49:00 BEE_5 -0.0001 0.0003 0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:50:00 BEE_6 -0.0001 0.0003 -0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:51:00 BEE_7 -0.0001 -0.0003 0.0002 -0.4 5.0 7.2 -0.05 0.022
2019-07-23T09:52:00 BEE_8 -0.0001 -0.0003 -0.0002 -0.4 5.0 7.2 -0.05 0.022
MAN_STOP
PERT_START
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment