Hello Folks,
I have still a big problem with the DCS Roll also called Bank Vektors.
I have to adjust the DCS Bank Export Value (Effekt 25) or alternative ac.Bank.
Reason: This DCS vector is a combined body frame vektor, but i need a fixed world frame vektor in order to get a prober 360° Bankangle in my MotionPit.
Elseway the bank vektor is turning upsidedown, when pitch reaches 90°.
Therefor i need to convert the bank angle. This is best done in the export.lua from DCS World.
First i read out the Eulerwinkel (XYZ) like this:
ac = LoGetSelfData(lACid)
bank = ac.Bank
pitch = ac.Pank
Yaw = ac.Heading
So we have our three body frame vektors.
No comes the tricky part. I testet a few formulas like this:
roll = (math.cos(ac.Pitch)) * ac.Bank
roll = math.cos(ac.Pitch) * ac.Bank
or
roll = ac.Bank * math.abs(math.cos(ac.Pitch))
But still the Bank angle flips at somehow at Pitch up 90°. I also tried without radiant converting vaktor with math.deg() .
And also tried with the original vektors (LoGetADIPitchBankYaw())
No Effekt, see also screenshots with vector vaults.
Has someone a clue?
André