New inertial acceleration calculation logic
Added new class to handle inertial acceleration. AGC's IMU, LV IMU, EMS, AGS, MechanicalAccelerometer and POV movement visuals are now fed from this new class. Tested with a lot of different scenarios where acceleration measurements are important: launch, entry, SPS burns, P47, P57, lunar ascent and rendezvous. I haven't seen any problem with the new logic of acceleration calculation.
I found only one relevant issue. The S-IVB class also needs to generate the intertial data. And then it needs the same code for the IULV_GET_INERTIAL_ACCEL message that you also added in csmconnector.cpp.
I've added InertialData and all the necessary stuff to the SIVB class. Tested on Apollo 9 with the first standalone S-IVB burn occurring at GET 4:45:41, and it put the vehicle on a H_apo ~ 3100km orbit.
Works great now! There is just one problem now, as you can see below there is a merge conflict in the Visual Studio files for the Saturn1B and Saturn5NASP modules. Your files for the inertial data class were added and something must have been changed since you branched off from the Orbiter2016 branch. I think all you need to do is merge the current Orbiter2016 branch back into your accel branch and then you need to solve the merge conflict with some annoying editing of those VS files.
If you want I could try to do that as well. Not sure how to directly amend your PR, but I could probably create a PR for your branch. So layers of PRs :D
I think I can fix it for you, standby.
Seems to work now. @ThymoNL can you take a look that I didn't screw something up, I didn't really know what I was doing and committed on a detached head.
Seems to work now. @ThymoNL can you take a look that I didn't screw something up, I didn't really know what I was doing and committed on a detached head.
Sure, I still need to do an in depth review either way. I'll be back from vacation on the 11th. Unless someone is urgently waiting on this I'll look at it next week.
See comments. Changes look good otherwise! Thanks
Hi all, I have reformatted the code according to Thymo's request. Per your discussion I haven't touched the saving-loading functionality of InertialData object.
I'll take care of fixing the conflict, like last time. I can also remove the commented lines. Stay tuned...