I’m writing a measurement class for Ra/Dec and Ra/Dec-rates. I’m comfortable calculating the time-derivatives by hand, but thought it might be a good to try out the auto-diff methods that are available.

But I don’t know enough about these techniques and I’m stuck. Comparing to the `AngularRaDec`

class, instead of

`// Station-satellite vector expressed in inertial frame final FieldVector3D<Gradient> staSatInertial = transitStateDS.getPosition().subtract(stationDownlink.getPosition());`

I can compute

`// Station-satellite vector expressed in inertial frame final FieldVector3D<FieldUnivariateDerivative1<Gradient>> staSatInertial = transitStateDS.toUnivariateDerivative1Vector() .subtract(stationDownlink.toUnivariateDerivative1Vector());`

Which means that

`final Gradient baseRightAscension = staSatReference.getAlpha().getValue(); final Gradient rightAscensionRate = staSatReference.getAlpha().getFirstDerivative();`

However, in between the calculation of `staSatInertial`

and the angles, there is a transformation from the frame of the spacecraft state into the frame of the measurements (which produces `staSatReference`

). It currently looks like this

`// Field transform from inertial to reference frame at station's reception date final FieldTransform<Gradient> inertialToReferenceDownlink = state.getFrame().getTransformTo(referenceFrame, downlinkDateDS);`

but I would like this

`final FieldTransform<FieldUnivariateDerivative1<Gradient>> inertialToReferenceDownlink = state.getFrame().getTransformTo(referenceFrame, downlinkDateDS);`

The issue is that the `downlinkDateDS`

is an `FieldAbsoluteDate<Gradient>`

, not `FieldAbsoluteDate<FieldUnivariateDerivative1<Gradient>>`

. I don’t know how to include the time derivative structure into the date as well as the spatial derivatives (or even if that makes sense)?