tigl icon indicating copy to clipboard operation
tigl copied to clipboard

Wrong sign in control surface hingLineRotation for port-side wing

Open joergbrech opened this issue 1 year ago • 1 comments

According to the CPACS documentation the hingeLineRotation of a control surface path is defined to be mathematically positive around the vector pointing from the inner hinge point to the outer hinge point:

The deflection path of the control surface is defined within the hinge line coordinat system. This is defined as follows: The x-hinge coordinate equals the wing x-axis. The y-hinge coordinate equals the hinge line axis (see above; positive from inner to outer hinge point). The z-hinge line is perpendicular on the x-hinge and y-hinge coordinate according to the right hand rule. The rotation of the control surface is defined as rotation around the positive y-hinge line.

For a starboard trailing edge device, a positive hinge line rotation means the device is rotated downwards for descend and for a port wing it would be the other way around: A positive hinge line rotation means the device is rotated upwards for ascend.

If a port-side wing is defined in CPACS (i.e. it is not a mirror of the starboard wing using the symmetry attribute) the hinge line rotation in TiGL has the wrong sign.

I suppose the error is somewhere in CTiglControlSurfaceTransformation::CTiglControlSurfaceTransformation.

Thanks @Cliersch for the find.

joergbrech avatar Jul 08 '22 10:07 joergbrech

I suppose this is related both to the ongoing discussion about symmetry in CPACS, see https://github.com/DLR-SL/CPACS/issues/609 and the discussion on coordinate systems in TiGL, see https://github.com/DLR-SC/tigl/discussions/911.

If we follow the CPACS definition precisely (which of course we should), we have a different sign of the hingeLineRotation for mirrored wings and non-mirrored wings on the port-side. This could be surprising for a user.

joergbrech avatar Sep 30 '22 10:09 joergbrech