Stick positions for DIMU TARE function not as described r372

Info & Discussions about good ole AQ6, taken to the next level.

Stick positions for DIMU TARE function not as described r372

Postby aBUGSworstnightmare » Sat Apr 05, 2014 8:13 am

Hi,

either the wiki on the DIMU TARE (dIMUTare() )function is wrong, or the code.

Excerpt from 'supervisor.c':
Code: Select all
#ifdef HAS_DIGITAL_IMU
       // leveling function
       if (RADIO_THROT < p[CTRL_MIN_THROT] && RADIO_RUDD < -500 && RADIO_ROLL < -500 && RADIO_PITCH > +500) {
#ifdef SUPERVISOR_DEBUG_PORT
      digitalHi(supervisorData.debugLed);
#endif
      digitalHi(supervisorData.readyLed);

      dIMUTare();

      AQ_NOTICE("Leveled\n");
...


TARE should be executed with both sticks in the lower left corner. The above will result in the behavior as described here viewtopic.php?f=42&t=3071&start=20#p20172 --> PITCH needs to be up!

So, shouldn't this be changed to
Code: Select all
#ifdef HAS_DIGITAL_IMU
       // leveling function
       if (RADIO_THROT < p[CTRL_MIN_THROT] && RADIO_RUDD < -500 && RADIO_ROLL < -500 && RADIO_PITCH < -500) {
#ifdef SUPERVISOR_DEBUG_PORT
      digitalHi(supervisorData.debugLed);
#endif
      digitalHi(supervisorData.readyLed);

      dIMUTare();

      AQ_NOTICE("Leveled\n");
...


to make it work as expected?

Joerg
aBUGSworstnightmare

P.S. taken from r372; checked out a few minutes before posting this.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Stick positions for DIMU TARE function not as described

Postby sandmen » Sat Apr 05, 2014 8:34 am

The code is not wrong.
Why you don't want to swap/invert your pitch channel?
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Stick positions for DIMU TARE function not as described

Postby chschmid » Sat Apr 05, 2014 8:38 am

Hi Joerg

How do you fly?
Mode 2, nose up when pulling the right stick towards you?
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Stick positions for DIMU TARE function not as described

Postby aBUGSworstnightmare » Sat Apr 05, 2014 11:02 am

chschmid wrote:Hi Joerg

How do you fly?
Mode 2, nose up when pulling the right stick towards you?


Exactly! Pulling on pitch stick will raise the front of the craft. Gives negative values (when speaking of auto quad interpretion of rc channel value) from neutral.

Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Stick positions for DIMU TARE function not as described

Postby sandmen » Sat Apr 05, 2014 11:10 am

Again !
sandmen wrote:The code is not wrong.
Why you don't want to swap/invert your pitch channel?
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Stick positions for DIMU TARE function not as described

Postby aBUGSworstnightmare » Sat Apr 05, 2014 11:20 am

sandmen wrote:Again !
sandmen wrote:The code is not wrong.
Why you don't want to swap/invert your pitch channel?


Sandman,

sorry, but writing again (I'll skip the exclamation mark) will help nobody!

TARE is executed at the moment when all channels are low - means less then -500 and PITCH needs to be larger than +500.

So, how does your PITCH channel react when you pull it towards you? What is the value of if? And, how does the craft react on this input?

Then everybody is able to understand your comment. Menno's video in the wiki shows both sticks in the lower left corner.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Stick positions for DIMU TARE function not as described

Postby kinderkram » Sat Apr 05, 2014 11:31 am

Joerg, I´ve edited the Wiki page for now regarding the TARE.
Also added links to the 372 fw and para files.

The code should be changed later to reflect the correct stick input.
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Stick positions for DIMU TARE function not as described

Postby sandmen » Sat Apr 05, 2014 11:54 am

In mode 2, if i push the pitch stick forward, I get a negative value.
And if I pull the Stick to me, I get a pos. Value.
If I push the stick forward, I will have my front of my copter "negative" !
What do we except if we send a "positive Pitch" and a "negative Pitch" to a FC?

For me, is that implementation correct.

@Norbert, why should we change anything on the code?
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Stick positions for DIMU TARE function not as described

Postby aBUGSworstnightmare » Sat Apr 05, 2014 12:07 pm

Hi sandmen/Norbert,

sandmen wrote:In mode 2, if i push the pitch stick forward, I get a negative value.
And if I pull the Stick to me, I get a pos. Value.
If I push the stick forward, I will have my front of my copter "negative" !


o.K. that's exactly the information I was looking for. I need to invert my TX channel and everything's fine.

sandmen wrote:What do we except if we send a "positive Pitch" and a "negative Pitch" to a FC?

'Positive and negative Pitch' leaves room for interpretion without a proper description of the underlaying coordinate system; now everyting's clear.

@Norbert. Writing pitch up when saying stick in low (pulled) position made it clear!.

Thread solved!
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Stick positions for DIMU TARE function not as described

Postby skew » Sat Apr 05, 2014 1:03 pm

I just got my Dimu going my Tare calibration works just like the video both sticks in lower left corner on R372 w/sbus Futaba.
skew
 
Posts: 181
Joined: Sun Oct 14, 2012 1:30 am
Location: Morehead, Ky


Return to AQ6 +DIMU +CAN

Who is online

Users browsing this forum: No registered users and 2 guests