AirfoilShape.s_to_01 gives negative values due to rounding error
In the upcoming FEPROCWrapper
I have used the function AirfoilShape.s_to_01
https://gitlab.windenergy.dtu.dk/frza/PGL/blob/master/PGL/components/airfoil.py#L195 in a similar manner as used in BECASWrapper.cs2dtobecas
. After s_to_01 conversion it can happen that negative values are assigned to s[0], i.e. -0.1E-16. This can be due to a rounding error in the computation in sLE? However, it might be useful to include a safety clause like:
if s >= 0.0:
return s*(1.0-self.sLE) + self.sLE
elif s == -1.0:
return round(abs((1.0+s)*self.sLE))
else:
return (1.0+s)*self.sLE