Simple mode for beginers

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Simple mode for beginers

Post by mahowik »

Hi guys,

I have implemented the simple mode for the bad pilots like me :). I got the idea (but not the code :) ) from arducopter project.

The main goal is:
1. Remember the YAW angle/orientation when you turn on the engines.
2.Then when you rotating the copter for yaw, it will know where is the "new" head and tail. It means that if the head of the copter looks at North when you turn on the engines, your "new" head will always look at Nord in spite of rotating by YAW.

It uses the rotation of the sticks(ROLL, PITCH) vector based on remembered YAW orientation...
E.g. when you rotate copter for 180 degree, its Head become a Tail and its Tail become a Head. Or if you rotate the copter for +90, its Head become a Right side and its Left side become a Head.

In two word you always know the Head direction or direction at all. And it can be used to save your copter when you loose the control, e.g. don't know the current direction or haven't an enough experience to control when the tail doesn't not look to you :)

Russian version: http://forum.rcdesign.ru/f123/thread221 ... ost2970794

----------UPDATED--------------------------------------------------------------------------------------------------------------------------

HOW TO:

- At first you need to have a magnetometer and accelerometer on the board
- It works independent from existent modes. I.e. you can use it not only with Level but also with Acro mode (but I have not tested in acro).
- Before flight try it in hands. Rotate for diff angles and make sure that front always the same.
- The head/front will be remembered when you turn on the engines. So it means that you can turn on/off the "simple/head free" mode during the flight...


To add this mode, pls. open your MultiWii_[N].pde

1. Add new static global vars in the begin of file:

Code: Select all

static uint8_t  simpleMode = 0;     // if simple mode is a activated
static int16_t  simpleModeHold;


2. search for

Code: Select all

rcCommand[THROTTLE] = MINTHROTTLE + (int32_t)(MAXTHROTTLE-MINTHROTTLE)* (rcData[THROTTLE]-MINCHECK)/(2000-MINCHECK);

and insert after this the following:

Code: Select all

  if(simpleMode) {
    float radDiff = (heading - simpleModeHold) * 0.0174533f; // where PI/180 ~= 0.0174533
    float cosDiff = cos(radDiff);
    float sinDiff = sin(radDiff);
    int16_t rcCommand_PITCH = rcCommand[PITCH]*cosDiff + rcCommand[ROLL]*sinDiff;
    rcCommand[ROLL] =  rcCommand[ROLL]*cosDiff - rcCommand[PITCH]*sinDiff;
    rcCommand[PITCH] = rcCommand_PITCH;
  }


3. search for (two places)

Code: Select all

armed = 1;

and replace it with the following (in two places):

Code: Select all

        {
          armed = 1;
          simpleModeHold = heading;
        }


4. search for

Code: Select all

     if (rcOptions & activate[BOXMAG]) {
        if (magMode == 0) {
          magMode = 1;
          magHold = heading;
        }
      } else magMode = 0;

and insert after this the following:

Code: Select all

      if (rcOptions & activate[BOXGPSHOME]) {
        if (simpleMode == 0) {
          simpleMode = 1;
        }
      } else simpleMode = 0;


So it can be activated with GPSHOME box in UI. Hope you are not using the GPS for now :)

thx-
Alex
Last edited by mahowik on Wed Dec 07, 2011 5:45 pm, edited 7 times in total.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Simple mode for beginers

Post by Alexinparis »

Hi,

It is what is called "carefree mode" in Mikrokopter world ?
Did you test it in a real flight ?

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Hi Alex,

I don't know about "carefree mode" in Mikrokopter...

Yes, I have tested this and it's works, but no so great because my MAG has a big inaccuracy, e.g. if after IMU it has Nord in 0 degree the South will not be 180 degree but about 200-210... As I know in Canada the magnetic field vector looks at the earth at an angle... probably it's the reason of magnetometer nonlinearity/inaccuracy...
But if the MAG gives the right data it will work as you wish! :)

Here is part of main details how it works:

Code: Select all

if(simpleMode) {
    float radDiff = (heading - simpleModeHold) * 0.0174533f; // where PI/180 ~= 0.0174533
    float cosDiff = cos(radDiff);
    float sinDiff = sin(radDiff);
    int16_t rcCommand_PITCH = rcCommand[PITCH]*cosDiff + rcCommand[ROLL]*sinDiff;
    rcCommand[ROLL] =  rcCommand[ROLL]*cosDiff - rcCommand[PITCH]*sinDiff;
    rcCommand[PITCH] = rcCommand_PITCH;
  }

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

