Does ACC get disabled under high stick movements?

Does ACC get disabled under high stick movements?

Postby signal15 » Thu Jun 28, 2012 6:50 am

I want to start trying some acro stuff, but I don't want to have to flip on ACC if things go wonky. I want it to flip on by itself when I release the stick to center position. Can I leave ACC on, and still do acro stuff, or do I have to disable it?

It seems to me that if you're doing greater than 75% stick movement, you don't want ACC on anyway.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby bill516 » Thu Jun 28, 2012 9:38 am

As far as I know its "on" or "off" depending on how you have it configured or switch position. I think what you would be looking for is something like like "if sticks at centre and throttle greater 25% ish then level = on". Maybe Alex or somebody could write an acro trainer function that does what you want, enabled by a flick of a switch.
bill516
 
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Thu Jun 28, 2012 1:43 pm

Something like this could work.
Code: Select all
int8_t acroTainerMode= 0;
if (abs(rcCommand[ROLL]) + abs(rcCommand[PITCH]) >= 200) acroTainer=1;

  //**** PITCH & ROLL & YAW PID ****   
  for(axis=0;axis<3;axis++) {
    if (f.ACC_MODE && axis<2 && !acroTainerMode) { //LEVEL MODE
      // 50 degrees max inclination


If combined Roll and Pitch command Exceeds Ex.200 acroTainerMode is activated.
When sticks are centered it will return to Level mode.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Thu Jun 28, 2012 5:57 pm

This seems like it would be awesome feature for one of the next releases. I can certainly patch my own code, but it would be nice if this was already included. I think I saw something on the wishlist for 2.1 that was similar to this.

Even better, it would be cool to be able to define the params in config.h and use the acrotrainer mode to disable not only level, but heading hold and other things that might affect acro maneuvers.

Also, on the second line, I'm assuming "acroTainer" should be "acroTainerMode", correct?
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby wilco1967 » Thu Jun 28, 2012 9:02 pm

You could also do something like that in your transmitter, rather then in the MultiWii.
if your Tx has some decent firmware, that allows custom switches, it should not be so difficult.
wilco1967
 
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Thu Jun 28, 2012 11:44 pm

wilco1967 wrote:You could also do something like that in your transmitter, rather then in the MultiWii.
if your Tx has some decent firmware, that allows custom switches, it should not be so difficult.


That's a good point. I have a DX6i right now, I'm not sure there's a way for me to program this into it. I have a 9x on the way though.

If someone knows how to kill a switch at x% stick position on a DX6i, I'm all ears.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sat Jun 30, 2012 1:59 am

I'm just about to test the code above. Does the Rate setting for pitch and roll get disabled in level mode? I didn't see it in the PID loop anywhere, unless it's returned from this: dynD8[axis]

If that's the case, then it DOES get disabled in Level mode.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sat Jun 30, 2012 4:07 am

Ok, holy crap. I tried the code above. I set my RC Rate to 1.0 and my Pitch/Roll rate to 0.7. I got it up about 50 feet and tried some rolls, letting go of the stick right before it was level again. Works like a charm. Then I pulled the stick to the back right corner, and did two backwards pitch/roll flips. It was falling out of the sky like a wounded duck, I thought for sure I had made a big mistake. I let go of the stick, and within 5 feet it was level again.

Something like this needs to be rolled into the next release, it is awesome.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby wilco1967 » Sat Jun 30, 2012 11:19 am

signal15 wrote:Ok, holy crap. I tried the code above. I set my RC Rate to 1.0 and my Pitch/Roll rate to 0.7. I got it up about 50 feet and tried some rolls, letting go of the stick right before it was level again. Works like a charm. Then I pulled the stick to the back right corner, and did two backwards pitch/roll flips. It was falling out of the sky like a wounded duck, I thought for sure I had made a big mistake. I let go of the stick, and within 5 feet it was level again.

Something like this needs to be rolled into the next release, it is awesome.


I think most people simply put level mode on a aux switch..... When getting in trouble, hit the level mode switch, and it sorts itself out.....
Amazing to watch a quad come tumbling down with minimum throttle, and then level itself automatically, just before hitting the ground :mrgreen:

just don't forget to have level mode switch on just before impact :lol: (don't ask how I know.....).
Also, don't put any roll or yaw stick in the corner, when falling down with minimum throttle..... I will disarm the motors, and it doesn't autolevel very well with the motors off.... :shock:

About the transmitter solution.... It's very easy to do on a 9X, with the ER9X firmware.... You will like your 9x !. Strongly recommend to flash it with ER9X (but I assume that is the main reason you ordered one, correct ?)

I'll have a shot at programming my 9X and give this a try.... (and put an extra switch on it to disable this feature completely....). So once you receive your 9x, I have a mix for you waiting ;)
wilco1967
 
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sat Jun 30, 2012 10:15 pm

What a adrenalineKick!... :evil: :lol: :o
My first flip ever! :mrgreen:

I tested the code and it works fine.
A little warning....
The transfer betweem the modes is very sharp.
When you pass the threshold with the sticks it will become Wild!

If a lower threshold value than 200 it can be more soft.
I will test it better tomorrow when it's light.
And it it still feels god i will merge it..
As #define ACROTRAINER 200

What a kick!!!

/Patrik :lol:
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sun Jul 01, 2012 2:04 am

PatrikE wrote:What a adrenalineKick!... :evil: :lol: :o
My first flip ever! :mrgreen:

I tested the code and it works fine.
A little warning....
The transfer betweem the modes is very sharp.
When you pass the threshold with the sticks it will become Wild!

If a lower threshold value than 200 it can be more soft.
I will test it better tomorrow when it's light.
And it it still feels god i will merge it..
As #define ACROTRAINER 200

What a kick!!!

/Patrik :lol:



I posted your code over on RCGroups.com. Don't worry, I gave you credit. People are loving it. Someone did a video of it over there with a quad. I'm going to try to get one with my Tricopter tonight.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sun Jul 01, 2012 2:14 am

Over on RCG, someone asked the question if the following code would make more sense. I agree that it may:

Code: Select all
if (abs(rcCommand[ROLL]) >=200 || abs(rcCommand[PITCH]) >=200) acroTrainerMode=1;
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sun Jul 01, 2012 5:01 pm

I merged the ACROTRAINER to _shared.
Activate in config.

Bledi made a video from the Maiden.
http://www.youtube.com/watch?v=zX6nug_XEyc&feature=player_embedded

I will keep the original Addition of the stickmovement.

Some Wild theory...
If you add up the stickmove you will get a theoretic radius
and get the thresold at same distance from midstick.

When you use || it will become a square.
and distance from mid will diff depending on direction.
Image

Test the Mode and feel like Warthox for a while.. :mrgreen:

/Patrik
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Alexinparis » Sun Jul 01, 2012 5:34 pm

Sorry Patrik,

But I ask you to unmerge it.
We can't add new things during the consolidation step to 2.1
Alexinparis
 
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sun Jul 01, 2012 8:05 pm

Ok.
Done...
I will Place it in my branch meanwhile.

branches/PatrikE/MultiWii_AcroTrainer.rar
Last edited by PatrikE on Sun Jul 01, 2012 8:18 pm, edited 1 time in total.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby wilco1967 » Sun Jul 01, 2012 8:18 pm

Alexinparis wrote:Sorry Patrik,

But I ask you to unmerge it.
We can't add new things during the consolidation step to 2.1


The good news is.... I got it working from the transmitter (ER9X), so no need to change any multiwii code if you're the lucky owner of a reflashed 9X....

To just fly around it's a bitch, but for doing flips it's amazing.... in a moment of desorientation, you don't need to find your level switch as before. just let go of the sticks, and voilla :o all sorted.

I tried it today, and it spun so violently, it must have sheared a motor off in flight (or a prop blade broke off in flight.... not sure what happened first).... I only fixed the motors with tyraps to the arms, so they can break off easily in a crash rather than bending a shaft.... Anyway.... with this acro/level trick, I was confident it would sort itself out no matter what mess I made...
It did work fine multiple times, until the motor/prop came off..... no level mode is going to safe that :roll:
Damage: 1 prop, 2 bend arms (already bend back), and a 16 tyraps.... (the resulting crash took all motors off) :roll:

I programmed the Tx, so levelmode = active (my CH6 mid = level mode on) when |roll| < 10, and |pitch|<10, and RUD switch = on (so I can enable/disable this function), OR THR switch on (this is my 'normal' level mode switch.
.
.
.

EDIT...
Zip works, thanks PatrikE

The interesting part is under switches (in eepe)
in this configuration, channel 6 at mid (1500) enables level mode
All the other channels are my defaults.... yours are probably different....

Originally, my THR switch (the large one left bottom corner) would enable level mode.
The RUD switch (above it) is now used to 'enable' this 'acro trainer' feature.
The first line of the logic checks if elevator (pitch) is smaller than +/- 10 %.
The second line does the same for aileron (roll)
the 3rd line combines both of them
the 4rd line checks if the RUD switch is on.... if not on, all the above has no effect. (you can change the RUD switch to whatever switch you prefer)
the 5th line is used to enable LEVEL mode either on above (sticks within 10% from centre, AND 'RUD' switch on), OR your normal LEVEL switch (THR in my case).

So if SW5 (line5) is true, level mode must be on.

in your mixes, just replace the physical switch you're normally using for level mode, with the SW5 logic switch.

Test thoroughly your configuration before flying.... Don't blame me if you crash it ;)
Attachments
Quad Acro Training.zip
.eepm file for Acro Training mode.
(457 Bytes) Downloaded 140 times
Last edited by wilco1967 on Sun Jul 01, 2012 8:55 pm, edited 3 times in total.
wilco1967
 
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sun Jul 01, 2012 8:20 pm

Try to compress to .rar or .zip
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sun Jul 01, 2012 11:31 pm

wilco1967 wrote:
Alexinparis wrote:Sorry Patrik,
To just fly around it's a bitch, but for doing flips it's amazing.... in a moment of desorientation, you don't need to find your level switch as before. just let go of the sticks, and voilla :o all sorted.


I upped the 200 to 250, and it's not bad flying around. Technically, I could up it to 400 or 450 (I have calibrated a 500 travel range on either end of the stick). There's gotta be a number in there that will make the transition less noticeable. At really high stick, you expect it to pitch/roll fast.

But, what if there was some falloff, similar to the decay of P from the Rate setting? Maybe this would be implemented by linearly or exponentially dropping the PID values for ACC based on the position of the stick rather than just shutting it completely off.
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sun Aug 12, 2012 5:40 pm

Acrotrainer mode is now added to shared.

With #define ACROTRAINER 200.
It's possible to fly around in level mode.
Once the sticks is outside the 200 area it's in acroMode and can be flipped over.
Release the stick and it will return to stable.

Change the ACROTRAINER value to suite your flight style and setup.
A lower value will enter acromode earlier.

Baro,Mag,Level and GPS will be disabled when the acrotrainer mode take over.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby signal15 » Sun Aug 12, 2012 6:42 pm

PatrikE wrote:Acrotrainer mode is now added to shared.

With #define ACROTRAINER 200.
It's possible to fly around in level mode.
Once the sticks is outside the 200 area it's in acroMode and can be flipped over.
Release the stick and it will return to stable.

Change the ACROTRAINER value to suite your flight style and setup.
A lower value will enter acromode earlier.

Baro,Mag,Level and GPS will be disabled when the acrotrainer mode take over.


Sweet!
signal15
 
Posts: 37
Joined: Sat Jun 23, 2012 8:44 pm

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Mon Aug 13, 2012 7:11 am

PatrikE wrote:Acrotrainer mode is now added to shared.

Baro,Mag,Level and GPS will be disabled when the acrotrainer mode take over.


So basically with low threshold value you actually implemented option to fly full time with GPS POS. H., ALT. and LEVEL enabled and when stick are centered you get all of them but you can do flips and crazy things directly from that mode!? :)
Cool I'm dying to try that....
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Mon Aug 13, 2012 9:27 am

Be careful using gps in this mode.
When i tested it i think the recovery was not so perfect.
It oscilated some before it setteled.
Maby a delay on asctivating gps would be in order?

Otherwise noting strange about it.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Mon Aug 13, 2012 9:36 am

PatrikE wrote:...
It oscilated some before it setteled. ...


By "oscillated" you mean swinging back and forth in position or oscillation on roll and pitch axes?!
First is normal because if you switch PH on in-flight it will first "overshoot" its position and will settle after some correcting.
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby Alexinparis » Mon Aug 13, 2012 9:55 am

Hi,

Patrik, there is no need to null angle GPS because if acroTainer is on, the level mode is not activated.
(note also, not a single flash bit should be different is this option is not activated)
acroTainer or acroTrainer ?

I will implement soon the "Horizon mode".
The thing I had in mind some months ago:
Basicaly, it is an acro mode.
Plus aux rc channel dedicated to adjust a proportional level superposition targeting the horizontal level.

But the acroTrainer mode approach is maybe more relevant:
100% level when the stick are centered.
100% acro when one of the stick (not the addition) is as its maximum.
Between: a proportional approach with maybe a pot to adjust the middle point in option.
Alexinparis
 
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Mon Aug 13, 2012 10:04 am

Browsing the code and found that when ACROTRAINER is on you only null GPS correction!?
Code: Select all
if(acroTainer )  {
974      GPS_angle[ROLL]   = 0;
975      GPS_angle[PITCH]  = 0;
976      }

That probably means you are not resetting POS. H. coordinates when coming from ACR.T. mode and if you move multi far from original POS.H. position it will try to return there quite violently?! Correct?
Perfect solution would be to also reset POS.H. position.
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Mon Aug 13, 2012 10:21 am

@Alexiinparis.
The Level flag is untouched.
It just skip the Level part of the code so gps is not effected.
Maby better to change the flags?


@ crashlander
I think it would be better to do this.
Code: Select all
 if ( (!f.GPS_HOME_MODE && !f.GPS_HOLD_MODE) || !f.GPS_FIX_HOME || acroTainer )

And remove the zeroing you pointed out.

Then a new PTH will be taken.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Mon Aug 13, 2012 11:26 am

@Patrick: You uploaded your changes directly to MultiWii and not in _shared! Was that intentional?
Because the rest of MultiWii was not changed since 2.1 (Jul 15.)

Regards
Andrej
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Mon Aug 13, 2012 1:18 pm

Sorry that was meant be in shared... :?
Misstake from me.
I will check what went wrong when i come home later this evening.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Alexinparis » Tue Aug 14, 2012 9:52 am

PatrikE wrote:@Alexiinparis.
The Level flag is untouched.
It just skip the Level part of the code so gps is not effected.
Maby better to change the flags?


I'm just saying:
Code: Select all
if(acroTainer )  {
  GPS_angle[ROLL]   = 0;
  GPS_angle[PITCH]  = 0;
}
is useless because
GPS_angle are only used here:
Code: Select all
if (f.ACC_MODE && axis<2 && !acroTainer) { //LEVEL MODE


@crashlander,
you're right, I didn't notice which repository was changed.
non shared should not be modified.
Alexinparis
 
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Does ACC get disabled under high stick movements?

Postby Hamburger » Tue Aug 14, 2012 10:48 am

@Patrik

I think acrotrainer is a good feature.

On acrotrainer code:
Wth ACROTRAINER not defined, the acroTainer variable still gets pulled into the code in BARO, MAG and other code fragments.
Maybe this could be avoided?
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Does ACC get disabled under high stick movements?

Postby Alexinparis » Tue Aug 14, 2012 4:39 pm

I've just commit the HORIZON mode
(viewtopic.php?f=8&t=901&p=5642)
It basically allows what acrotrainer allows, but in a proportional way.
ie ability to do 3 flips per second and release the sticks to regain horizontal attitude in a smooth transition.
Alexinparis
 
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

AW: Does ACC get disabled under high stick movements?

Postby Lapino » Tue Aug 14, 2012 5:05 pm

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

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Tue Aug 14, 2012 7:41 pm

Alexinparis wrote:I've just commit the HORIZON mode
(viewtopic.php?f=8&t=901&p=5642)
It basically allows what acrotrainer allows, but in a proportional way.
ie ability to do 3 flips per second and release the sticks to regain horizontal attitude in a smooth transition.

Does also disables and later resets GPS POS.H. and ALT. like I suggested before and thus enables to fly with permanent POS.H. on but it only becomes active when there is no stick input (DJI Naza style)?
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sat Aug 18, 2012 7:39 pm

crashlander wrote:Does also disables and later resets GPS POS.H. and ALT. like I suggested before and thus enables to fly with permanent POS.H. on but it only becomes active when there is no stick input (DJI Naza style)?


I added a new AcrorTraierMode This time in _Shared.. :oops:

I think you can modify the code a little to get the function you mentioned.
This is my original.
Code: Select all
 
//#define NAZA_MODE 20  // Define the deadspan.

 #if defined(NAZA_MODE)
    if(f.ANGLE_MODE || f.HORIZON_MODE){
      if (abs(rcCommand[ROLL]) + abs(rcCommand[PITCH]) >= NAZA_MODE) {
        //f.ANGLE_MODE=0;
        //f.HORIZON_MODE=0;
        //f.MAG_MODE=0;
        f.BARO_MODE=0;
        f.GPS_HOME_MODE=0;
        f.GPS_HOLD_MODE=0;
      }
    }
  #endif

Just remove or comment the parts you dont want.
Set #define NAZA_MODE to a small vaue ex. 20 to get a small deadspan.

Then you should have a DJI Naza style mode.
Rename the mode to somethong suitable. ex. GPS_RELOCATION or some cool name.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sat Aug 18, 2012 7:56 pm

Alexinparis wrote:I've just commit the HORIZON mode
(viewtopic.php?f=8&t=901&p=5642)
It basically allows what acrotrainer allows, but in a proportional way.
ie ability to do 3 flips per second and release the sticks to regain horizontal attitude in a smooth transition.


I have tested the HORIZON mode.
I like the mode for flying around.
Then it works fine.

But i don't like the behaivor when i do a flip in one axis.
Once it's tilted over 90 degrees it starts compensate for the other axis.
Result...
It will return in level but 180 degrees rotated.
Can be cofusing when you suddenly face it nose in after recovery.

Maby it can be combined with ahe acrotrainer to shut of the other axis to?

I added the acrotrainer to compare the modes.
Acrotrainer only work in Angle_mode.
Just set up a threeway switch Rate/Horizon/Angle.

Then its easy to compare the feeling of the modes.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Sun Aug 19, 2012 4:30 pm

Today I modified (and air tested) version of Patrick's ACRO_TRAINER.
The idea is to implement "Toy car" mode in which multi holds its position when sticks are released and can be moved into any direction with just giving stick input, but it only moves until there is some stick input.
Basically it implements GPS PH that gets disabled when pitch-roll stick is moved an it resets PH position and reenables PH when centered.
If you prefer to fly in angle or horizon mode you can comment out f.ANGLE_MODE=0; and f.HORIZON_MODE=0;

in config.h I lowered treshold to enable it just above DEADBAND.
Code: Select all
#define ACROTRAINER_MODE 10
Last edited by crashlander on Sun Aug 19, 2012 7:27 pm, edited 2 times in total.
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Sun Aug 19, 2012 6:55 pm

@Patrick Ups! I have have not seen your post answering to my question about NAZA_MODE (TM) :) so I implemented my solution (that is same as your suggestion) and it seems it works nice.

Regards Andrej
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Sun Aug 19, 2012 7:32 pm

:D

Can anyone come up with a god name for the mode?

NAZA is not suitable it was just a suggestion.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Hamburger » Mon Aug 20, 2012 3:51 pm

trainer mode?
User avatar
Hamburger
 
Posts: 2557
Joined: Tue Mar 01, 2011 2:14 pm
Location: air

Re: Does ACC get disabled under high stick movements?

Postby jevermeister » Mon Aug 20, 2012 4:01 pm

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

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Mon Aug 20, 2012 4:41 pm

I uploaded it in _shared.
It's a mode suitable for Arial Photography and i named it....
/************************ AP FlightMode **********************************/
/* Temporarily Disables GPS_HOLD_MODE to be make it possible to adjust the Hold-position when moving the sticks.*/
//#define AP_MODE 10 // Create a deadspan for GPS.

It disables.
Baro and GPS modes

@ crashlander
Can you verify the function?
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Alexinparis » Tue Aug 21, 2012 10:08 am

PatrikE wrote:
I have tested the HORIZON mode.
I like the mode for flying around.
Then it works fine.

But i don't like the behaivor when i do a flip in one axis.
Once it's tilted over 90 degrees it starts compensate for the other axis.
Result...
It will return in level but 180 degrees rotated.
Can be cofusing when you suddenly face it nose in after recovery.

Maby it can be combined with ahe acrotrainer to shut of the other axis to?


Ok, I understand why.
The proportion factor should depend on the max of both axis and should not be a per axis view. I will change this.
Alexinparis
 
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Tue Aug 21, 2012 11:07 am

@PatrikE
Today I briefly tested (one pack only) r1072 and AP_MODE and it works as expected.
Only change I made to code is to disable disabling :) f.BARO_MODE=0. If alt hold is properly tuned it can be used in slow FF (or in any direction) and can be useful for FPV.

