There are no differences between QSW, RSW, USW and RIC frames, just the name of the convention change. There is at least another name for the same frame: LVLH.
In order to find the delta-v vector, you should compute the difference in an inertial frame first, and then project it to another frame if you want. However, there is a distinction between what I call projecting a velocity in a frame and transforming a velocity to a frame. When I write “projecting”, I mean you compute the velocity or velocity difference in some frame 1 (here an inertial frame), and then you apply rotations only so you get this inertial velocity coordinates in another frame, which may not be inertial. When I write “transforming”, I mean you that you compute the velocity in some frame 1 (here an inertial frame), and then you apply both rotation and velocity composition so you get the velocity relative to another frame. They key part is to apply or not apply frame velocity composition. In Orekit, you can do either depending on your needs. If you just want to apply rotation and ignore velocity composition, you call
transform.transformVector(v). If you want to apply both rotation and velocity composition, you need to have the position too, so you call
So in your case, I would suggest this:
SpacecraftState stateBefore = ...;
SpacecraftState stateAfter = ...;
Vector3D deltaVInInertialFrame = stateAfter.getPVCoordinates().getVelocity().
Transform inertialToSpacecraftFrame = stateBefore.toTransform();
Vector3D deltaVProjected = inertialToSpacecraftFrame.transformVector(deltaVInInertialFrame);
Beware that the previous code snippet works only if the attitude in the
stateBefore object is realistic. If it is realistic, it works regardless of the attitude control you selected when building the propagator that generated this state: it would even work in yaw compensation mode or spin stabilized, or celestial pointing or anything else. So if you need it in QSW, then you should configure the propagator for use
LofOffset as the attitude provider, with a