paparazzi-devel
[Top][All Lists]

## Re: [Paparazzi-devel] Use of shifting operators in Paparazzi

 From: Flavio Justino Subject: Re: [Paparazzi-devel] Use of shifting operators in Paparazzi Date: Mon, 26 Oct 2015 17:41:47 +0000

Thanks for replying Felix ;) One last question: what about Double instead of float? What is the main difference (not theoretically as a programming type but for the case of paparazzi objectives). Do you think that it will have any interference in the results relatively to float? Thanks man =)

2015-10-26 9:53 GMT+00:00 Felix Ruess :
Hi,

@Sreenath:
the variables should be properly documented in the code with doxygen, see also the generated docs: http://docs.paparazziuav.org/latest/guidance__v__ref_8c.html#a61ea35c28ade47f77f09a012aa0f4fe4

@Flavio
of course you can write your algorithm in floating point, more than half of the estimators we have are written in float.
Especially when you have an MCU with floating point unit (like an STM32F4), you shouldn't worry about performance impacts of using float.

Cheers, Felix

On Sun, Oct 25, 2015 at 6:53 AM, Flavio Justino wrote:

hi guys! Actually i have the same question about bitshifts. I am trying to write a new filter solution but it is complicatef with the bitshifts to understand in the end what is the real coefficient that I need to multiply the value for to get the real value. Is it possible just not to use them? I mean, instead of using Int32Eulers and Rates just to use float or double variables with no bitshifts? Thanks guys!

Flavio

Em 24/10/2015 20:01, "Sreenath Dama" <address@hidden> escreveu:
Thanks felix,

Is there any detailed documentation about the shifting amounts of different variables like speed, accel, gv_z_ref, gv_zd_ref,, etc. I and my friend are trying our best to decode them by studying the codes.

On Fri, Oct 16, 2015 at 3:25 AM, Felix Ruess wrote:
Hi,

since different variables represent different values (resolution and range), the fixed point representation is shifted by different amounts to represent the values with a reasonable range and resolution.
E.g. an angle is max 360deg before it wraps around, so the range is limited...

Hope that helps,
Felix

On Thu, Oct 15, 2015 at 1:01 PM, Sreenath Dama wrote:
I would be really grateful if someone could help me understand why different shifting values are used for different Variables in Paparazzi codes. What is the reason behind the same ?

Thanks,
Srinath Dama

_______________________________________________
Paparazzi-devel mailing list
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list