Custom Estimates Extensions
|Top Previous Next|
A Custom Estimates FreeFlyer Extension allows you to hook into the FreeFlyer Orbit Determination system from an Extension to include additional estimable properties, or "solve-fors," in the state vector. This allows you to solve for physical properties that affect a custom force that's defined in a FreeFlyer Extension. Some examples include custom drag or list models, estimating force scaling factors, solving for Spacecraft object properties, and solving for CelestialObject properties.
•Properties can be added to the state vector for orbit determination (OD)
•Example: James Webb Space Telescope (JWST)
oEstimable Force Extension to vary SRP scaling factor
oExtension developed for accurate orbit determination
The Custom Estimates Extension provides a few additional features over a Custom Force Extension.
Creating a Custom Estimates Extension
The process to create a Custom Estimates Extension is similar to the creation of a Custom Force Extension, and requires only a few extra steps beyond those covered in the Anatomy of a FreeFlyer Extension guide.
Override the BaseTypeName Property
Override the BaseTypeName property and return AvailableBaseTypes.CustomForce:
Tag Properties Using the EstimablePropertyAttribute
FreeFlyer determines what properties are available for estimation through the EstimableProperty attribute. To make a property estimable, tag it with the attribute in the interface definition.
If you intend to do your own validation of the state update on the estimable property (via the ValidateStateUpdate interface) prior to its application, include the optional state validation constructor argument.
Implement the ICustomForceWithEstimablePropertyExtension Interface
When estimating a property of an Extension, the ICustomForceWithEstimablePropertyExtension interface must be implemented instead of the ICustomForceExtension interface. For optimization reasons, this provides the CalculateForceAndPartials interface instead of the CalculateForce interface. Note that this interface is available as part of the version 2 FreeFlyer Extensions SDK. As a result you must also implement IFFObjectExtension as shown below.
The CalculateForceAndPartials method must be implemented to provide FreeFlyer with the model for the custom force, as well as the acceleration partials.
The needToComputePartials flag indicates whether the partials are needed in the particular stage of the estimation process. FreeFlyer sets this flag and it can be used in your Extension as an optimization, as the STM is not needed in all phases of integration in the estimation process. A Custom Estimates Extension works with the variational equations to determine the sensitivities between state elements through the state-transition-matrix (STM). The CalculateForceAndPartials method implementation must provide the A, B, and C matrices for use in the variational equations. The A, B, and C matrices are defined as follows.
The N dimension of the C matrix is determined from the call to CalculateDatePriorToStep.
The CalculateDataPriorToStep method is called prior to each integration step. This method can be used to pre-compute values that will be constant through the phases of the integration process.
The ISTMCalculation interface provides a mechanism to determine what properties of the Custom Estimates Extension are in the C matrix and their corresponding column indices. This data should be stored as member data for use in the CalculateForceAndPartials method.
ValidateStateUpdate is called by FreeFlyer for properties that are tagged with the EstimableProperty attribute with the validateStateUpdate argument set to true.
Setting isValid to false will terminate the estimation process at the stage of the estimation process where the state update is computed for the estimable property. This is a recoverable error, via the Try command in FreeFlyer script, which provides a mechanism to remedy the issue at the Mission Plan level. Note that if no properties are tagged with the EstimableProperty attribute with the validateStateUpdate argument set to true this method is not called. Regardless, it still must be implemented in order to fulfill the interface contract.
Using a Custom Estimates Extension
Once a Custom Estimates Extension has been built and registered for use with FreeFlyer, a Custom Force with an EstimableProperty is created in FreeFlyer script and added to the Spacecraft ForceModel like any other Custom Force.
When a property is marked with the EstimableProperty attribute the AddForce method will create a new EstimableProperty object associated with that property and add it to the SpacecraftODProperties child object of the Spacecraft. To access the EstimableProperty object associated with the custom solve-for, use the SpacecraftODProperties.GetEstimableProperty() method.
The GetEstimableProperty() method provides access to all the tuning and statistical properties of any other EstimableProperty native to FreeFlyer at the FreeFlyer script level.