at first I need to say that I'm having some difficulties to explain that properly, so I hope it's not too confusing...
A vessel/engine orientation is not a factor in a dv calculations. Also the autoburn will orientate the engine in a desired thrust direction. Therefore, this modification shouldn't effect in IMFD nor LTMFD.
Well, I don't know how IMFD/LTMFD works internally, I assumed that it expects the main engine to accelerate along the (Orbiter) z-axis exactly and this is no longer the case with the CSM.
I don't quite understand. I thought this would set the engine axis parallel with CSM axis ?? Not the other way around.
No, before my change, the SPS pointed exactly along the (Orbiter) z-axis with Trim/TVC angles 0°, 0°. With the trim angles set, the engine wasn't parallel with CSM axis anymore in Orbiter (but the AGC thought its parallel).
I don't understand what, exactly, is changing attitude ? Is the vAGC trying to simulate or estimate something related in attitude during SPS burn ? Is the COG of CSM changed lately from the vAGC or from the Orbiter ?
The TVC autopilot is controlling the CSM attitude as soon as the burn starts. The TVC autopilot doesn't look at the trim angles, but at the actual velocity change. So before my change, the "neutral" TVC angles (i.e. the angles where the CSM doesn't change its attitude, is flying straight) were still 0°, 0°. So the VAGC changed the TVC angles from the trim angles to 0, 0 again at ignition and then correcting the error because of that.
The CSM COG is still at the CSM z axis.
You mean that the SPS is now gimballed from the Orbiter version of the CSM to match the real thing ? Of course, that's a lot better way to solve the problem. But if there were a need to shift the engine, that would indicate that the COG of the CSM in the Orbiter lies in the main axis.
Correct, and yes, I didn't change the CSM COG but the engine position so the CSM is flying straight with commanded TVC angles 0°, 0°, which means that the engine is pointing to -2.15°, +0.95° in Orbiter.
Perhaps it's more easy to explain my change from the user's point of view: In the original version and with the trim angles you introduced, the TVC autopilot changed the CSM attitude rather violent directly after the burn starts (because either the initial thrust direction or the initial TVC angles were wrong), now it mainly maintains the initial attitude without much steering, i.e. the burn is quite "smooth" now. I hope my change is more clear now, please bother me otherwise.