FormU

From Gaskell

On Jul 20, 2020, at 10:17 AM, Eric Palmer <epalmer@psi.edu > wrote:

I felt like I could describe residuals well enough, but not formal uncertainty. Here is the prose I am using in my in-lab testing error paper. I don’t know if you can use it directly, or if you need to paraphrase. The formal uncertainty is all from Bob.EricFormal UncertaintyOne of the main internal measurement components is the formal uncertainty of the model. This value provides the mathematical expected errors. Fundamentally, these are the square roots of the diagonal elements of the covariance matrix used for the calculation of the landmark positions or spacecraft position. The details of these calculations are contained in ____Ref Liounis, 2015. The observables that are used in determining the landmark vectors, the spacecraft positions and camera orientations are the ensemble of sample/line locations of landmarks in the images, determined by correlating illuminated maplets with the imaging data. If all these quantities were perfectly known, the location (s,l) of the maplet in the image could be predicted and that should be the same as the observed location (s0,l0). The actual landmark vectors and spacecraft (s/c) states can be estimated by minimizing the sum of (s0-s-δs)2/σ2 + (l0-l-δl)2/σ2 *over all images and landmarks where σ are the pixel measurement uncertainties. The differentials δs and δl are expressed in terms of differentials (changes to) the estimated parameters, eg δs = Σ ∂s/∂pi δpiSetting the partials of * with respect to each δpi equal to zero leads to a set of coupled linear equations that can, in principle, be solved for the estimated parameters. A complete solution of the set of equations described above would require the inversion of a very large information matrix, 100000 x 100000 or greater. Flight Dynamics (FDS) solves this problem by limiting the landmarks to a small set and solving for the s/c states along a limited data arc. SPC uses all the data but solves the equations iteratively, fixing the landmark or s/c parameters and solving for the others in turn. Each landmark is solved for separately (a 3x3 martix inversion) as is each image (6x6 matrix inversion). The inverted matrices are called the covariance matrices, and the square roots of their diagonal elements provide the formal uncertainties of the corresponding parameters. The results of each landmark iteration are carried to the s/c state iteration using the formal uncertainties of the landmark vectors to augment the sigmas. Similarly, the formal uncertainties in the s/c state solution feed into the sigmas for the next landmark iteration. The procedure described above is not sufficient to provide a solution. Extra constraints are necessary. The star tracker provides an initial estimate for the s/c orientation. The FDS solution includes Doppler measurements, modeling of solar pressure and other “nongravs” and a complete integration of the s/c trajectory over the data arc. The s/c orientation is also improved through star measurements made in saturated images straddling each opnav image. These results for the s/c state are included to condition the complete solution.A s/c state solution is performed for each image independently. In reality, these solutions lie on a trajectory determined by the FDS integration. The relative inertial space locations of images on this trajectory can be used to smooth the SPC s/c state solution. Similarly, maplets corresponding to neighboring landmarks can be correlated to determine their relative position, and these results can be used to condition the SPC landmark solution.The SPC and FDS solutions can be entirely consistent within the constraints of the data and still not provide an exact solution for the size of Bennu. At a range of 5 km, a range error of just 50 cm (1 part in 10000) would correspond to a 2.5 cm error in the size of Bennu. OLA range data provides its own model, directly measuring the range to asteroid surface points, but the model’s size is directly dependent on the s/c position solution. During Detailed Survey, both OLA and SPC observations were taken and correlation of surface features from both sources using the SPC s/c position solution provides a direct measurement of the SPC range errors sufficient to determine the size of Bennu to a few centimeters. ____ Bob needs to describe the method for which it is solved and the math.FIXME — Add mathResidualsOne component of the formal uncertainty is how closely the predicted position of each landmark matches its position within all the images. The positions of landmarks are determined mostly by the covariance of the pixel/line positions of all the images that were used to create it. As such, the calculated position of the landmark will show some dispersion among all of the images. This is recorded as a residual position within the landmark. Similarly, every image has multiple landmarks in its field of view with a pixel/line position in the image. The landmarks' 3D positions will map to specific pixel/line locations on an image. Because every landmark has a pixel/line position on the image determined by cross correlation (rather than mathematically), the dispersion of pixel/line positions across the image will determine a residual error within the image.In typical operations, this value is between 1 and 3 times the GSD. Such values indicate that the data is matching within a few pixels, indicating an excellent model. They also mean that, where every image predicts it, a landmark falls within just a few pixels. Additionally, they mean that every landmark in an image matches the expected location to within a few pixels. Provided the image data is not anemic (i.e., very limited in observing conditions), then it requires the shape model to be accurate to a few pixels, which we have seen in our testing.ResidualsThe other internal statistic that is frequently used are the residuals, the deviation between the model and the associated data. With SPC, almost all parameters are over-constrained. A residual is dispersion among all of these observations. For a vertex, the single value reported is the solution that minimizes the residuals of the associated data. Three different residual values are used with SPC.Landmark positions.The center of each landmark (or MAPLET) is set in body-fixed space as a vector in SPC. This vector defines the location of the landmark in 3D space. All of the images used in a landmark combine to define its position. Additionally, SPC has the ability to provide additional conditioning (or inputs) to the position of the landmark incorporating data from images that include Bennu’s limbs, data from overlapping landmarks and, finally, a reference shape model. When the position of the landmark is calculated, SPC calculates the dispersion where each image predicts the center of the landmark to be. These dispersions are converted into physical distance (translating from image pixel and line to meters), then used to compute the residuals of the landmark position. This value is typically one to three image pixels (Palmer, et al., 2016).Image positionsOnce SPC has generated a shape model, it has the ability to solve for the position and pointing of the spacecraft. All of the landmarks assigned to an image are used in determining the position of the spacecraft and its pointing. Again, the position and pointing can have additional conditioning (or inputs) that include a measurement of Bennu’s limb in an image, the nominal position and pointing (as derived from the reconstructed SPICE kernels), and the agreement of neighboring images taken during an orbital short-arc (i.e., each image’s position is consistent with recent images). Each landmark provides a vector from the shape model’s surface to the focal plane of the imaging camera and is defined by the pixel/line location of the landmark on the image. The location and pointing of the spacecraft is the solution that minimizes the dispersion of the vectors in 3D space.Sigma - Shape files/BIGMAPSThe standard pixel width of MAPLETs is 99 pixels, which is not a very large region. To make larger DEMs, SPC combines the MAPLETs to generate either a global shape model or a region DEM. SPC landmarks have significant overlaps, not only with landmarks of the same GSD, but also with lower resolution landmarks. When the final shape is created, all landmarks are sampled at each vertex. In normal operations, the value of the shape model at that vertex is the weighted average of the height (the weight is based upon the GSD of the landmark with higher GSD landmarks having more influence). SPC will write out the dispersion of these heights as one-sigma standard deviation residual error.This statistic provides a measure of how well all of the MAPLETs agree with one another. If one MAPLET has a mis-registration of images, too few images, or a poor sampling of images, then those issues could result in the MAPLET being too high or too low and its overlaps with other MAPLETs become very obvious. This statistic is provided with both a single value for the maximum and the average for the region. Additionally, each vertex reports the dispersion of errors so that data can be plotted. This is one of the more common ways that errors can be detected using this statistic.

