Least Squares (LS)

The LS object is represented in the Browser and in the ODTK toolbar by the icon. You can introduce the LS object manually and configure it in the Object Properties window, as described below.

The following table describes LS attributes that you can configure:

Least Squares Properties
Property Description

When processing TDRSS, TDOA or FDOA measurements, use this list to select the relay satellites that will be used to process measurements. To configure a satellite as a relay satellite for use in Least Squares, set its EstimateOrbit flag to false and assign a valid reference ephemeris. Also make certain that no measurement statistics are defined for it. When these conditions are met, the satellite will appear in the RelaySatList as an available relay satellite.

NOTE: Relay satellites must be added to the list to be included in the least squares processing. If a relay satellite is not added to the list, measurements relating to that satellite will not be processed.

TrackerList The TrackerList attribute is used to subselect the trackers that will be used in Least Squares. If the list is empty, all available trackers will be used. If trackers are added to the list, then only the measurements that are related to the trackers in the list will be processed. Satellites that are trackers must be configured to use a reference ephemeris.

NOTE: If a satellite is a tracker (using a Eph Pos and Eph Vel) that satellite is automatically a tracker if Pos Eph and or Pos Vel statistics are specified.

EmitterList This attribute allows a unique selection of emitters to be used in a Least Squares solution. The emitter list is shown in the Data Limiting section of the Static Product Builder; however, it is not used to actually limit the display of Least Squares residual data.
MeasTypes The MeasTypes list is used to select the measurement types that will be used in least squares. An empty list is equivalent to including all measurement types.

When opening the Stages list, the software reads through the measurement file to determine the span of data and to determine how many measurements are in any currently defined stages. If the scenario contains many measurements and the process consumes too much time, you can skip the tabulation of measurements. If this attribute is set to false, when you open the Stages list you will see that NumMeasurements is set to 0.

Tip: By setting this attribute to false, you can speed up the display of the stages list by skipping calculations of the number of measurements for each stage. This is very useful when you are dealing with large measurement files.


Specify the latest iteration when updated sigma editing decisions will be made. Later iterations will continue to use the same editing decisions. This option can accelerate convergence when changing editing decisions result in a moving optimization target.

Stages Select the Stages property, and click where indicated to display a List window that lets you define one or more LS stages.

This property allows the user to restart LS using the last LS solution estimates (i.e. those that are displayed in the “Output” properties). It is intended to allow LS to restart when the previous LS hit maximum iterations. This property will be greyed out when a “last solution” is not available (e.g. new scenario, previous LS failed before reaching maximum iterations). On load this parameter is set to false. If set to true and the subsequent LS run again hits maximum iterations it will stay true; if the run runs to normal completion it will be changed to false.

Note that restarting may not be an exact match when compared to an LS run that runs entirely to completion. This pertains primarily to when the LevenbergMarquardt LineSearch method is used. In this case the initial deweighting will be used on the next iteration since the deweighting algorithm parameters are not carried over.

CustomDataEditing These attributes allow you to thin, include or exclude tracking data in any combination of time/measurement type/tracking strand/primary object, where primary object refers to all or any satellite, GNSSSatellite or emitter.
ResidualEditing These attributes mimic the CustomDataEditing attributes but are intended to store the results from using the Graphical Residual Editing tool.
OrbitStateUpdateRepresentation Select the coordinates to be used when updating the non-linear orbit trajectory at the end of each iteration. Choices are Cartesian coordinates and equinoctial elements. The state update is always computed in Cartesian coordinates, but can be linearly transformed to an update in equinoctial elements. For closed orbits where the motion is dominated by the two-body dynamics, the equinoctial option typically leads to faster convergence and an increased capture region. Cartesian coordinates can be used for all classes of orbits, including open orbits.

If MKL is enabled then the SolveForMethod option allows the user to select either the MKL QR, Factorization, SVD, or DivAndConquer Linear Least Squares (LLS) method as the ODTK LS solve for method. For new scenarios "Factorization" is the default; for scenarios created prior to ODTK 6.1.1 QR is used. If MKL is not enabled then the user can only select the non-MKL QR algorithm.

QR - Uses the QR factorization method.

Factorization - Computes the minimum-norm solution using the complete orthogonal factorization of the A matrix.

SVD - Computes the minimum-norm solution using the singular value decomposition of the A matrix.

DivAndConquer - Computes the minimum-norm solution using the singular value decomposition of the A matrix and a divide and conquer method.

Reference the LAPACK User's Guide for more details.

CombineMeasUncertainty Measurement statistics typically contain two sources of uncertainty: white noise and serially correlated uncertainty modeled as a Gauss Markov process. When set to true, this option will compute an effective measurement noise variance for least squares estimation by summing the white noise variance and the Gauss Markov variance. When set to false, the white noise variance from the measurement statistics is used.

This property is intended to aid in those cases where the LS corrections become so large that the solution diverges. Method choices include:

Method = None. No line search method is selected.

Method = FractionalShift. When divergence is detected then the most recent state correction is scaled by the input “Fraction” and retried. This process is continued until a better RMS is achieved or until the MaxTrys limit is reached. Note that this method changes the length of the correction vector but not the direction.