Regards Andrej
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Tue Sep 25, 2012 7:24 am

@PatrikE
After "uber cool" mahowik's implementation of ALT. HOLD. I believe it is a shame to turn it off (ever) :) when AP_MODE kicks in so it is probably better to remove disabling f.BARO_MODE with AP_MODE in default code (or at least make it configurable in define.h).

Regards Andrej
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Tue Sep 25, 2012 7:56 am

I'll loo at it.;)

Have the new ALT. HOLD been imlemented in _shared yet?
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby crashlander » Tue Sep 25, 2012 8:11 am

Alexinparis ported/reimplemented... it in _shared with r1122...
crashlander
 
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Tue Sep 25, 2012 8:16 am

Cool I'lll test it later today. <:o)
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Termic1 » Tue Oct 09, 2012 7:51 pm

crashlander wrote:@PatrikE
After "uber cool" mahowik's implementation of ALT. HOLD. I believe it is a shame to turn it off (ever) :) when AP_MODE kicks in so it is probably better to remove disabling f.BARO_MODE with AP_MODE in default code (or at least make it configurable in define.h).

Regards Andrej


AP_MODE is a good idea and it is working properly. Thanks a lot to the developers of this nice function.
I've tested it in rel r1129 and r1143.
Too bad that it disables BARO too. It should temporarily disable only GPS HOLD and not ALT HOLD. With the new Mahowik implementation GPS HOLD and ALT HOLD together make the multicopter pretty still in stable flight but if I move the multicopter just a little with the sticks it changes altitude drammatically.