Andrew J. Liounis

This is Andrew's paper from a summer intern at GSFC.

SPC Math Spec.pdf

Al Asad's

paper on OREx shape

Al_Asad_2021_Planet._Sci._J._2_82.pdf

Gaskell's paper on SPC Math

Doesn't cover much on Formal Uncertainty

SPC Math Spec.pdf

John's explanation

FormU is so far the best way to reduce the uncertainty of an SPC model to a single number. It combines the pointing and limb uncertainties from RESIDUALS.TXT that are extracted by get80. Note that RESIDUALS.TXT won't have limb information if PICWTS and LMKWTS have limb weights set to zero (see bottom of residuals).

Typically you will get FormU from the maplets with the best GSD, but sometimes it is worthwhile to calculate it for all maplets. Part of the Class B certification for the OSIRIS-REx mission was to determine FormU during various stages of shape model (i.e. global DTM) generation of testing model Shape 3. We found FormU was always within a factor of 2 of the actual error. The actual error of an SPC model is usually never known, but in this case we had a digital truth model for comparison (Weirich et al., 2022). This sort of testing was never performed for a regional DTM, but from a theoretical perspective there's no reason this factor of 2 relation wouldn't apply to a regional DTM. For a regional map, since you need to run it through RESIDUALS, probably the easiest way to limit the maplets to the regional DTM is to copy USED_MAPS.TXT to LMRKLIST.TXT and then run RESIDUALS.

To calculate FormU, perform the RMS of col 5 from the tmp80b output from get80. So the equation will be of the form SQRT( [SUM( (col 5)^2 )] / (number of rows in tmp80b) ). Probably the easiest way to do this is to change tmp80b into a csv file and open it in Apple Numbers or Microsoft Excel, but the method doesn't matter.

(Compiled by JRW)