Commit 2b9bbebc authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Fixed wrong computation of relativistic clock correction.

Fixes #846
parent f052e4ba
Pipeline #1433 passed with stages
in 25 minutes and 25 seconds
......@@ -51,8 +51,8 @@ public class AbstractRelativisticClockModifier {
final TimeStampedPVCoordinates[] pv = estimated.getParticipants();
// Relativistic clock correction taking into account two-ways measurements
return pv.length < 3 ?
s * (dotProduct(pv[1]) - dotProduct(pv[0])) :
s * (dotProduct(pv[2]) - dotProduct(pv[1]));
s * (dotProduct(pv[0]) - dotProduct(pv[1])) :
s * (dotProduct(pv[1]) - dotProduct(pv[2]));
}
/** Get the scale factor used to compute relativistic effect.
......
......@@ -60,7 +60,7 @@ public class RelativisticClockInterSatellitesPhaseModifierTest {
final EstimatedMeasurement<InterSatellitesPhase> estimatedAfter = phase.estimate(0, 0, states);
// Verify
Assert.assertEquals(10.57, (estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0]) * wavelength, 1.0e-2);
Assert.assertEquals(-10.57, (estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0]) * wavelength, 1.0e-2);
Assert.assertEquals(0, modifier.getParametersDrivers().size());
}
......
......@@ -58,7 +58,7 @@ public class RelativisticClockInterSatellitesRangeModifierTest {
final EstimatedMeasurement<InterSatellitesRange> estimatedAfter = range.estimate(0, 0, states);
// Verify
Assert.assertEquals(10.57, estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(-10.57, estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(0, modifier.getParametersDrivers().size());
}
......
......@@ -59,7 +59,7 @@ public class RelativisticClockOneWayGNSSPhaseModifierTest {
final EstimatedMeasurement<OneWayGNSSPhase> estimatedAfter = phase.estimate(0, 0, states);
// Verify
Assert.assertEquals(10.57, (estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0]) * wavelength, 1.0e-2);
Assert.assertEquals(-10.57, (estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0]) * wavelength, 1.0e-2);
Assert.assertEquals(0, modifier.getParametersDrivers().size());
}
......
......@@ -57,7 +57,7 @@ public class RelativisticClockOneWayGNSSRangeModifierTest {
final EstimatedMeasurement<OneWayGNSSRange> estimatedAfter = range.estimate(0, 0, states);
// Verify
Assert.assertEquals(10.57, estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(-10.57, estimatedBefore.getEstimatedValue()[0] - estimatedAfter.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(0, modifier.getParametersDrivers().size());
}
......
......@@ -95,7 +95,7 @@ public class RelativisticClockPhaseModifierTest {
Assert.assertEquals(0, modifier.getParametersDrivers().size());
// Verify
Assert.assertEquals(6.87 / Frequency.G01.getWavelength(), estimated.getObservedValue()[0] - estimated.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(-6.87 / Frequency.G01.getWavelength(), estimated.getObservedValue()[0] - estimated.getEstimatedValue()[0], 1.0e-2);
}
......
......@@ -94,7 +94,7 @@ public class RelativisticClockRangeModifierTest {
Assert.assertEquals(0, modifier.getParametersDrivers().size());
// Verify
Assert.assertEquals(6.87, estimated.getObservedValue()[0] - estimated.getEstimatedValue()[0], 1.0e-2);
Assert.assertEquals(-6.87, estimated.getObservedValue()[0] - estimated.getEstimatedValue()[0], 1.0e-2);
}
......
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