paparazzi-devel
[Top][All Lists]
Advanced

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

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


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Use of shifting operators in Paparazzi
Date: Mon, 26 Oct 2015 10:53:56 +0100

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 <address@hidden> 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 <address@hidden> 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 <address@hidden> 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
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



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



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


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



reply via email to

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