Baseflight aka multiwii port to stm32

Post Reply
jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: Baseflight aka multiwii port to stm32

Post by jy0933 »

fiendie wrote:
jy0933 wrote:so basically the sonar feature does nothing at all( except the displaying measurement)

:(


Take a look at Luggi's github repository: https://github.com/luggi/baseflight/tree/sonar
He implemented Sonar ALT hold.
I think his forum nick is "crazyal".



cool

thanks

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@hinkel:

Based on your findings i set the parameters to this, and it works! I haven't expected that by giving the ACC so much authority!
gps_ins_vel = 0.9
gps_ins_pos = 0.1

I set the lpf to OFF (gps_acc_lpf = 1).

Cheers Kraut Rob

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

@ Crashpilot

I made new test and after has good value for gps_pos_p and gps_posr_p,
I increase gps_ins_pos from 0.1 to 0.5 and the result is remarkable less than 1m
drift with 8 sats, most time no drift at all. :)

Greetings
hinkel

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

NICE! I am still waiting for my ublox...

I tested the acc with differen LPF settings (recompile) - that is no good, so the default 42Hz lpf seems the way to go.
It's a pain finding the right parameters.
In the meantime i wonder if it might be useful to think/treat both parameters as one like this:
gps_ins_vel + gps_ins_pos = 1

That would reduce it to one parameter perhaps "gps_ins" [0.001 - 0.999] The greater the number the more acc you get. So
gps_ins_vel = 0.9 + gps_ins_pos = 0.1 = 1 would fit into that scheme.
In the mean time we will have to do more tests here to judge upon this. But the nice conclusion is, that this stuff actually works :) :) :). I am still keen on what the apm ins will look like.
Cheers Kraut Rob
Last edited by Crashpilot1000 on Mon Feb 25, 2013 11:28 am, edited 1 time in total.

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Crashpilot1000 wrote:@hinkel:

Based on your findings i set the parameters to this, and it works! I haven't expected that by giving the ACC so much authority!
gps_ins_vel = 0.9
gps_ins_pos = 0.1

I set the lpf to OFF (gps_acc_lpf = 1).

Cheers Kraut Rob


Hi Crashpilot!

I saw your post to late, I think starting with gps_ins_vel .._pos =0.5 is a good starting point and after play with gps_pos_p
and gps_posr_p (increase), but there are so many parameter to play with !!!

Greetings
hinkel

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Yes 0.5 for gps_ins_pos is always save, because you are sure to get enough correction from gps. And the "vel" should be the first value that should be tuned (in theory) because the acc can actually measure acceleration over time (=speed). So the position derieved is a function of that.

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

@Crashpilot

Info:
during the test I set :
nav_speed_max=120
gps_wp_radius=100

Greetings
hinkel

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

nav_speed_max=120 is a good idea! So many parameters....
gps_wp_radius=100 Is just for detection if a waypoint is reached, it is not used in position hold.

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Crashpilot1000 wrote:
gps_wp_radius=100 Is just for detection if a waypoint is reached, it is not used in position hold.


Ok, I was not sure of the influence !

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Thank you for helping me (and probably others) figuring/testing out stuff!!
The parameter nav_speed_max is also used just for computation of WP - navigation speed. When doing pos hold there is also a speed calculated based on the actual location error. Sorry that i mixed that up! I should always look into the code before posting stuff .....
Keep it up!!

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Hi Crashpilot !
I make a little change in your mw.c file to better count number of Satellites !
for 5 sats it blinks 1 time , for 6 sats it blinks 2 times , for 7 sats it blinks 3 times etc..........
and no LED fast blinking between !
I hope i don't make an Error ? I am not a programmer .(It is running on my Naze32)

REPLACE THIS somewhere in mw.c

### blinkblock = GPS_numSat;

### cnt = 150; // 1.5s Break before next flickerblock

### if (f.ANGLE_MODE || f.HORIZON_MODE) {
LD1_ON(); //LED1_ON; Crashpilot
} else {
LD1_OFF(); // Crashpilot LED1_OFF;
}


WITH THIS


### blinkblock = GPS_numSat - 4;