You have to handle magnetic decliniation, if you want to use mag for anything else than heading hold. Take a look at the Arducopter code, there is a clean implementation in the compass library. It will be neccessary anyway, since gps guided flight also needs a precise compass.

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Simple mode for beginers

Post by jevermeister »

Cool Idea,
it actually is the same as "CareFree" This one would have saved my last two copters because I lsot orientation.

My hope is on a good coming home function. Or a real carefree mode which is based on home location: "front" of copter always away from home location.

Tell me more about the magnetic inclination thing, I played around with the megapriates code and sow something about that.
does that mean our compass mode is not finished yet!?

Nils

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

EOSBandi wrote:You have to handle magnetic decliniation, if you want to use mag for anything else than heading hold. Take a look at the Arducopter code, there is a clean implementation in the compass library. It will be neccessary anyway, since gps guided flight also needs a precise compass.


Thanks a lot!
I supposed that current IMU implementation doesn't take into account the magnetic declination... Yes, for heading hold it's ok, but not for the calculations where the right yaw angle is necessary.

jevermeister wrote:Tell me more about the magnetic inclination thing, I played around with the megapriates code and sow something about that.
does that mean our compass mode is not finished yet!?

Yes, seems it's not complete... :(

@Alexinparis: Do you know how to modify the IMU to take into account the magnetic declination?

If it's not possible in current implementation probably I will try to integrate some kind of the the AHRS:
https://github.com/pololu/MinIMU-9-Arduino-AHRS
http://code.google.com/p/sf9domahrs/
http://code.google.com/p/imumargalgorithm30042010sohm/

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

It's quite easy to implement, as I see the heading is stored in an integer variable in degrees. So you have to get your place's magnetic inclination (http://magnetic-declination.com/) convert the Degree, minute format to decimal and add this to the heading variable. Also have to check if it makes the heading bigger than 359degree or less than 0, and correct accordingly. That's all.

Something like this (this is not actual code, just mockup...)

Code: Select all

//Enter your locations magnetic declination in degrees (decimal)
//Go to http://magnetic-declination.com/ to get your magnetic declination in degrees and minutes,
//it could be positive or negative
//Convert it to DecimalDegree here (http://www.beg.utexas.edu/GIS/tools/deg_rad.htm)
#define _declination   3.884          //3deg 53min positive for Budapest, Hungary

 // Declination correction (if supplied) 
 
    if( abs(_declination) > 0)      {
      heading = heading + _declination;   
      if (heading => 360)       
         heading -= (360);   
      else if (heading < 0)       
         heading += 360);   
   } 

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

jevermeister wrote:Tell me more about the magnetic inclination thing, I played around with the megapriates code and sow something about that.
does that mean our compass mode is not finished yet!?

Yes, seems it's not complete... :(

For the current feature set the mag (compass) code IS complete, since the code use compass for the sole purpose of heading hold.
Future functions, such as simple mode or gps based navigation it must handle magnetic dec/inclination. Luckily it's easy to add.

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Thanks a lot for the comments!

I have already found similar in MegaPiratePlane

Code: Select all

// Declination correction (if supplied)
    if( fabs(_declination) > 0.0 )
    {
        heading = heading + _declination;
        if (heading > M_PI)    // Angle normalization (-180 deg, 180 deg)
            heading -= (2.0 * M_PI);
        else if (heading < -M_PI)
            heading += (2.0 * M_PI);
    }


BUT I think it doesn't help because as i wrote before it has nonlinear error after IMU. I.e. after rotation for 180 deg it return diff degree which is not equal to 180 but 200-210...
So declination correction will not fix the nonlinear error, I.e. after rotation it will be:
degree_before_rotation = heading + declination;
degree_after_rotation_for180 = heading + 210+ declination; // but not (heading + 180+ declination)

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Hi guys,

Could someone test your mag for nonlinear error?
It means when you rotate the copter for 30/60/90/180 etc. IMU should calculate the same. Just check the diff of heading in GUI diff angles/degrees... probably I have broken one...

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Simple mode for beginers

Post by jevermeister »

I do not understand that non linear error, sorry but can someone please give an explanation for dummies?


Nils

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

mahowik wrote:Hi guys,

Could someone test your mag for nonlinear error?
It means when you rotate the copter for 30/60/90/180 etc. IMU should calculate the same. Just check the diff of heading in GUI diff angles/degrees... probably I have broken one...

Hi,
I checked it, and I did not experienced any error... it's linear... So perhaps your sensor is broken... :(

User avatar
matbogdan
Posts: 29
Joined: Wed Nov 23, 2011 9:35 am
Contact:

Re: Simple mode for beginers

Post by matbogdan »