Is there a way to disable this behaviour?

Luciano
Termic1
 
Posts: 40
Joined: Tue Aug 21, 2012 11:14 am

Re: Does ACC get disabled under high stick movements?

Postby PatrikE » Tue Oct 09, 2012 8:05 pm

Search for AP_MODE in multiwii.ino
Code: Select all
  #if defined(AP_MODE)
    if(f.ANGLE_MODE || f.HORIZON_MODE){
      if (abs(rcCommand[ROLL])>= AP_MODE || abs(rcCommand[PITCH]) >= AP_MODE) {
        f.BARO_MODE=0;
        f.GPS_HOME_MODE=0;
        f.GPS_HOLD_MODE=0;
      }
    }
  #endi

Comment or remove f.BARO_MODE=0;.

Should maby be removed in _shared.
PatrikE
 
Posts: 1948
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: Does ACC get disabled under high stick movements?

Postby Termic1 » Tue Oct 09, 2012 8:14 pm

PatrikE wrote:Search for AP_MODE in multiwii.ino
Code: Select all
  #if defined(AP_MODE)
    if(f.ANGLE_MODE || f.HORIZON_MODE){
      if (abs(rcCommand[ROLL])>= AP_MODE || abs(rcCommand[PITCH]) >= AP_MODE) {
        f.BARO_MODE=0;
        f.GPS_HOME_MODE=0;
        f.GPS_HOLD_MODE=0;
      }
    }
  #endi

Comment or remove f.BARO_MODE=0;.

Should maby be removed in _shared.


GREAT! thank you! I'm going to test it tomorrow!

Luciano
Termic1
 
Posts: 40
Joined: Tue Aug 21, 2012 11:14 am

Next

Return to General discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron