paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] Regarding floating point calculations on Tiny


From: Haiyang Chao
Subject: [Paparazzi-devel] Regarding floating point calculations on Tiny
Date: Thu, 8 Oct 2009 01:43:22 -0600

Hi, all.

Just wondering if anybody got the similar problem as I do with the floating point calculations. I doubted one of my functions may have too much floating point calculations that it corrupted the stacks in that function. Things just went pretty unpredictable once it entered that function.

I am trying to add some new functions in the low level controller of TinyTwog. For example add function void FancyControl(void) in fw_h_ctl.c, which will run at 60 Hz with lots of floating point multiplications and divisions. The most intensive calculation will be one line that has 16 multiplication/division of float variables. I think that line is the problem.

So anybody has any suggestion on how to use the float variables wisely or efficiently to avoid problems?  Should I avoid using float variable at all, or there are some limits on how many float variable i could claim? Also any limits on how many times of multiplications we could use in one function?

Any suggestions?

Thanks
 
Haiyang Chao


reply via email to

[Prev in Thread] Current Thread [Next in Thread]