I have a small question ...
Why the magnetometer have 3 axis. Can we use this for a declination calculation ? Something magic numbers/formulas that will fix this issue.
As i know magnetometer have 3 axis and this mean each axis can calculate the magnetic north of the earth.
I still do not own a magnetometer yet but next month i will have one and see what is all about with this 3 axis magnetometer.

I can understand why gyro and accelerometer have 3 axis but why the magnetometer need 3 axis ?

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

jevermeister wrote:I do not understand that non linear error, sorry but can someone please give an explanation for dummies?


it means when you physically rotate the copter (or PCB with sensors) for N angle, after IMU in GUI it shows N+D angle but not N...
In my case if N=180 then D= +/-(20..30) degrees and depends from which angle you are started to rotate...

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

EOSBandi wrote:I checked it, and I did not experienced any error... it's linear... So perhaps your sensor is broken... :(

So, bad news for me, but probably good news for you :)

Could you try this mode? I tested this on the flight and it works In my config, but head/front is "swimming" because of this nonlinear MAG error...

Open your MultiWii_[N].pde

1. Add new static global vars in the begin of file:

Code: Select all

static uint8_t  simpleMode = 0;     // if simple mode is a activated
static int16_t  simpleModeHold;


2. search for

Code: Select all

rcCommand[THROTTLE] = MINTHROTTLE + (int32_t)(MAXTHROTTLE-MINTHROTTLE)* (rcData[THROTTLE]-MINCHECK)/(2000-MINCHECK);

and insert after this the following:

Code: Select all

  if(simpleMode) {
    float radDiff = (heading - simpleModeHold) * 0.0174533f; // where PI/180 ~= 0.0174533
    float cosDiff = cos(radDiff);
    float sinDiff = sin(radDiff);
    int16_t rcCommand_PITCH = rcCommand[PITCH]*cosDiff + rcCommand[ROLL]*sinDiff;
    rcCommand[ROLL] =  rcCommand[ROLL]*cosDiff - rcCommand[PITCH]*sinDiff;
    rcCommand[PITCH] = rcCommand_PITCH;
  }


3. search for (two places)

Code: Select all

armed = 1;

and replace it with the following (in two places):

Code: Select all

        {
          armed = 1;
          simpleModeHold = heading;
        }


4. search for

Code: Select all

     if (rcOptions & activate[BOXMAG]) {
        if (magMode == 0) {
          magMode = 1;
          magHold = heading;
        }
      } else magMode = 0;

and insert after this the following:

Code: Select all

      if (rcOptions & activate[BOXGPSHOME]) {
        if (simpleMode == 0) {
          simpleMode = 1;
        }
      } else simpleMode = 0;

So it can be activated with GPSHOME box in UI. Hope you are not using the GPS for now :)


Before flight try it in hands. Rotate for diff angles and make sure that front always the same. The head/front will be remembered when you turn on the engine. So it means that you can turn on/off the "simple" mode during the flight...

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Simple mode for beginers

Post by jevermeister »

mahowik wrote:
jevermeister wrote:I do not understand that non linear error, sorry but can someone please give an explanation for dummies?


it means when you physically rotate the copter (or PCB with sensors) for N angle, after IMU in GUI it shows N+D angle but not N...
In my case if N=180 then D= +/-(20..30) degrees and depends from which angle you are started to rotate...


Hm,
I think I tested the mag and it worked as expected, so turning the copter 90 degerees gives me 90° on the mag.

I live very far north, almost in denmark.

If I understand this right: Holding a current heading is not a problem with this deviation is it!? It is only a problem for a coming home function or if you want to fly on programmed coruses.



Nils

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Yes! For this Simple mode the declination not a problem because it uses the diff of heading and simpleModeHold angles.

Code: Select all

float radDiff = (heading - simpleModeHold) * 0.0174533f; // where PI/180 ~= 0.0174533

So you can try to fly with it :)

p.s. I have updated the first post of this thread for "How to:"

hackerlyx
Posts: 2
Joined: Wed Nov 23, 2011 7:25 pm

Re: Simple mode for beginers

Post by hackerlyx »

wow!!!!! that was amazing!!!!
thanks!!! oh god that's what i really want function is.
thanks alot!!!!

hackerlyx
Posts: 2
Joined: Wed Nov 23, 2011 7:25 pm

Re: Simple mode for beginers

Post by hackerlyx »

yes i have a test for your most new verison code.
and it is perfact amazing working. we love you!

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

Hi, just come back from the field. I fly tested your simple mode code, it works flawlessly. I think this is a must have for everybody who is not 100% sure in orientations and flying when your copter's tail does not point towards you.
Also could helpfull when you lost orientation, just flip the switch and bring back your copter.
First time since I started flying, i was able to fly when copter's nose with th gopro pointed towards me...

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Hi guys!