Method = LevenberqMarquardt. If the “direction” of the actual solution is too far from the nominal LS correction then both its direction and length must be changed to find a solution. The LM algorithm tries to accomplish this by deweighting the diagonals of the ATWA matrix such that the deweighting is small if it is determined that the correction is in the right direction, but the deweighting is large if not in the right direction. The deweighting is initially controlled by the input parameter “tau”; the larger the tau the more the deweighting. Subsequent to the first iteration the algorithm adjusts tau. The larger the value of tau the more likely is convergence, but convergence may be slower than necessary. An initial tau of 0.001 to 1 is recommended for cases that are expected to be difficult; a value of 0.000001 (or less) should behave similar to a nominal LS run. The deweighting on successive iterations can be controlled by one of two methods: “GainRatio” or “FixedDamping”. If “GainControl” is selected the change in the deweighting is calculated by the code based on the change of the actual RMS to the predicted RMS. If “FixedDamping” is selected then the change is controlled by the “AcceptDampingFactor” and “Reject DampingFactor”. If the correction improves the RMS then the “AcceptDampingFactor” will be used to lower the deweighting factor (factor_new = factor_old/“AcceptDampingFactor”). If the correction does not improve the RMS then the “RejectDampingFactor” will be used to raise the deweighting factor (factor_new = factor_old x “RejectDampingFactor”).

MaxOrbitChange = Maximum fractional position and/or velocity change allowed in one iteration before applying a fractional shift and/or increasing the LM dampening.

Epoch Control The EpochControl attributes allow the user to set the epoch of the reported Least Squares solution, which is by default at the start time of each stage. The Output.OrbitState.Epoch attribute will be determined by these settings.
UseAprioriCovariance Controls are provided to allow for the inclusion of apriori covariance information into the least squares solution. When used, the apriori states are considered to be pseudo-observations with uncertainty as specified by associated settings in the satellite object. Apriori information is optionally included for the Postion/Velocity of the satellite, solved for drag states, solved for solar pressure states, transponder biases, and measurement biases. When Least Squares runs it will skip a check of the satellite's covariance eigenvalues unless it is using the apriori covariance.
TransBias For transponder biases, the Transponder estimates flag must be enabled.

Consider states are constant parameters that are not estimated as part of the solution vector, but whose uncertainty is accounted for in the output covariance matrix. The assumptions for the consider states are that 1) they are constant, 2) their a priori estimate and a priori covariance is known.

Current consider state choices are:

  • Drag (ballistic coefficient)
  • Solar Pressure
  • Measurement Biases

To be used as a consider state:

  1. The LS.ConsiderStates parameter must be enabled
  2. The corresponding LS.Stages parameter must not be marked for estimation
  3. For force model parameters, the Satellite option force model use flag and estimate flag must be enabled.
  4. For measurement biases the corresponding measurement type must be enabled and the corresponding Measurement Statistics estimateBias fag must be enabled.

Note that if the user marks a state for both estimation (in LS Stages) and consider, then it will be estimated with the consider selection ignored.

Reference: Tapley, Schutz, and Born, 2004, “Statistical Orbit Determination”, Elsevier Academic Press, Section 6.3

OutputUncertainty Least Squares orbit solution uncertainty in RIC sigma-correlation form. This accounts for the effects of both estimated states and consider states. This is a read only property and reflects the orbit uncertainty that would be transferred to the satellite object if the transfer state button or function is applied.
CheckForDivergence Divergence is defined as two successive increases in RMS. If this attribute is set to true, then the Least Squares process will terminate if divergence occurs. Otherwise, Least Squares will run until it either reaches a solution or reaches the maximum number of iterations.
NumDivergingIterations The number of consecutive iterations with increasing values for the weighted RMS required to declare LS divergence. For example, a value of 1 will cause the LS process to stop based on divergence upon the first time the weighted RMS increases from one iteration to the next.
CheckConditionNumber Set to true to have the LS process compute the condition number of the LS normal matrix on the first iteration of each stage. If the condition number is greater than 10^14, a warning message will be printed to the message viewer.

When enabled the LS process will use the absolute RMS in conjunction with the standard relative ratio criteria to test for convergence. Here RMS refers to the weighted RMS where the residuals are weighted by the reciprocal of the white noise sigma of the associated measurement type (i.e. the lower the sigma, the higher the weight). When enabled, convergence will be achieved when (and only when) either 1) the relative ratio criteria is met and the RMS is less than the "AcceptableRMS", or 2) the RMS is less than the "ConvergedRMS".

  • Enabled = enables the Absolute RMS tests
  • AcceptableRMS = used to deny convergence even if the relative ratio test is met. For convergence, requires that the RMS be less than this value in addition to a successful ratio test. (See the Stage List property "RMSConvergenceCriteria" for definition of the relative ratio test.)
  • ConvergedRMS = used to accept convergence even when the relative ratio test is not met. Convergence is achieved if the RMS is less than this value. (Note this test can essentially be disabled by setting its value to zero).
MaxIterationsStatus Specify if exceeding the maximum number of iterations is interpreted as Success or Failure. If the number of iterations executed by the least squares process exceeds the limit when MaxIterationsStatus is set to Failure, a restart record is not written and ephemeris predictions are not performed.
Output Set various output options for the LS run.

Note: LS uses satellite transponder bias in its calculation process.

For practice in setting up and using the LS object, see Exercise 2.1 in Getting Started with ODTK.

ODTK 6.5