### cnt = 200; // 2s Break before next flickerblock

### if ( GPS_numSat <= 3) {
if(f.ANGLE_MODE || f.HORIZON_MODE ) {
LD1_ON(); //LED1_ON; Crashpilot
} else {
LD1_OFF(); // Crashpilot LED1_OFF;
}
}

Greetings
hinkel

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Thats a very good idea because below 5 Sats it is uninteresing anyway and boring counting all of them. I will look at the code in detail later, perhaps it is time for 8c with timecops acc scaling and the default parameters set to 0.5 and your LED idea? I would like to let "gps_wp_radius" be 200 on default, so it is easier to hit an actual waypoint. A reduction of "nav_speed_max" default (300) seems reasonable, perhaps to "200" as default. 120 seems too close to "nav_speed_min = 100".
Cheers Kraut Rob

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Crashpilot thank you for integrate the LED idea ! :)

PS: gps_wp_radius or nav_speed_max values was just for your info ;)

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

Harakiri8c - slight update

Post by Crashpilot1000 »

So, here is harakiri8c.
- The GPS Code is unchanged. But the default values for gps inertial integration are set both to 0.5 to start with.
The new mpu6050 scale code from Timecop is implemented, but the scale is not shown in cli with (o)ld or (n)ew. You will notice that the acc values are 512 after calibration if you have the new revision or if it is just 255 if you have bought the crappy mpu.
- Hinkels sat-count-led-idea is implemented. Normally the "red" led shows that you are in angle or horizon mode but it also shows satnumbers by blinking them for you to count. This idea was originally from Helste :). So how is that solved when two functions rival one led? When you don't have a gps nothing changes. If you have a gps the led will work as normal up to 4 sats. After 5 sats it will quit showing "i am in an acc mode" and blink down the satnumber starting with 5. So one blink are 5, 2 blinks are 6 sats....

Here is a breakdown of preconfigured and new parameters:

Code: Select all

mag_declination = 105   (You will want to change that !!!)
acc_hardware = 2 (MPU6050)
acc_lpf_factor = 100
looptime = 3000
accz_vel_cf = 0.985 (don't change)
accz_alt_cf = 0.940 (don't change)
acc_lpf_for_velocity = 10
nazedebug = 0
deadband = 10
yawdeadband = 15
maxthrottle = 1950
gps_type = 0 (crappy nmea)
gps_baudrate = 115200
gps_ins_vel = 0.500 (the higher the higher acc influence)
gps_ins_pos = 0.500 (the higher the higher the gps influence)
gps_acc_lpf = 1 (1 means off)
nav_speed_max = 200  (was 300 before)
gps_rtl_minhight = 20  (in meters)


Cheers
Kraut Rob
Attachments
Harakiri8cHEX.zip
(69.36 KiB) Downloaded 375 times
Harakiri8cSource.zip
(117.97 KiB) Downloaded 430 times

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

Re: Baseflight aka multiwii port to stm32

Post by mahowik »

Hi Rob!

Appreciate it! Amazing job! ;)

Have you tried this solution on windy condition?

thx-
Alex

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Mahowik: Thank you very much! But the idea was generated on basis of your thread and your althold implementation. Due to the weather i was not able to do much testing, but i expect this code to cope better with wind than the original.. Perhaps some of this code if useful for the mwii project as well?
Greets Rob

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

Re: Baseflight aka multiwii port to stm32

Post by mahowik »

I have already tried to to use acc for position hold stabilization, but only quick tests and w/o correction by gps viewtopic.php?f=8&t=2929#p29088
You solution looks full and I'm going to play with that on mega2560 board. But yes, I suppose it will be time consuming issue... so need to try... Even if cycle time will increase to 10ms I think that 100hz loop it's more than enough for still good stabilization... so tests tests tests ;)
Also you have mentioned that "3drobotics is currently working on that". Where it's possible to look through the code from 3drobotics?

thx-
Alex

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hi! You can look for that arducopter stuff here: https://github.com/diydrones/ardupilot/ ... nertialNav. I think they must be doing basically something similar than this?
Today i had the chance to test the code again and noticed some slight circeling manner. I don't think it's my mag (this time;)) but maybe there could be a slight bearingerror at play i may introduced in "GPS_distance_cm_bearing" will check it over again.
Cheers Rob

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Timecop: Do you know if "double" is correctly handled on stm? I ask because on arduino double was treated as float and google couldn't really help me on that.