Good news! Many thanks for your help!
I agree when it works it can be very usefull.
So I hope AlexInParis will not ignore to include this to sketch :)

thx-
Alex

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Simple mode for beginers

Post by ziss_dm »

Hi mahowik,

You also can avoid sin/cos calculations if you remember mag vector instead of angle and calculate cos θ using scalar product of two vectors (current and remembered).

regards,
ziss_dm

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Hi ziss_dm,

Yes it's a good idea to avoid increasing of calculation time, but in case of current implementation the cycle time was not changed because the calculation inside of the annexCode() function, which is called from computeIMU() with constant delay...

Code: Select all

    timeInterleave=micros();
    annexCode();
    while((micros()-timeInterleave)<650) ;


I checked also the time of annexCode() with new mode calculation and it less than 650μs...

thx-
Alex

User avatar
captaingeek
Posts: 228
Joined: Fri Jan 28, 2011 6:42 pm

Re: Simple mode for beginers

Post by captaingeek »

This is pretty cool but could take some getting used to.

So if you have this enabled, you take off and set up in a hover. YOu then do a 180. Not whats normally the tail of your model is now the head? HMmmmmmm.....

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

captaingeek wrote:This is pretty cool but could take some getting used to.

So if you have this enabled, you take off and set up in a hover. YOu then do a 180. Not whats normally the tail of your model is now the head? HMmmmmmm.....


Whi this is called simple mode.... no need to learn directions, just fly.
What do you think about a super-simple mode? When the copter are more than 10meters away, then the orientation of the simple mode changes to the actual line between you and the copter. So you can turn at the direction of the copter, and still steer it as you do in simple mode....

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Simple mode for beginers

Post by PatrikE »

Kind of..
Pitch stick controlls distance beween you and the model.
Roll will move it sideways and keep the same distance to you.(make a full cirkle around you only using rollstick)?

ygl611
Posts: 9
Joined: Mon Mar 05, 2012 1:29 am

Re: Simple mode for beginers

Post by ygl611 »

Super-simple mode? Excellent ideas! if this becames ture,i 'll never worry about Wiicopter flying away.......

jpeti29
Posts: 22
Joined: Wed Mar 07, 2012 9:19 am
Location: Hungary

Re: Simple mode for beginers

Post by jpeti29 »

And What do you think about simple-mode-with-facing-home mode? It would work like simple mode (same control), but always turn the copter facing to home pos. It will be great when you want to make video from an object which is in home pos. it could also handle camera tilt servos. :-)

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: Simple mode for beginers

Post by Katch »

Been playing with this headfree mode a bit over the last few days - it's really fun.

Crank the yaw right over and then pitch and roll for spinning circuits of my flying field.

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

can someone send me a version with this feature implemented

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: Simple mode for beginers

Post by mahowik »

Cronalex wrote:can someone send me a version with this feature implemented

official 2.0 version ;)

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

Katch wrote:Been playing with this headfree mode a bit over the last few days - it's really fun.

Crank the yaw right over and then pitch and roll for spinning circuits of my flying field.


You can easily impress fellow rc pilots (esp. traditional helicopter pilots) :D I usually land with my copter heading toward me, and got awhhh and yeeeeah....
EosBandi

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: Simple mode for beginers

Post by Katch »

I'm fine as long as I don't hit WOT at any point - at WOT the mag interference kicks in and pulls my heading right off...

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

mahowik wrote:
Cronalex wrote:can someone send me a version with this feature implemented

official 2.0 version ;)

but I must also activate the accelerometer head when I use free?

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

I tried to activate the function in headfree multiwii 2.0 does not work but nothing on but nothing changes

Lapino
Posts: 84
Joined: Tue Aug 16, 2011 10:01 am

Re: Simple mode for beginers

Post by Lapino »

Cronalex wrote:I tried to activate the function in headfree multiwii 2.0 does not work but nothing on but nothing changes

Do you have a mag?
It's essential for this mode. Without it the copter doesn't know its reference heading ;)

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

but what you have to turn in the gui?? magnetometer and headfree right? if you do not do it anyway

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

Lapino wrote:
Cronalex wrote:I tried to activate the function in headfree multiwii 2.0 does not work but nothing on but nothing changes

Do you have a mag?
It's essential for this mode. Without it the copter doesn't know its reference heading ;)

