|
Re: Floats
Dave brings up good points. I didn't intend to state that I wanted to use a ridiculous number of floats in my operations, but I've found that for certain things, the precision is necessary. However, I know that a few floats won't kill the controller and make it skip packets unless you go overboard, so you don't actually have a problem (unless I'm mistaken). If I didn't have to use floats for certain operations, I wouldn't because they do add alot more strain then any programmer would like to have in a limited resource system. I guess I'm just curious where the line is drawn between being safe in your use of floats, and when you'll start to observe packet loss (which is something nobody wants). I've been coding using the fewest floats I can while still getting the precision I need in some parts (with sensor calculations specifically).
Dave, do you know any other ways to work with the decimal calculations in these sensor calculations so that you run the least risk of having problems meanwhile still keeping the accuracy neccessary? Currently, I'm just doing my best to use the least number of floats possible. Thanks!
|