Control Signals

Firmware/software/electronics/mechanics
Post Reply
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Control Signals

Post by EduardoAguilar »

Hi guys!!

I have some questions about the file power_distribution_stock.c

In this file we send motorPower to motors but I don't know what are the unites.
Are Newton Meter?

And Can I to obtain the motorPower information?

Thank you!!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Control Signals

Post by kimberly »

The motor power is more of a thrust percentage mapped to a uint16_t, where 0 is no trust and 65535 is full thrust. Its not really a unit in that sense.

Here is a page with some investigations (not converted to the new documentation structure yet): https://wiki.bitcraze.io/misc:investigations:thrust
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Re: Control Signals

Post by EduardoAguilar »

Thank you so much Kimberly!!
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Re: Control Signals

Post by EduardoAguilar »

Hi Kimberly!!

Can I see or obtain the information about uint16_t ?,
I want to see what is the thrust of each motor.

Thank you :)
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Control Signals

Post by kimberly »

This is a datatype, which is important to know for embedded programming. A uint16_t is an unsigned integer of 16 bit (2 bytes) long. Check out this link for the ranges but c coding guides should be able to explain this too on the internet.
EduardoAguilar
Beginner
Posts: 27
Joined: Tue May 05, 2020 2:05 am

Re: Control Signals

Post by EduardoAguilar »

Hi Kimberly!!
Thank you and sorry for the delay.


So here in power_distribution_stock.c

Code: Select all

    motorPower.m1 = limitThrust(control->thrust - r + p + control->yaw);
    motorPower.m2 = limitThrust(control->thrust - r - p - control->yaw);
    motorPower.m3 = limitThrust(control->thrust + r - p + control->yaw);
    motorPower.m4 = limitThrust(control->thrust + r + p - control->yaw);
Can I observer what is the information for each motor (motorPower.m1,m4)? or in this script i just can observer the uint16_t information?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Control Signals

Post by kimberly »

Not exactly sure what you are looking for, but these values are defined as loggroups here , which you can see in the plotter in the cfclient
DarkKnight
Member
Posts: 39
Joined: Tue Jun 15, 2021 10:19 pm

Re: Control Signals

Post by DarkKnight »

kimberly wrote: Tue Jul 21, 2020 12:06 pm The motor power is more of a thrust percentage mapped to a uint16_t, where 0 is no trust and 65535 is full thrust. Its not really a unit in that sense.

Here is a page with some investigations (not converted to the new documentation structure yet): https://wiki.bitcraze.io/misc:investigations:thrust
Hello,

Is there anyway to know the standard deviation of the value of the stabilizer.thrust?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Control Signals

Post by kimberly »

Hi! @darkknight Could you please start a new thread? This is a slightly different topic of what the original poster was asking about, also its a year old.
DarkKnight
Member
Posts: 39
Joined: Tue Jun 15, 2021 10:19 pm

Re: Control Signals

Post by DarkKnight »

Hi, @kimberly,

Here is the new topicviewtopic.php?f=11&t=4999, could you help me take a look at it?
Post Reply