yes :(

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Simple mode for beginers

Post by PatrikE »

Calibrated it so gui show correct heading?

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

PatrikE wrote:Calibrated it so gui show correct heading?

yes the magnetometer is calibrated it works ... when I use it ... but also in active headfree gui does not change anything ...

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Simple mode for beginers

Post by PatrikE »

I haven't tested the headfree for a wihle.
But i only checked the headfree box on AUX1.
It worked direct.
Only thing is My head couldn't think haedfree automayicly so i disabled it again.;)

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

I can explain the procedure how to use it ... because I just can not get it going. HELP MEEEE

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: Simple mode for beginers

Post by Federico »

I still don't get one thing. It's supposed to have the "head" always pointing to N ?
I have noticed that in my setup if i take off with me and the copter looking to N everything is ok but I think that the copter is not able to understand his front and back..

I mean, in my gui if my copter is pointed to north i get 0 as value in head, otherwise I get other values.
Would't be better if the 0 was set to my position when I arm the motors ?

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: Simple mode for beginers

Post by Katch »

Federico wrote:I still don't get one thing. It's supposed to have the "head" always pointing to N ?


No - when you engage headfree it locks the head so that pushing forward will always make the quad go forward and pulling back always back no matter where you yaw the actual head to.

However for this to be useful you have to have the quad in front of you facing away and lined up perfectly when you engage headfree.

Then you must stay in the same place - if you move or rotate your body you will then be out of alignment with the quad.

If you hover at waist height in front of yourself with the nose of the quad facing away from you and engage headfree; pitching forward back and rolling left and right should appear and feel normal. Now yaw to the right - pitching forwards will still move the quad away from you and rolling right will still make it go right despite the fact that the quad is now facing a different way.

When calibrated and engaged properly you should be able to hold full yaw and pitch gently forward sending your quad in a nice straight line away from you while it spins.

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: Simple mode for beginers

Post by Federico »

I am going to try at the filed right now. At the desk looks like is not going to work.

I am using multiwii 2.0 and on my multiwiiConf the orientation of the magnetometer is solid. But looks like my headfree is always thinking that "north" is my basic head. In my MultiWiiConf I see the 0 value in HEAD if it's pointed to north, then spinning by 360° I have different values till 0 again. Looks like correct?

Anyway, I am going to try again.
It would be nice to have this working just in case I need to save the copter at the last second from a crash :-)

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: Simple mode for beginers

Post by Cronalex »

Federico wrote:I still don't get one thing. It's supposed to have the "head" always pointing to N ?
I have noticed that in my setup if i take off with me and the copter looking to N everything is ok but I think that the copter is not able to understand his front and back..

I mean, in my gui if my copter is pointed to north i get 0 as value in head, otherwise I get other values.
Would't be better if the 0 was set to my position when I arm the motors ?

also my only work in the North, with head: 0. I just tried

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: Simple mode for beginers

Post by Federico »

Well, I don't know why but during the actual flying the headfree works, but in truth is difficult to understand at the first time :-)

Candu1
Posts: 5
Joined: Mon May 07, 2012 4:05 am

Re: Simple mode for beginers

Post by Candu1 »

I set up my AUX1 switch to toggle on Headfree mode but when I activate it, it doesn't do anything different. I understand you don't need to do anything special in the sketch to enable Headfree mode. I confirmed from GUI that Headfree is in fact toggled on when I flip AUX1 switch but it doesn't work in flight - say, I yaw to the right put the pitch stick forward, it goes right rather than forward. So I must have missed something.

How do you activate Headfree? Here's my understanding from reading on the forums:
1. set the quad in front of you.
2. switch on Headfree (in my case, flip AUX switch on)
3. arm the quad (right yaw/min throttle)
4. takeoff
Is this the right sequence?

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: Simple mode for beginers

Post by Federico »

I don't know if it makes any difference but I take off in acro mode and then I activate level mode with magnetometer and headfree. Is your magnetometer setup all right?

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Simple mode for beginers

Post by EOSBandi »

Candu1 wrote:I set up my AUX1 switch to toggle on Headfree mode but when I activate it, it doesn't do anything different. I understand you don't need to do anything special in the sketch to enable Headfree mode. I confirmed from GUI that Headfree is in fact toggled on when I flip AUX1 switch but it doesn't work in flight - say, I yaw to the right put the pitch stick forward, it goes right rather than forward. So I must have missed something.

How do you activate Headfree? Here's my understanding from reading on the forums:
1. set the quad in front of you.
2. switch on Headfree (in my case, flip AUX switch on)
3. arm the quad (right yaw/min throttle)
4. takeoff
Is this the right sequence?

Check your magnetometer. I experienced the same, when put a buzzer above my mag. (There was a small magnet in the buzzer), the mag locked and headfree become ineffective.

Post Reply