Harakiri aka multiwii port to stm32

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

I Had a similar issue with one broken motor cable ! check your motors and esc cables !

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

After a few seconds ...say 10sec ..... WHOOP !!!! a HARD LEFT all by itself, and WHACK on the ground inverted.


Well, since "gps_maxangle = 25" is the preset it is not possible for the gps controller to send more than 25 degree tilt to the level controller (needs to have non wobbly pids, of course) let alone inverting the copter - even in the most gps controller agony. I would suspect an esc with intermittent failure/slack joint/voltage motorcut etc.

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Thanks for your insight....however, its the two right motors that increased the power ( Front Right and Back Right )....I am very positive about this...because I saw the copter raise the right side during the flip. It was a pure lateral flip, coincident with the Roll axis of the X Quad.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

I rechecked the limits. I see no way how a command greater than the gps_maxangle could make it. BTW GPS modes are naturally not supposed to work in horizon mode, that's why it is turned off in that case and angle mode is activated so that shouldn't be the problem with your setup but it may be safer to not assign horizon to a gps mode in any case.

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

CP1000, thanks for double checking the code.
I understand your point....which is that, in no way will the controller attempt to tilt or roll the copter more than gps_maxangle.

I've now rebuilt the Quad, using a new Naze, replaced 2x fu''''kd motors from this morning, 4x new props, and have flown it ( inside my hall ) while monitoring the gui on my phone.
Vibration levels are very low...the X/Y accelerometers never vary more than +- 5->9 units in hovering without any induced movement...lets say its very sweet.
Ublox GPS has survived and has passed inspection and abuse tests ;)
Magnetometer values in X Y Z do not move or exhibit any change with motors stopped, or when hovering.....I'm eyeing the GUI displaying only XYZ mag values while flying (hovering) and giving it a few pumps.
So..all in all, its once again giving confidence that installation is OK, and that all sensors are giving correct, sane and thrustworthy values.


Its interesting that you mention that Horizon should be disabled when in GPS Position Hold. I didn't come across that in any text.
So..can you confirm that I need to disable Horizon when enabling any GPS functions ?
I would do that on the same AUX (1) that has Horizon selected on L-M-H, and Now also Baro and MAG in L-M-H.

I hope to test fly it again tomorrow ( without the gopro and brushless gimbal), and will report results.

Thanks once again !!
I want to apologize for hijacking these few lines of this thread in the software section, but I thought it could have been that little tiny bug somewhere....y'know ?? :D

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi PacciK!

Yes rebuilding is a pain! I once crashed into concrete (copter mostly wasted) with an emergency motor shut off done by me to prevent other damage - completely my failure..
First of all: test in appropiate hight, because you can always oversteer gps stuff and regain control. High grass is always a good idea instead of my poor concrete underground choice once...
Take your time (10 lipos+, write down/screenshot/save final values..) to setup through the functions and stick to the procedure to walk through each sensor from the beginning. I know you are more advanced, but I will write a list now, maybe others may read it as well.
0. Indoor hand test to check all basic functions running properly. Calibrate mag indoor with lipo attached and watch if the compass moves when throtteling (that seems to be very nice on your setup, maybe you could post a pic). Don't forget to fill in the correct declination (SG25: mag_declination, pre2.6: mag_dec) - recalibrate mag in the field (not every time but if you change places or see circeling).
1. Fly gyro and tune in acropids so that there is no wobble, no matter what you do.
2. Stick to the normal Pid controller for now (is default anyway) and tune the Level mode (General Multiwii Note: the level D is a limiter in percent, not a real level D)
3. Now fly in the Baro mode. Don't omit this step, because it will also reveal acc/vibration issues. Here is why: Normally the acc values are heavily filtered to compensate for gyro errors (the gyro is the fast part there). When using acc for detecting movement (hightchange, XY movement) it becomes the "fast part"(baro and gps are slowww) and therefor has a much lower Lowpassfilter. (SG25: acc_lpf_factor = 100, acc_ins_lpf = 10. pre2.6: acc_lpf = 100, acc_ilpf = 10). The gui will only present you the strong filtered acc part. Since my test copter is anything than vibrationfree (abused, cheap DJI450 frame, props not in very good shape..) I can assure you that it will cope with *some* vibrations. But if you can't get althold run properly, it is most likely a vibration issue (besides foam, sunlight on sensor, blahblah). In that case you could increase the acc_ins_lpf or acc_ilpf (pre2.6), or the mpu 6050 hardware lpf (SG25: gyro_lpf = 42, pre2.6: gy_lpf = 42, NOTE: Increasing means a lower value here, like "20") but that is generally not recommended. In harakiri you can easily track down the vibration pig motor without resoldering or Iphone/android/laser.
3.1: Place copter on carpet or something else non resonating, because stone/concrete may produce false high readings.
3.2: Go to cli (very nice terminal is that: https://sites.google.com/site/terminalbpp/ putty is crappy) and enter feature pass (save/reboot copter). LEDS will start to blink as a "don't fly" warning. Now the copter will pass through just the throttlestick commands directly (without any controller - never fly in this mode...) to all motors and put out the accz RAW(unfiltered) data in the gui. You may want to increase the magnification in the gui with the slider to 10x). Now you see the overall vibrationlevel of the copter. For safety: make shure your tx is turned on and throttlestick is on lowest position when entering this mode...(unless you want to use feature pass for its other purpose: recalibrate all esc, or single esc - than a powerup with full throttle is more likely the right thing - check your ESC docu on that).
3.3: Reenter cli and select a single motor with SG25: passmotor = X, pre2.6: pass_mot = X. X resembles to the motor number in TCs' manual, X = 0 selects all motors again. By rechecking with the gui you can track down a problematic motor/prop combo in no time. Don't forget to exit this mode with "feature -pass" when you are done.
4: Tune in GPS. It is connected and properly configured and the mag is calibrated with lipo in place in the field and the declination is actual (changes over time). Make shure your level mode is working solid, no wobble etc. When a GPS mode is selected Harakiri will make shure that the proper boxes are checked/unchecked (BOXANGLE and BOXMAG ON, BOXHORIZON OFF) you may want to add the Baro box to it, but it is not selected by default in PH (except failsafe and RTH).
So selecting horizon along with an gps mode should be no problem but i wouldn't do so. Select angle mode along with a gps mode. Horizon is a mixture between angle and acromode that could do flips and you don't want that in gps functions.
Tuning the GPS parameters is a different story but not so hard to understand and it boils down to just a few parameters.
I am very sorry to hear about your recent crash!! All I can say is, that I have not seen a flip in PH during my trying code and testing (but lots of other stuff, kicking like a horse, circling like a boss, trying to get to Bonanza ...)
Cheers
Rob

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Hi Rob ( CP1000 )...Thanks for the exhaustive writeup. I am copypasting this and printing it out .....and it goes in my TX Case !! :) Thanks a million !!

I made a reference mistake previously.... I;m using 2.6 and not 2.5
# Version
Harakiri10 Summer Games 2.6Oct 14 2013 / 15:33:17

Makes any difference ??
When on my PC, I do get the odd freeze of the Baseflight GUI ( v2.3.5.0 ) if it may help.
For Android I use the 2 apps available right now on Play.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

hinkel wrote:Hi !
Actually they are 2 PID controller in Harakiri , the first is optimal for all GPS an Angle stuff , the second Alex.K seems fine in acro mode but the PIDs are in most case different and the choice of witch controller is used must be done in CLI.
So why don't create a Alex.k PID always configurable (( eventually in Multiwiiconf also )) in CLI like this for exemple :
cfg.P8[AKROLL] = ;
cfg.I8[AKROLL] = ;
cfg.D8[AKROLL] ...............................
The choice between first and second PID controller should be done with a switch on Radio and by use of GPS fonctions RTL and PH, the first PID controller always take the hand !

Regards
Hinkel


To answer my question I made a Test code in Harakiri SG2.5 here a little part from code:

Code: Select all

// Commutable PID Controller Mwii or Alex K.
   
     if ((rcOptions[BOXNEWPID]) && !(rcOptions[BOXGPSHOLD] || rcOptions[BOXGPSHOME] || f.GPS_HOLD_MODE  || f.GPS_HOME_MODE || f.FAILSAFE ))
                   {
                  cfg.mainpidctrl = 2;
     cfg.P8[0] = cfg.p_a_r;
                   cfg.I8[0] = cfg.i_a_r;
                  ........
    f.NEW_PID = 1;               
   }else
           {
            cfg.mainpidctrl = 1;
           cfg.P8[0] = cfg.p_mw_r;
                        cfg.I8[0] = cfg.i_mw_r;
                        cfg.D8 ....................
           f.NEW_PID = 0;
           }

So In flight I switch beetween Mwii PID and Alex K. for acro , horizon and angle mode to directly see the difference in flight and IMHO
in acro mode the Alex k. seems a little little better than the Mwii (Harakiri) , in angle and horizon mode the Mwii ( Harakiri ) is more efficient
and precise to level than the Alex K. IMHO for PH and RTL the Mwii (Harakiri) PID seems the best choice.
There is no need to implement this test code in Hararkiri ! I was just curious ! :mrgreen:

Regards
hinkel

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Very helpful post Rob. Thanks. I'll be going through your steps next flight

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Paccik: Well I haven't been testing gps functions in pre2.6 because it's still in the works (splitting gps code up / rearranging). 2.5 is tested...
@Hinkel: Thank you very much for sharing the results of your curiosity! I didn't expect that result. Maybe there is a chance we can reasonably combine both controllers to have the best of both worlds. I was looking at bradwii and gke PID Autotuning but I wonder how to do it with the current mwii controllers.
@PacciK @alistairr: Thanks for the nice feedback, but that was just a crude writeup leaving out all the ugly details.

Cheers
Rob

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Hi Crashpilot1000 !
I was waiting on a bigger difference in Acro mode between Mwii and Alex k. But the difference is not huge on the way I am flying :)
For me the Mwii Harakiri PID kontroller is the best ! :) But feel free to take the best of both ! ;)
The Bradwii autotuning software hmm ........... agressif autotuning........ hmm ......copter crash .......hmm......is there a user video
that show good results with this ?

Regards
hinkel

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Hello Friends,

Yesterday I've enjoyed 3 lipos ( approx 30 minutes ) flying in non-GPS modes....I really enjoyed the copter's sweet flying.

Testing flight again today...Takeoff in Angle mode, with MAG ...Perfect 1 minute.
Switched On Baro.... remained OK. another perfect 1 minute.

Switched on Position hold....Perfect 1 or 2minutes...then... I brought it in slightly closer...another 30 seconds and.... . WHOPPPP !!! inverted and CRASH all by itself !!!!
On Crash battery departed copter, yet the GUI on the phone had the last data ( as when the copter touched the ground and battery disconnected ).
As you can see, it was still in Position Hold.

Pictures Attached: Just removed the decimals from the GPS position.

Definitely something is wrong.
But What ??

Grrr.r...... !!!
Attachments
Screenshot_2013-11-04-17-40-35.png
Screenshot_2013-11-04-17-40-24.png
Screenshot_2013-11-04-17-40-07.png
Screenshot_2013-11-04-17-39-44.png
Screenshot_2013-11-04-17-39-31.png
Screenshot_2013-11-04-17-39-07.jpg

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

If I were to monitor 4 Debug Values to solve this 'issue' ( if it is an issue after all .... ) what should I be monitoring ?

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Now that I'm looking at the values of the motor outputs..... doesn't it seem VERY strange that Motors 1 and 4 are 1582, and 2 and 3 are 1376..... ie identical diagonally ??
1=BR, 3 = BL, 4 = FL, 2 = FR.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hopefully the crash was no major damage!
Please stick to 2.5 for GPS, I haven't tested PRE2.6 not yet on GPS, but already made some changes there.
Motor PWM imbalance is a matter of the frame, center of gravity and stickinput. If you have still pre2.6 on board you can do a normal hover (in the backyard) and check average inflight motorusage with cli status.
Greets
Rob

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Hi Rob, Thanks for chiming in....
Unfortunately, the copter suffered some major losses... and cannot be brought back in the air soon :-(...............(cry)
However during yesterday's flying I was making it a point of monitoring all the parameters, including gps sats, map position, motor and ESC's ( TC's 30Amp new ones) temps at end of flying = cold!, as well as motor levels...which were very balanced during hover....like 1550 to 1600 during hover for all of them except when doing some maneuvers, where of course, they change values to steer the copter.

I will now transfer the board and GPS to a smaller copter that I sometimes use as a testbed.
It seems that there is no HEX for the 2.5 version in your git. So, I will try to cook it on Keil uVision 4...which I have access to.

Thanks !!

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

So..I downloaded the ZIP from your Git, Rob, and it will not compile with UVision 4.. ( Hmmm ..What do you use ??? its a uvproj ! ;)
Seems like UV4 does not like static inlines in the mavlink bits.........
here's the first bit...

Code: Select all

Build target 'STM32'
compiling cli.c...
src\v1.0/matrixpilot/../mavlink_types.h(38): warning:  #40-D: expected an identifier
src\v1.0/matrixpilot/../checksum.h(27): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../checksum.h(27): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(152): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(155): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../mavlink_helpers.h(155): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(231): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(233): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(255): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(257): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(259): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(259): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(261): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(263): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(265): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(265): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(267): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(269): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(271): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(271): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(273): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(275): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(277): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(277): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(278): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(286): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(288): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(290): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(290): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(291): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(295): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(297): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(301): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(318): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(320): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(341): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(342): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(346): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(360): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(361): error:  #77-D: this declaration has no storage class or type specifier
compiling serial.c...
src\v1.0/matrixpilot/../mavlink_types.h(38): warning:  #40-D: expected an identifier
src\v1.0/matrixpilot/../checksum.h(27): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../checksum.h(27): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(152): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(155): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../mavlink_helpers.h(155): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(231): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(233): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(255): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(257): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(259): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(259): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(261): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(263): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(265): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(265): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(267): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(269): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(271): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(271): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(273): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(275): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(277): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(277): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(278): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(286): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(288): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(290): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(290): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(291): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(295): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(297): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(301): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(318): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(320): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(341): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(342): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(346): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(360): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(361): error:  #77-D: this declaration has no storage class or type specifier
compiling telemetry.c...
src\v1.0/matrixpilot/../mavlink_types.h(38): warning:  #40-D: expected an identifier
src\v1.0/matrixpilot/../checksum.h(27): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../checksum.h(27): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(152): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(155): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../mavlink_helpers.h(155): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(231): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(233): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(255): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(257): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(259): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(259): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(261): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(263): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(265): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(265): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(267): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(269): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(271): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(271): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(273): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(275): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(277): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(277): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(278): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(286): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(288): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(290): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(290): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(291): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(295): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(297): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(301): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(318): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(320): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(341): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(342): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(346): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(360): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(361): error:  #77-D: this declaration has no storage class or type specifier
compiling baseflight_mavlink.c...
src\v1.0/matrixpilot/../mavlink_types.h(38): warning:  #40-D: expected an identifier
src\v1.0/matrixpilot/../checksum.h(27): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../checksum.h(27): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(152): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(155): warning:  #260-D: explicit type is missing ("int" assumed)
src\v1.0/matrixpilot/../mavlink_helpers.h(155): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(231): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(233): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(255): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(257): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(259): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(259): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(260): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(261): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(263): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(265): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(265): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(266): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(267): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(269): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(271): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(271): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(272): error:  #65: expected a ";"
src\v1.0/matrixpilot/../mavlink_helpers.h(273): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(275): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(277): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(277): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(278): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(286): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(288): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(290): warning:  #77-D: this declaration has no storage class or type specifier
src\v1.0/matrixpilot/../mavlink_helpers.h(290): error:  #92: identifier-list parameters may only be used in a function definition
src\v1.0/matrixpilot/../mavlink_helpers.h(291): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(295): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(297): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(301): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(318): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(320): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(341): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(342): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(346): error:  #169: expected a declaration
src\v1.0/matrixpilot/../mavlink_helpers.h(360): warning:  #12-D: parsing restarts here after previous syntax error
src\v1.0/matrixpilot/../mavlink_helpers.h(361): error:  #77-D: this declaration has no storage class or type specifier
Target not created


Which precompiled 2.5 Harakiri is everyone using then ? Cannot seem to find the stable one....

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

What a sh** that your copter suffered severe damage, damn.
The 2.5 is here: http://fpv-treff.de/download/file.php?id=6257

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Thanks Rob !
Got it !

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Hi!
Today I compiled and tested the SGTodaysSnapshot2Nohex SG2.6 from 27 october 2013 on Naze32 rev4
The GPS PH with Baro during 6 minutes was fine no problem. :)
The autostart is working fine like last time. :)
The nav_rtl_lastturn =1 is still not working, bug could be coming from the reorganisation from mw.c code

Regards
hinkel

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

So.. this weekend I tried running my testQuad with Summergames 2.5
What I found out , is that I really had to bump up the PI's of the Position hold, whereas on SG2.6, the default values were fine.
And with current position gains of
P: 0.82, and I = 1.8
I am still nowhere near good reliable position hold.

Am I wrong in saying that the gains for PH have been changed in code from 2.5 to 2.6 ?

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

PacciK wrote:So.. this weekend I tried running my testQuad with Summergames 2.5
What I found out , is that I really had to bump up the PI's of the Position hold, whereas on SG2.6, the default values were fine.
And with current position gains of
P: 0.82, and I = 1.8
I am still nowhere near good reliable position hold.

Am I wrong in saying that the gains for PH have been changed in code from 2.5 to 2.6 ?


Hi!
Look in config.c to see the parameter description , normaly defaults values are ok. There is no
Change in gain for PH.

Regards
hinkel

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Just wondering if anyone has tested rth with success on Rev5 and SG 2.6. I have PH working most of the time but at the moment when I switch rth on it only selects mag and level mode as viewed on Android app. The quad flies great. RTH is just a safety backup is like if I lose video :D

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

RTH on Naze32 rev4 and SG2.6 works fine ( just a little issue with nav_rtl_lastturn =1 ) .
I have no rev5 bord to test this . If you make the test wait to have 7 sats to arm the Quad , to set a good RTH Position ! ;)

SecretSpy711
Posts: 14
Joined: Sat Oct 26, 2013 1:13 am

Re: Harakiri aka multiwii port to stm32

Post by SecretSpy711 »

what are others using for PosHold and PosHoldRate PID's? Mine was doing the "toilet bowl effect" today while in GPS hold mode, but I think I have fixed it by setting the correct magnetic declination.

rortega
Posts: 34
Joined: Sat Aug 11, 2012 7:34 pm

Re: Harakiri aka multiwii port to stm32

Post by rortega »

I'm testing Harakiri pre 2.6 on a rev5 NAZE32. I've uploaded the firm and with MultiWiiConf I can changes PIDS, AUX, calibrate ACC, MAG ... every thing seems ok. I would like to access through the CLI (Hercules) but can't get it. In Baseflight I send # character. What must I to access? Thanks.

theailer
Posts: 49
Joined: Tue Sep 24, 2013 9:06 pm

Post by theailer »

Try typing three #

rortega
Posts: 34
Joined: Sat Aug 11, 2012 7:34 pm

Harakiri aka multiwii port to stm32

Post by rortega »

It works! Thanks.

theailer
Posts: 49
Joined: Tue Sep 24, 2013 9:06 pm

Post by theailer »

Np :)

Neu
Posts: 5
Joined: Mon Nov 25, 2013 11:58 pm

Re: Harakiri aka multiwii port to stm32

Post by Neu »

Hmm theailer helped me flash my board(rev5) with harakiri (huge thanks!) but I got some problems when I try to give some throttle. I will attach a video to show my problem.

[youtube]http://www.youtube.com/watch?v=3sFUygjsf3Y[/youtube]

What can be wrong? My guess its just some settings that wrong but as a naze noob I have no idea what to change Also got the naze connected to my pc/phone with Bluetooth. No need to mess around with wires!!!!!
All help is appreciated!

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Harakiri aka multiwii port to stm32

Post by scrat »

Did you enabled in CLI 3D mode?

Neu
Posts: 5
Joined: Mon Nov 25, 2013 11:58 pm

Re: Harakiri aka multiwii port to stm32

Post by Neu »

Dont think so but i will check when i get home.

kaysee
Posts: 41
Joined: Sat Oct 05, 2013 2:38 pm
Location: Malaysia
Contact:

Re: Harakiri aka multiwii port to stm32

Post by kaysee »

Flashed my Naze32 with SG2.6 today. Looks promising this far. But one thing i have notice, there is no buzzer sound when the board initialize. Is this normal? Checked my buzzer with a 5v source and its working just fine.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

SG2.6 is an early Beta. Buzzer is not ready so far.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

@kaysee
Didn't you read my post?

Buzzer still need some coding! You have to wait for a new version!

kaysee
Posts: 41
Joined: Sat Oct 05, 2013 2:38 pm
Location: Malaysia
Contact:

Re: Harakiri aka multiwii port to stm32

Post by kaysee »

Thanx cGiesen. I thought my first post didnt pass through as my browser reporting timeout. deleted. Sorry for that. Much appreciated.

Neu
Posts: 5
Joined: Mon Nov 25, 2013 11:58 pm

Re: Harakiri aka multiwii port to stm32

Post by Neu »

Hmm I cant find something named 3D mode :/

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: Harakiri aka multiwii port to stm32

Post by aBUGSworstnightmare »

Neu wrote:Hmm theailer helped me flash my board(rev5) with harakiri (huge thanks!) but I got some problems when I try to give some throttle. I will attach a video to show my problem.

[youtube]http://www.youtube.com/watch?v=3sFUygjsf3Y[/youtube]

What can be wrong? My guess its just some settings that wrong but as a naze noob I have no idea what to change Also got the naze connected to my pc/phone with Bluetooth. No need to mess around with wires!!!!!
All help is appreciated!


Hi,

which ESCs are you using? Sounds like reversible ones? So, what will you get: A standard quad or a 3D one?

aBUGSworstnightmare

User avatar
IceWind
Posts: 115
Joined: Fri Mar 25, 2011 2:11 am
Contact:

Re: Harakiri aka multiwii port to stm32

Post by IceWind »

The 3D mode is not enabled by default it's required to go in the cli and enable the feature.

Also the behavior is not exactly that, the throttle around midle would stay within 1460 range and in 3D mode the
board only arms with the switch. (from the video seems he is warming iwth the stick combination)

Better go to the cli and reset to defaults and start configuring the settings from scracth.

Neu
Posts: 5
Joined: Mon Nov 25, 2013 11:58 pm

Re: Harakiri aka multiwii port to stm32

Post by Neu »

Its a TBS disco with simonk 30A (no reverse firmware hehe) and rctimer 22somethingsomething 750kv.
Yes I armed with the stick and when I flashed it back with baseflight it works. Gonna give harakiri another try.

Any one know how to use U-center to config a rctimer u-blox CN-06? Link for the gps http://www.rctimer.com/product_984.html I have it plugged in pin 3 /4 and tx goes to rx and the other way around but wont connect.

kaysee
Posts: 41
Joined: Sat Oct 05, 2013 2:38 pm
Location: Malaysia
Contact:

Re: Harakiri aka multiwii port to stm32

Post by kaysee »

Which android software works with harakiri? I tried to use Naze32 Conf but it crashed when connection made. I have this - http://www.banggood.com/MWC-Multiwii-Bl ... 86049.html for bluetooth connection.

subaru4wd
Posts: 316
Joined: Sat Dec 08, 2012 2:16 am

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

Any multiwii/naze software will work.

I use the ezGUI on my androids.

kaysee
Posts: 41
Joined: Sat Oct 05, 2013 2:38 pm
Location: Malaysia
Contact:

Re: Harakiri aka multiwii port to stm32

Post by kaysee »

@subaru4wd
thanx. will give it a try.

rortega
Posts: 34
Joined: Sat Aug 11, 2012 7:34 pm

Re: Harakiri aka multiwii port to stm32

Post by rortega »

Today I'm a bit sad :( ...
A few days ago, I tried the gps and I was very surprised to see how well it worked, it was exciting. And also RTH and Autolanding, every workged great. But today, in a windy day (no more than 20 km/h) the quadcopter was all the time moving, doing circles, and bowing too much.

Do any body know how tune Harakiri for a better behaivor? :(

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Neu: That video looks awful. Probably pre 2.6 is not naze 5 compatible. Sorry for that but it will take some time before I will look at the naze5 stuff again.
@rortega: There are several tuning options. Please look in the parameterlist in config.c and the readme - you will find useful information there.
@all: After a lot of farting around I put together a wp concept for Harakiri based on mavlink and missionplanner that seems reasonable to me. It took MUCH more time than anticipated to pull that off. Don't get me wrong, it isn't ready but a big piece is done now.
I attached a pdf that outlines the parameters and the logic of the mission planning. The code will do a lot of checks to prevent the saving of a wacky waypointlist in the first place but I am sure there is still a backdoor for skilled users to trick that out with a nonsense wp list. Like always the code is on display in my repo (https://github.com/Crashpilot1000?tab=repositories) just in case other projects want a mavlink missionplanner wp interface.

Cheers
Rob
Attachments
FirstLayoutWPprotocol.zip
Thats the current plot.
(21.87 KiB) Downloaded 161 times

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Crashpilot1000 wrote:@Neu: That video looks awful. Probably pre 2.6 is not naze 5 compatible. Sorry for that but it will take some time before I will look at the naze5 stuff again.


I have the Rev 5 board flying great on SG2.6. Position hold and RTH are working to although I'm not great at tuning it in better. Neu - I wouldn't give up on the Rev 5 yet although I don't have any ideas to solve your problem. Best of luck. I just got hold of a another Rev 4 board so I can run SG2.6 on Rev 5 and 4 to see what the difference is back to back

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@alistairr: THX for your feedback, but concerning the naze5 buzzer stories (I don't have and need one) there must be an error somewhere. Concerning the GPS the pre2.6 might require a slightly lowered gps_ins_vel, I can tell you more on this when that gps stuff incl. WP is done and I have the chance to testflight it. I hope to finish the GPS rewrite this weekend, but I also thought mavlink/mp/wp protocol could be done in 2 days and ended up in more than a week before it worked fluently and like expected.... one roadblock down, one to go.

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

I'll try lowering that velocity value as it does fly back way to fast. I'd also like to get more sonar influence. Defaults don't seem to use it much. Is that right?

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

alistairr:
The gps_ins_vel factor (actual "0.6", was 0.7 before) describes the internal weight of the speed measured by acc (acceleration over time) and the measured GPS speed for each axis. Since I altered the scale of the acc from 8G to 4G it MIGHT be necessary to lower that value (do it in 0.05 steps). I say "might" because the compareable Baro/Acc value (accz_vcf) could stay the same - so there is a good chance the gps value could stay the same as well.
To change the speed the copter is actually moving towards the Homepos on RTL you will have to alter nav_speed_max (is "350" cm/s).
But you can also increase the approach divider "nav_approachdiv" (is "3") if you just want the copter to slow down more on approach but not during the main flight to the Homepoint. This is the (simple) logic behind nav_approachdiv: It just divides the measured targetdistance in cm and takes that as velocity in cm/s. Example: The copter is 5m away: 500 cm / 3 = 167 so the targetspeed would be 167 cm/s (I know the units are wrong, but that's how it works). To prevent the copter from starving speed with this method before actually reaching the desired point there is a lower speedlimit that can not be "broken - "nav_speed_min" (preset to "100" cm/s). I wouldn't set that lower because from my tests I could see that it is very hard for the copter/gps to keep a lower speed. But you can see for yourself: Increase the devider (highest accepted value is "10") and lower the minimal speed (lowest accepted value is "10").
The next thing that can alter the speed during nav travel is called the "nav_tiltcomp" (preset to "20"). I found that in the arducopter 2.9.1 codepath because I was actually looking for a way to speed up the RTL. It is a quadratic function that "helps" the tiltangle when trying to reach the speed. The number describes how much is helped... the arducopter default was something like "50" but that seemed too much (nearly killed me on RTL) in my testing so I preset it to "20". I have reports that some set it to "30" to be happy. Sorry for the weak explanation of that factor but only arducopter really knows..
To your Sonar question: The logic behind the sonar is simple, since it can only measure a RELATIVE distance to an object and not the absolute hight (like the baro) a correctionfactor is computed on solid (solid is a contact when steady for 700ms) sonar contact so the baroaltitude and the reported sonardistance can be compared/aligned. The factor "snr_cf" (preset "0.7") describes how much sonar you have in the resulting hight. "0.7" means you have 70% sonarhight + 30% Baro hight. If you want more sonar, you will have to increase snr_cf (Note: more than 1.0 = 100% is not possible). When increasing that it can get a bumpy ride on sonar contact (baro smoothes that) depending on the quality of the sonar data (and that depends on the actual sonar and the underground). (Note: Put some foam on the sonar - like you would with a microphone - it reduces winddisturbance and keeps the dirt away from the sensor.)
I hope that *somehow* brings some light to some subjects.
Cheers
Rob

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

That was very helpful. I'm seeing up a quad to fly in an active underground mine stope (cave) for inspections and was hoping sonar could help a little with object avoidance. Baro will help but ąir pressure changes will upset it a bit so I think more sonar influence would help. I'm an underground miner and the manager asked if I would be keen. Very keen I am :D

Post Reply