Cheers Rob

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

All calculations should be done using floats + "f" variants of the functions, to avoid pulling in double equivalents.
But yes, "double" type properly works, not get downgraded to float.

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Hi timecop !

Have you an idea how to fix the MS Baro Bug describe from Crashpilot1000 ?

Greetings
hinkel

Crashpilot1000 wrote:The MS Baro stuff is still some I2C baro initialization stuff. You can test it in your room: Connect naze to the gui and you will see rising altitude. Now exit gui, enter the cli and exit the cli by typing "exit" that will also reset the naze. Now reconnect to the gui and you will see, that rising alt is gone. My attempt to the reset the baro on init a few times, seems to help a little. Normally the baro pressure is compensated by temperature on every read but when you produce wacky delta Temp it may cause problems in the first few minutes (rushing out from the house into the cold). I think there were some changes in the main/lib (not src) folder i haven't already assimilated in 8b, maybe they will fix it. It is just a tiny thing, but it's hard to find for me, because the baro readout works most of the time very well and this issue doesn't arise with the old BMP085. I will check it out with the changed files from Timecop. At least he knows this stuff :).

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Does it occur in my code? I have no idea where he copypasted that bug from :)

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Yes it occur in your code, I just try it with Baseflight and the baro value after 2 minutes begin to rise from alt 143,5 to 144,3 and it still rising. I also saw the problem in flight (Baseflight) in baro mode the copter lose height after a while.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@timecop: Thank you for clearing up that "double" question! The MS barostuff still needs some attention, i am still clueless :)
Meanwhile i have done further fiddeling the gps code and i think it has some severe shortcomings when calculating loiter with the current approach. Much work to do :( ..
Cheers Kraut Rob

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hi!

I reworked the gps code a little. The "doubles" are back to floats again. And i removed the slight bearingerror i introduced :(. That slight bearing error lead to circeling in PH, like you would see with a mag-problem. I also increased the delay on initialization of ublox, sometimes my ublox didn't understand the right baudrate. Harakiri9 will be last version with the conventional gps code. I think, I will have to rework PH and perhaps the current acc calibration.

Cheers
Kraut Rob

P.s.: I did a complete description of all new functions/parameters in German here: http://fpv-treff.de/viewtopic.php?f=18&t=1368#p20577

EDIT:
Use:
gps_ins_vel = 0
gps_ins_pos = 1
gps_acc_lpf = 10
That reduces acc usage just for the time between gps reads but works very good!
Here are 2 shabby videos from me:
http://fpv-treff.de/viewtopic.php?f=18&p=21360#p21395
Attachments
Harakiri9Source.zip
(118.1 KiB) Downloaded 426 times
Harakiri9HEX.zip
(69.18 KiB) Downloaded 456 times

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Hi Crashpilot !

I fly your Harakiri 9 (and read the german forum ) ,
I set gps_ins_vel = 0 and gps_ins_pos = 1 and default GPS PID.( like your advice )
I can say yes it works, but not very fine for me.
I also test gps_acc_lpf with 10 and 50 but I saw no significant result.
so I put gps_acc_lpf = 1 . I push looptime to 5000 but it was worse.
In fact I set gps_ins_vel =0.5 and gps_ins_pos =0.5 and change gps_pos_p and gps_posr_p like in Harakiri 8b and this was
for me the very best results . PH and RTH are very fine !

Greetings
hinkel

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Hinkel: Thank you very much for your feedback!
Your info on the parameters is also very interesting. I would love to have a BT line and put out some inflightdata in debug to figure stuff better out....
Cheers
Kraut Rob

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

TC's update today ??

Post by mr.sneezy »

Guy's, not sure if I'm missed something, but I can't install TC's new HEX file from today. I get a message from the STM loader saying it can't use the file, and I've noticed the file size of the .HEX is 397Kb instead of around 150kb for previous versions.
I used the same 'save file as' method as previously to download the file.
Not sure where my problem lies ?

Thanks,
Martin

lld
Posts: 9
Joined: Sat Feb 23, 2013 7:39 am

Re: Baseflight aka multiwii port to stm32

Post by lld »

Hello Crashpilot,

I tried your Harakiri9 yesterday (also I am following the progress on the German forum). Actually started with 8 version but switched to version 9.

It was VERY windy and I was using a tricopter which was quite new and a bit unknown to me. It was also not the most vibration free platform

Alt hold was working well although I would like to have the reaction to the throttle stick a bit stronger. When giving a command with the stick it takes quite while before the copter reacts.

Pos hold was so so. I did not make the last changes as suggested as I was already out on the field. Sometimes it held position within 1 meter, sometimes it was making big circles with a diameter of about 6-8 meter. If I then made a correction with the stick it held the position much better.

Return to home was working well but VERY slow.

I am not sure when I can test the settings as you proposed, but I hope next weekend.

- what can I do to make the reaction to the throttle stick a bit stronger when in alt hold mode ?
- how to increase the speed while in rth mode ?

Ro

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: TC's update today ??

Post by timecop »

mr.sneezy wrote:Guy's, not sure if I'm missed something, but I can't install TC's new HEX file from today. I get a message from the STM loader saying it can't use the file, and I've noticed the file size of the .HEX is 397Kb instead of around 150kb for previous versions.
I used the same 'save file as' method as previously to download the file.
Not sure where my problem lies ?

Thanks,
Martin

works here - the file isn't much bigger, and googlecode reports it as correct size.
You sure you didn't rightclick the html page instead of raw hex?

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@lld
Hi! Thank you very much for your feedback. I know the reaction on althold relative to throttlestick middle is not so crisp but it's a compromise between BMP and MS Baro. I made no variables directly accessible to change the behaviour on purpose :). But you can change the code mw.c line 860 " AltRCTimer0 = currentTime+100000;" you could reduce that value to let's say 80000 but i would leave it that way. I wanted to do it as simple as possible without an extra pid controller to maintain a certain speed. Way more confusing parameters so i took the user friendlier route of basically 2 parameters to tune (Alt P & "I") and the D is just a tiltangle correction. The downside is, it is not so crisp as it could be.
Yeah, the RTL is really slow. That is the cli parameter nav_speed_max = 200 you should increase it (was 300 before, i thought it could be too much - wrong idea) so perhaps 300 or 400 are suiting better. The "GPS_INS" parameters are still unclear, i suggest to limit them basically to the time between gps reads, but hinkel has better experience with "0.5/0.5". Here are the latest videos (2 new!) including the settings i used: http://fpv-treff.de/viewtopic.php?f=18& ... =40#p21395
Circeling can also be a symptom of motor influence on MAG, but that is nothing new, i just wanted to mention it.

Cheers
Kraut Rob

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: TC's update today ??

Post by mr.sneezy »

timecop wrote:
mr.sneezy wrote:Guy's, not sure if I'm missed something, but I can't install TC's new HEX file from today. I get a message from the STM loader saying it can't use the file, and I've noticed the file size of the .HEX is 397Kb instead of around 150kb for previous versions.
I used the same 'save file as' method as previously to download the file.
Not sure where my problem lies ?

Thanks,
Martin

works here - the file isn't much bigger, and googlecode reports it as correct size.
You sure you didn't right click the html page instead of raw hex?

Thanks for verifying the file size for me. Yep, your right, I was trying a 'save as' on html page. Wasn't familiar with the HEX editor screen that opens up and has the 'raw' button on the right side. Got it sussed out now :)

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

Guy's. I've reflashed my MKT3329 gps to the V1.9 fw from 3Drobotics. I want to set Baseflight's gps_type correctly for it. Did TC add a new type for that gps fw like Crashpilots below ??

gps_type = 0 GPS_NMEA
gps_type = 1 GPS_UBLOX (does autoconfig, sends the "block", you set baudrate)
gps_type = 2 GPS_MTK16 (old MTK binary protocol, 3drob. 1.6, baud is set automatically)
gps_type = 3 GPS_MTK19 (new MTK binary protocol, 3drob. 1.9, baud is set automatically)
gps_type = 4 GPS_UBLOX_DUMB (You have to set baudrate, You have to configure ublox with ublox center on your own.

(I asked a question a few weeks ago about V.1.9 fw and it's use in Baseflight, but didn't get a response either way)

Also, is there a way to list the available gps_type values in the CLI ? (I tried ? and help etc)

Thanks again,
Martin

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

I haven't touched GPS for months since that code wasn't originally written by me anyway.
Perhaps some of these GPS changes from 2.2 will make it in once its released.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

timecop wrote:I haven't touched GPS for months since that code wasn't originally written by me anyway.
Perhaps some of these GPS changes from 2.2 will make it in once its released.
OK understood.
Thanks,
Martin

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

And as far as GPS_Type goes, it's here:
[code]
typedef enum {
GPS_NMEA = 0,
GPS_UBLOX,
GPS_MTK,
} GPSHardware;

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

LOL.
I found your reply and the code in the board.h file at about the same time :)

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

I got a bit of time to do stuff with the quad today. I swapped the GPS to the uBlox Neo-6M from the MTK3329 and set Baseflight for uBlox type.

Now that I have mag, gps and baro senors working I have a couple of questions for the guys using those here.

Is it necessary to re-calibrate the mag and acc after a firmware update ?
I ask this because it 'seems' like calibration didn't change at all between firmware updates, but I could be wrong.

Secondly. Now that I have all those sensors, how to best set the AUX switches (see image) ?
I suspect that mag should be selected all the time and baro should be selected when gps hold or gps home is selected, but can somebody confirm or deny that for me.

Maybe Crashpilot could show me what he sets up to get the best use of the sensors.
Thanks,
Martin
Attachments
Fullscreen capture 352013 91830 PM.jpg

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Just a video showing Naze32 rev4 GPS Position hold with Baseflight r225 and Harakiri 9 !

http://vimeo.com/61104943

JollyJoker
Posts: 8
Joined: Sun Feb 06, 2011 4:50 pm

Re: Baseflight aka multiwii port to stm32

Post by JollyJoker »

Looks damn good. Would you mind to share your settings?

Exactly the same video made today with 8+ sattelites in view. Only harakiri9 with recommended settings. :|
http://www.youtube.com/watch?v=KQKLCzhovmQ

Regards Peer

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hi!

Thank you all very much for testing out my SH** and posting Videos!
Meanwhile i found, that not all ublox seem to behave the same and the current BF ublox parser is picky about the fixtype. Without a fix reported back, the gps functions are disabled. So i took the current mwii ublox parser and implemented it in harakiri9 and called it 9a. You can pick it up here http://fpv-treff.de/viewtopic.php?f=18& ... =80#p21784 (i will upload it here as well). Maybe JollyJokers' quad lost 3dfix but still had a 2Dfix and the gps functions bailed out temporarily then? Try 9a and do PID tuning. The default pids are suitable for my quad (60cm diagonal and 1,2Kg) but GPS Pid tuning is still a real pain. Since the gps logic is basically the same, you will have to use eos bandi's guide http://i2c-gps-nav.googlecode.com/files ... tation.pdf or the german translation http://www.wii-copter.de/forum/download ... l&df_id=24.
Always re - do MAG and ACC Calibration after FW upgrade!! It will take you just 1,5 Minutes!
For Mag Calibration i use a long usb cable. I grab the copter at the center and do a complete yaw circle (like a pizza), than i repeat that with the copter upside down. Then i point it north and do a complete flip to the north and back, then i do a complete flip to the east and back. The cable is now wrapped around the copter and i swing the copter around to free the cable again. I don't know if it is a correct procedure but works for me....:).

Don't use original BF with MTK19 it can not cope with /use it's binary protocol. (BTW: Ublox seems really better for me anyway. I bought this one: http://www.voelkner.de/products/346888/ ... 2ETTL.html but there are always cheaper options)

Cheers
Rob


EDIT: This version has an option for the people "Damn i soldered all my esc and motors on my octo - and now i just want to test out one motor and i don't want to rip the whole thing apart"
Enter the cli("#") and type "feature pass" and "save".
Now the green and red led start to blink as a WARNING, because all the throttlecommands by your receiver are now given directly to all esc at once. You can calibrate all your esc at once in this mode now, BUT YOU CAN NOT FLY in this mode, because all the flightcontrol logic is off. The min/max values are ignored as well - just a pure passthrough for receiver throttle commands to the esc to mess around with them.
So now you have the cli still open you can set it to only adress one motor by typing "set passmotor = X". You don't have to type "save" the change is applied immediately. The "X" represents the motornumber like described in Timecops manual for your specific multirotor (predefined is quadx). When you put in "0" for x then all motors are adressed again. Once you are done type "feature -pass" and "save". Now you can go flying again.

One WARNING with Harakiri9a: When using feature pass, make sure your Transmitter is running, otherise the motors can power up with full throttle. I already fixed that but it is still in the 9a!!! So use that feature with care!
Attachments
Harakiri9aSource.zip
(118.86 KiB) Downloaded 364 times
Harakiri9aHEX.zip
(69.15 KiB) Downloaded 389 times
Last edited by Crashpilot1000 on Fri Mar 08, 2013 7:26 pm, edited 3 times in total.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@mr.sneezy: I attached a screenshot with my settings used in the videos here: http://fpv-treff.de/viewtopic.php?f=18& ... =40#p21395
When using gps i would recommend to combine: ACC, MAG and probably BARO. Dail in a decent P for the mag as well (4 is of no use anyway, try 10 or more).

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

Re: Baseflight aka multiwii port to stm32

Post by hinkel »

Hi JollyJoker !

With Crashpilot recommended settings it should be fine too on Harakiri 9 , are you sure that you set gps_ins_vel = 0 and
gps_ins_pos = 1 your video look like you invert this parameters ?
To set it, use Multiwiiconf and Putty for the moment it will be safer than some clone software !

Greetings
hinkel

whakahere
Posts: 20
Joined: Wed Jan 30, 2013 9:17 pm

Re: Baseflight aka multiwii port to stm32

Post by whakahere »

I need some help to understand how I go about knocking out the small shakes I am getting. I am not sure what I should be changing but I am getting the feeling it has something to do with the filtering as I have played with the PID's until the cows come home and the small little shakes just won't disappear. I have the green board (rev 1 or 2??) naze32. props, motors are balanced and FC is on vibrations foam.

I am guessing it has something to do with lowpass filtering but I can't find what I should be doing with this. In the cli I see the gyro_LPF is set at 42 .... What steps should I have this set ... how do I go about setting this value correctly? I am also guessing that the low pass filter is always active ... right? :) Or should I be changing something else?

If there is a good video tutorial or links I should read can you please also post them .. I am now feeling a little lost.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Green, so that's MPU3050, so you have a choice of,
256, 188, 98, 42, 20, 10 for the lpf value.
On 6050 its always fixed at 42.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Baseflight aka multiwii port to stm32

Post by copterrichie »


timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Because its fucking ugly and retarded, and it's just same shit you can buy off chinese ebay for ~$40?
I'm not actually sure which part of the link you're referring to as "doing same"

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Baseflight aka multiwii port to stm32

Post by copterrichie »

Sell the Naze on eBay.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

I think I have better things to do. Also, based on "9 available, 1 sold" it doesn't sound like a very good idea.

also, lol: http://www.goodluckbuy.com/mpu6050-6-ax ... ller-.html

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Timecop: Yes, i think ebay is not the way to go. And the shown FC are outdated.
@whakahere: Hmm, these little shakes could also be produced by the faster Cycletime the naze has. Try to set some values to get the naze closer to original mwii.
acc_lpf_factor = 100 and looptime = 3000. I think mpu3050 hardware lpf of 42Hz is fine (it is fine with mpu6050, like Timecop said). Besides this you can try out 9a as well because these values are set and the main pidcontroller is improved with float calculation and some deltatimestuff wich makes the quad more stable.
Cheers
Kraut Rob
Last edited by Crashpilot1000 on Wed Mar 06, 2013 4:17 pm, edited 1 time in total.

Post Reply