60 unsigned testRotateECEFTriple();
61 unsigned testRotateECEFPosition();
62 unsigned testRotateECEFXvt();
63 unsigned testComputeRangePosition();
64 unsigned testComputeRangeTriple();
65 unsigned testComputeRangeXvt();
66 unsigned testEstTransmitFromReceive();
67 unsigned testEstTransmitFromObs();
68 unsigned testFromSvPos();
69 unsigned testFromSvTransmit();
70 unsigned testFromSvTransmitWithObs();
71 unsigned testFromReceive();
72 unsigned testFromNominalReceive();
73 unsigned testFromNominalReceiveWithObs();
83 ndfp(std::make_shared<RinexNavDataFactory>());
85 std::string fname = getPathData() + getFileSep() +
100 TUDEF(
"RawRange",
"rotateECEF(Triple)");
101 Triple t(-7.0e5, -5.0e6, 3.0e6);
106 actual = RawRange::rotateECEF(t, dt, ellipsoid);
112 actual = RawRange::rotateECEF(t, dt, ellipsoid,
true);
123 TUDEF(
"RawRange",
"rotateECEF(Position)");
125 Position p(30.902726259175704, 262.03038960567716,
127 Position::CoordinateSystem::Geodetic);
133 actual = RawRange::rotateECEF(p, dt, ellipsoid);
135 Position::CoordinateSystem::Geodetic,
149 actual = RawRange::rotateECEF(p, dt, ellipsoid,
true);
161 TUDEF(
"RawRange",
"rotateECEF(Triple)");
163 xvt.
x =
Triple(-7.0e5, -5.0e6, 3.0e6);
171 actual = RawRange::rotateECEF(xvt, dt, ellipsoid);
183 actual = RawRange::rotateECEF(xvt, dt, ellipsoid,
true);
198 TUDEF(
"RawRange",
"computeRange(Position)");
200 Position loc1(-7.0e5, -5.0e6, 3.0e6);
201 loc1.
transformTo(Position::CoordinateSystem::Geodetic);
202 Position loc2(-7.0e6, -5.0e7, 3.0e7);
203 loc2.
transformTo(Position::CoordinateSystem::Geodetic);
211 std::tie(
range, rotatedLoc2) =
212 RawRange::computeRange(loc1, loc2, dt, ellipsoid);
215 rotatedLoc2.
transformTo(Position::CoordinateSystem::Cartesian);
216 TUASSERTFEPS(-7000255.2239389382303, rotatedLoc2[0], 1.0e-4);
217 TUASSERTFEPS(-49999964.267984382808, rotatedLoc2[1], 1.0e-4);
221 std::tie(
range, rotatedLoc2) =
222 RawRange::computeRange(loc1, loc2, dt, ellipsoid,
true);
225 rotatedLoc2.
transformTo(Position::CoordinateSystem::Cartesian);
226 TUASSERTFEPS(-7000255.2240301342681, rotatedLoc2[0], 1.0e-4);
227 TUASSERTFEPS(-49999964.268635779619, rotatedLoc2[1], 1.0e-4);
231 std::tie(
range, rotatedLoc2) =
232 RawRange::computeRange(loc1, t1 + dt, loc2, t1, ellipsoid);
235 rotatedLoc2.
transformTo(Position::CoordinateSystem::Cartesian);
236 TUASSERTFEPS(-7000255.2239389382303, rotatedLoc2[0], 1.0e-4);
237 TUASSERTFEPS(-49999964.267984382808, rotatedLoc2[1], 1.0e-4);
241 std::tie(
range, rotatedLoc2) =
242 RawRange::computeRange(loc1, t1 + dt, loc2, t1, ellipsoid,
true);
245 rotatedLoc2.
transformTo(Position::CoordinateSystem::Cartesian);
246 TUASSERTFEPS(-7000255.2240301342681, rotatedLoc2[0], 1.0e-4);
247 TUASSERTFEPS(-49999964.268635779619, rotatedLoc2[1], 1.0e-4);
256 TUDEF(
"RawRange",
"computeRange(Triple)");
257 Triple loc1(-7.0e5, -5.0e6, 3.0e6);
258 Triple loc2(-7.0e6, -5.0e7, 3.0e7);
265 std::tie(
range, rotatedLoc2) =
266 RawRange::computeRange(loc1, loc2, dt, ellipsoid);
274 std::tie(
range, rotatedLoc2) =
275 RawRange::computeRange(loc1, loc2, dt, ellipsoid,
true);
283 std::tie(
range, rotatedLoc2) =
284 RawRange::computeRange(loc1, t1 + dt, loc2, t1, ellipsoid);
292 std::tie(
range, rotatedLoc2) =
293 RawRange::computeRange(loc1, t1 + dt, loc2, t1, ellipsoid,
true);
306 TUDEF(
"RawRange",
"computeRange(Xvt)");
307 Triple loc1(-7.0e5, -5.0e6, 3.0e6);
310 xvt.
x =
Triple(-7.0e6, -5.0e7, 3.0e7);
319 std::tie(
range, rotatedXvt) =
320 RawRange::computeRange(loc1, xvt, dt, ellipsoid);
331 std::tie(
range, rotatedXvt) =
332 RawRange::computeRange(loc1, xvt, dt, ellipsoid,
true);
343 std::tie(
range, rotatedXvt) =
344 RawRange::computeRange(loc1, t1 + dt, xvt, t1, ellipsoid);
355 std::tie(
range, rotatedXvt) =
356 RawRange::computeRange(loc1, t1 + dt, xvt, t1, ellipsoid,
true);
372 TUDEF(
"RawRange",
"estTransmitFromReceive()");
374 Triple rxPos(-7.0e5, -5.0e6, 3.0e6);
381 std::tie(success,
time) = RawRange::estTransmitFromReceive(
398 TUDEF(
"RawRange",
"estTransmitFromObs()");
400 Triple rxPos(-7.0e5, -5.0e6, 3.0e6);
403 double pseudorange = 2e7;
408 std::tie(success,
time) = RawRange::estTransmitFromObs(
424 TUDEF(
"RawRange",
"fromReceive()");
426 Position rxLocation(-7.0e5, -5.0e6, 3.0e6);
434 std::tie(success,
range, xvt) =
435 RawRange::fromReceive(rxLocation,
time,
navLib, satId, ellipsoid);
459 TUDEF(
"RawRange",
"testFromNominalReceiveWithObs");
461 Position rxLocation(-7.0e5, -5.0e6, 3.0e6);
465 double pseduorange = 2e7;
471 std::tie(success,
range, xvt) =
472 RawRange::fromNominalReceiveWithObs(rxLocation,
time, pseduorange,
473 navLib, satId, ellipsoid);
497 TUDEF(
"RawRange",
"fromSvTransmitWithObs");
499 Position rxLocation(-7.0e5, -5.0e6, 3.0e6);
503 double pseduorange = 2e7;
509 std::tie(success,
range, xvt) =
510 RawRange::fromSvTransmitWithObs(rxLocation, pseduorange,
navLib,
511 satId,
time, ellipsoid);
535 TUDEF(
"RawRange",
"fromNominalReceive");
537 Position rxLocation(-7.0e5, -5.0e6, 3.0e6);
546 std::tie(success,
range, xvt) =
547 RawRange::fromNominalReceive(rxLocation,
time,
navLib, satId, ellipsoid);
570 TUDEF(
"RawRange",
"fromSvPos");
572 Position rxPos(-7.0e5, -5.0e6, 3.0e6);
574 xvt.
x =
Triple(-9e5, -2e7, 9e6);
584 std::tie(success,
range, returnXvt) =
585 RawRange::fromSvPos(rxPos, xvt, ellipsoid);
601 TUDEF(
"RawRange",
"fromSvTransmit");
603 Position rxPos(-7.0e5, -5.0e6, 3.0e6);
612 std::tie(success,
range, returnXvt) =
613 RawRange::fromSvTransmit(rxPos,
navLib, satId,
time, ellipsoid);
630 unsigned errorTotal = 0;
647 std::cout <<
"Total Failures for " << __FILE__ <<
": " << errorTotal