I want to create my own Field version of a function that transforms a state in inertial coordinates to curvilinear coordinates (given the reference state of the curvilinear frame as another inertial state). I don’t have much experience with Hipparchus or java, so something that is probably very simple is proving difficult.

For example, one of the first things I have to do is rotate the state of the ‘deputy’ (or chaser) to the frame of the reference orbit. But the components of this state are the field elements from which I want the derivatives at the end (basically a jacobian of the curvilinear transformation, but computed with differential algebra for checking purposses). Normally (in Matlab) I would just do:

```
r_dep_ECI = X(1:3,i);
v_dep_ECI = X(4:6,i);
r_dep_RSW1 = R_RSW1*r_dep_ECI;
v_dep_RSW1 = R_RSW1*v_dep_ECI;
```

But with the field elements I guess it should be like:

```
r_dep_ECI = X(1:3,i);
v_dep_ECI = X(4:6,i);
params = 6; % NUMBER OF PARAMETERS
% Order of derivation of the DerivativeStructures
order = 1;
factory = DSFactory(params, order);
x0 = factory.variable(0,r_dep_ECI(1));
y0 = factory.variable(1,r_dep_ECI(2));
z0 = factory.variable(2,r_dep_ECI(3));
xp0 = factory.variable(3,v_dep_ECI(1));
yp0 = factory.variable(4,v_dep_ECI(2));
zp0 = factory.variable(5,v_dep_ECI(3));
% r_dep_ECI = FieldVector3D(x0, y0, z0);
r_dep_ECI = Array2DRowFieldMatrix([x0; y0; z0]);
r_dep_RSW1 = R_RSW1.multiply(r_dep_ECI);
```

Where now the rotation matrix should be something that can accept the vector of derivative structures to linearly combine the columns…

I have yet to find a way to do this simple thing. Some advice?