Problems about getLv() in DSST

Hello everyone!
I am working on the tutorials of DSSTPropagation. I have a set of GNSS data from low Earth orbit satellites (including UTC time and J2000 position and velocity), and I have chosen the first point of this set of data as the starting point for DSST Propagation. The duration of the propagation is consistent with the time difference between the GNSS data.
But I had a problem calculating the true longitude argument of the propagation state.The SpacecraftState instance can directly call the getLv() function, but the range of true longitude argument it calculates exceeds [- pi, pi].

		for (int i = 1; i < fitEpochNum; i++) {
			propagateTime += OrbitInfo.timeDifferences[i];
			AllState[i - 1] = dsstProp.propagate(orbitDate, orbitDate.shiftedBy(propagateTime));

			double newLv = AllState[i - 1].getLv();
			System.out.println(newLv); 
			// The value of newLv here is
			//			-0.736281484311538
			//			-0.2164911328035871
			//			0.3038797049945364
			//			2.385656947078022
			//			2.905222012391197
			//			3.424251220119175
			//			3.942811120743328
			//			4.461152600597859
			//			4.979658881339886
			//			5.49869161030605
			//			6.018417002699664
			//			8.620566046472117
			//			9.14019080930766
			//			9.659282632209912 ……

			RealMatrix stm = dsstharvester.getStateTransitionMatrix(AllState[i - 1]);
			for (int j = 0; j < 6; j++) {
				int targetRowIndex = (i - 1) * 6 + j;
				double[] row = stm.getRow(j);
				System.arraycopy(row, 0, AllSTM[targetRowIndex], 0, 6);
			}
		}

But if a new equinoctial orbit is created based on the position velocity given by AllState [i-1], and then getLv() is called, there will be no such problem.

for (int i = 1; i < fitEpochNum; i++) {
			propagateTime += OrbitInfo.timeDifferences[i];
			AllState[i - 1] = dsstProp.propagate(orbitDate, orbitDate.shiftedBy(propagateTime));

			TimeStampedPVCoordinates pvCordNEW = AllState[i - 1].getOrbit().getPVCoordinates();
			EquinoctialOrbit eqOrbitNEW = new EquinoctialOrbit(pvCordNEW, FramesFactory.getFrames().getEME2000(), mu);
			double newLv = eqOrbitNEW.getLv();
			System.out.println(newLv);
			// The value of newLv here is
			//			-0.7362814843115377
			//			-0.21649113280358703
			//			0.3038797049945364
			//			2.385656947078022
			//			2.905222012391197
			//			-2.858934087060412
			//			-2.340374186436258
			//			-1.822032706581728
			//			-1.3035264258397004
			//			-0.7844936968735369
			//			-0.2647683044799227
			//			2.33738073929253
			//			2.8570055021280725
			//			-2.90708798214926 ……
						
			RealMatrix stm = dsstharvester.getStateTransitionMatrix(AllState[i - 1]);
			for (int j = 0; j < 6; j++) {
				int targetRowIndex = (i - 1) * 6 + j;
				double[] row = stm.getRow(j);
				System.arraycopy(row, 0, AllSTM[targetRowIndex], 0, 6);
			}
		}

The calculation method of true longitude angle argument indicates that it should belong to the range between [- pi, pi].

        // compute true longitude argument
        cachedPositionAngleType = PositionAngleType.TRUE;
        final double cLv = (pvP.getX() - d * pvP.getZ() * w.getX()) / r;
        final double sLv = (pvP.getY() - d * pvP.getZ() * w.getY()) / r;
        cachedL = FastMath.atan2(sLv, cLv);

Why do different calling methods of getLv() result in different calculation results? If there is a problem with directly calling getLv(), then is there also a problem with the state transition matrix I calculated?
Assuming that the 6 orbital elements for the initial epoch is A0 and the 6 orbital elements for the predicted state is A1, does the state transition matrix STM1 calculated based on A0 and A1 satisfy A1=STM1 * A0 ?

Thanks

Hi there,

If you build your orbit from position and velocity, the angle will be in such interval. However if it comes from propagating orbital elements through time e.g. with the DSST, then it will have grown, depending on the number of revolutions performed. Does that make sense? I’ve not checked the java doc maybe it’s not clear or erroneous.

Cheers,
Romain.

Thanks a lot!