Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

EKF introduce ecl_float_t type for double precision floating point where available (disabled by default) #613

Closed
wants to merge 1 commit into from

Conversation

dagar
Copy link
Member

@dagar dagar commented Jun 8, 2019

@dagar dagar force-pushed the pr-float_t branch 5 times, most recently from 54a4262 to 337f7e6 Compare September 13, 2019 19:57
@dagar dagar changed the title [WIP]: EKF introduce ecl_float_t type for double precision floating point (where available) EKF introduce ecl_float_t type for double precision floating point where available (disabled by default) Sep 13, 2019
@dagar dagar marked this pull request as ready for review September 13, 2019 19:58
@dagar dagar force-pushed the pr-float_t branch 2 times, most recently from cfd3882 to 2801e85 Compare September 13, 2019 20:10
@dagar
Copy link
Member Author

dagar commented Sep 13, 2019

@priseborough @RomanBapst this adds the ecl_float_t type with a mechanism to set it to 4 byte float or 8 byte double based on hardware.

What's different now is it's completely disabled by default, but with a test fmu-v5 build (px4_fmu-v5_ecldouble). This will allow to to gradually evaluate everything in place.

@priseborough
Copy link
Collaborator

Sorry I missed this. It now has a lot of conflicts that need to be resolved. @dagar if you are able to resolve these, then I will review this as a priority item.

@lukegluke
Copy link

@dagar, isn't there a mistake - cosf()/sinf() will be used for double case too?

@dagar
Copy link
Member Author

dagar commented Dec 21, 2020

@dagar, isn't there a mistake - cosf()/sinf() will be used for double case too?

Yes that should ideally be handled as well, although my first priority was converting the bulk of the lengthy generated numerical code.

This actually stalled for a couple of reasons.

  1. This change was actually quite slow (significant increase in cpu) on the current generation of stm32f7 processors that have double precision floating point units. I believe this is largely due to the the size of nearly everything doubling. If possible I'd like to try and identify the potential problem areas to more selectively perform the work with doubles.
  2. At this point we'd still need to fully support ecl with single precision float for stm32f4. We can do it if there's value, but my concern would be nearly all developer and testing activity focused on the newer boards, inevitably leading to subtle problems only on stm32f4.

@priseborough
Copy link
Collaborator

This has bit rotted by a lot. The ability to use double precision is something to aim for given HW development roadmap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants