You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EnuCoor_i structures can be expressed in INT32_POS_FRAC or centimeters, and its not always clear which unit is used.
I think its a huge risk to introduce bugs.
I would suggest reserving this struct for INT32_POS_FRAC coordinates, and make a new structure EnuCoorCm_i if centimeters are needed, to reduce the risk of errors.
I didn't know this problem existed. But seems like a good solution.
For me personally I prefer to do most calculations in float, since almost all autopilots can easily compute floats.
I was not meaning to really rewrite most of the code, but more if new code is made or code is refactored I don't mind anymore if it is only made using float's. Since it avoid's a lot of error's and mistakes with converting and precision etc.
EnuCoor_i structures can be expressed in INT32_POS_FRAC or centimeters, and its not always clear which unit is used.
I think its a huge risk to introduce bugs.
I would suggest reserving this struct for INT32_POS_FRAC coordinates, and make a new structure EnuCoorCm_i if centimeters are needed, to reduce the risk of errors.
Does anyone have an other suggestion ?
Example were it can be found:
paparazzi/sw/airborne/subsystems/navigation/waypoints.c
Lines 280 to 285 in b2c7f87
The text was updated successfully, but these errors were encountered: