Harakiri aka multiwii port to stm32

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Anyone know if there is a thread for BaseFlightGUI2 ?

I have another suggestion for it...
Tool Tips- The small pop out 'help' dialogues that display on some Windows apps when you hover the mouse over a parameter or button.
A Tool Tip for each PID block would be helpful to newer guys who don't have as much knowledge as some of us.
Cheers,
Martin

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

That would realy nice to have.
Can you give me some text?

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

cGiesen wrote:That would realy nice to have.
Can you give me some text?
LOL. No, don't have a good enough idea of each myself.
I think I know what the Pitch/Roll/Yaw PID block does now, but only in Horizon mode for instance. The other blocks I find that I only half of an understanding, I try something at the field, and sometimes the result is not I understood them to be.

For Navigation Rates tool tip I'd have say - "Changes the maximum speed and/or tilt when moving to a position"

For Mag tool tip I'd have - "Change the strength of influence of Magnetometer on heading when Mag is enabled"

For Velocity I might have - "Adjusts the rate that height can change in Altitude Hold mode"

What I'd give to be able to simulate a quad in a virtual environment so I could learn faster what each does visually...

Peter
Posts: 82
Joined: Mon Jun 11, 2012 2:09 pm

Re: Harakiri aka multiwii port to stm32

Post by Peter »

You can look at the documentation and wiki of arducopter and i2c-gps-nav. Arducopter does even have a online simulator. And the navigation routines in i2c-gps-nav and multiwii are the same as in arducopter.

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

Image
Something like this?
Attachments
Parameter.png

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi! I just tested the start in althold with "Source160513-1510Uhr.zip" and discovered a tiny but severe bug, that is fixed already and will be fixed in the next version. Engaging althold in flight is no problem and not affected at all. Description of the bug: Start in althold, everything seems fine until you put back the throttlestick to middle. The baselinethrottle is not adjusted (one missing code line :( ) and so your idlethrottle is still taken as baslinethrottle -> drop to the lawn. So WARNING: "DON'T START IN ALTHOLD!" with that version.
I just want to keep you informed and prevent possible damage of my alternative FW. Still work in progress...
Cheers
Rob

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

cGiesen wrote:Something like this?

Hi Carsten, yes just like that is great. It will make learning to use the parameters much much easier for the guys who are not at your high level of understanding (like me).
Maybe I can help with translations if you want, although I doubt you need any help there.
Thanks,
Martin

PS. I did a quick update and check to version 2.0.50.0 to see if I could 'cut & paste' the tool tip text. No.

Also, I think the time delay for the tool tip could be around 6 seconds before it auto closes. I found it too fast to read the whole text (not that I can actually understand German).
Hope that helps.
Last edited by mr.sneezy on Sun May 19, 2013 12:32 am, edited 1 time in total.

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Crashpilot1000 wrote: So WARNING: "DON'T START IN ALTHOLD!" with that version.
Rob
Thanks for the warning, as I will be doing some more tuning today.
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I did some more tuning today. Improved the Pos Hold a bit more (one of my most important desires). It's OK, but not as solid as I've seen on the Youtube videos of Harakiri.

I'd still like faster response to my stick inputs in Angle mode. Not sure where to adjust for that.

Here's my PIDs so far.
Harakiri10Beta4.jpg


A note to Carsten.
Did you change any of the BaseFlight GUI2 USB/Bluetooth comms with the new version with the test tool tips ?
The reason I ask is that I had no issue reconnecting to the quad after going out of BT range today, unlike last time where I needed to terminate the app with Task Manager...
Edit: Opps maybe spoke too soon. Had to use Task Manager to close the app after I made the screen grab above, and then yanked the power from the quad...


Martin

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

No, I didn't change anything with COM.
I do not have any Bluetooth for testing.
But I have put some timeout to the port, but it looks, that bluetooth didn't thou any timeout :(

When I remove my USB I immediately get the lost connection error...

Did some one other has an idea?

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

Crashpilot1000 wrote:@Crashfpv: OMG, look in the obj folder !!! For the althold: it waits till you reach the throttlestickcenter(+deadband) before you can change the hight. Don't be too quick on the throttlestick in althold. The Autolandrate is adjustable "set autolandrate = X", it is probably 75 with your version and 80 within the hex you didn't discover. Just take it as number, more means faster landing. The landing detection is slow, just to be on the safe side. It requires the motors to run 2 seconds continuously in idle. I have seen another solution but i think there is a chance that it could disarm in the air, if a sudden wind will pull the copter up or stop the autoland. "oldcontroller" just refers to the main pid controller, nothing else is changed.
@Felix: You have to set the correct throttlerange in the gui first of course. An automated esc calibration like "ESC_CALIB_CANNOT_FLY" is absolutely nogo for me thats a clear ticket for a jump in your face copter like with robbe 930esc etc. The current approach is more general, compatible and secure. Not every esc has the same calibration sequence, like assumed with ESC_CALIB_CANNOT_FLY.
There is a repo, but not done by me... and seems to be deserted: http://code.google.com/p/naze32-harakiri/
Greetings Rob


thank you for clarifying that Rob.

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

Hi cGiesen,

If you need help translating the SET descriptions, please let me know. ill be happy to give a hand. Or i suppose you could easily translate it over with google.
also, another idea would to have the convient of having a reverse checkbox in the RC control setting for the channels, instead of having to do it in the radio, or maybe a future wizard..
Thumbs up on the tooltips too!

Either way, keep up the good work.

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

I would be happy if I get the english meaning of the different settings.
Bring it to german is no big proplem!
Can you edit XML?

Open settings.ini and change
[Help]
Language=DE -> US

Than empty items are created in help.xml, there you can edit the items and send me the help.xml or attach to one post here.
Then I implement it to the main file...

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Hi Carsten,

Did as instructed above, but did not find any blank US text fields in the updated XML file. Tried with 2.0.51.0 to make sure, but the help.xml has no field like this below

<Language>US</Language>

is that what should have been created ??

Martin

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

Did you change the settings.ini ?

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

Sorry there was a bug :(
But now the US item are in ...

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Tried it again and yes got extra text appended to the XML file with 'US' text fields with the 2.0.52.0 version.

I had a mess around with Notepad and edited the file with some entries, but I could not see changes applied to the BaseFlight app after saving. Have to admit that I don't know how to edit XML then :)

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

Please download again.
Now there is an Online Help Editor in the folder OnlineHelp.
Yust start and you can start edit ;)

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Nice :)

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Carsten, can you add feature to the XML editor to save a backup copy of the file when 'save' is used ?
Also if possible could the BFGUI2 application rename and save the old 'help.xml' file before doing an online update ?

I lost some work today unexpectedly and couldn't recover it. Retyping it again now.

Also while your working on the app, can the time out for tool tips be increased by 200% ?
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

Yes, I will do

Edit:
Now there is a backup before saving the xml. But 2 time save destroy the backup!
And there is a autosave. 1 minute after a change there is a autosafe file of help.xml

In Baseflight GUI I have to change this too, but I do in the evening!
Last edited by cGiesen on Wed May 22, 2013 1:35 pm, edited 1 time in total.

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

cGiesen wrote:Yes, I will do

Here's a first pass at the US text. I'd be interested in comments from Rob or TC about my interpretation of the main PID's. I'm sure there will be some changes suggested, which is fine :)
File attached.
Attachments
Help.zip
Help text for BaseFlightGUI2
(7.58 KiB) Downloaded 198 times

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

ive been out for a couple of days. good to see youve taken the lead sneezy. btw i sent you a pm.

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

crashfpv wrote:ive been out for a couple of days. good to see youve taken the lead sneezy. btw i sent you a pm.
No worries. I've replied to the PM.

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

mr.sneezy wrote:
cGiesen wrote:Yes, I will do

Here's a first pass at the US text. I'd be interested in comments from Rob or TC about my interpretation of the main PID's. I'm sure there will be some changes suggested, which is fine :)
File attached.

It's in the main part now ;)

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Had some more time today to add text. Mainly translated the original German text.
File attached.

PS. Did you find a way to increase the tool-tip text display time ?

PSS. Backup of files in the XML editor works :)
Attachments
BaseFlightGUI2 Help2.zip
BaseFlightGUI2 help file
(9.06 KiB) Downloaded 191 times

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Questions about two settings I've not used before.

What does the Power Meter Alarm set point value do for us ?

What is Throttle PID attenuation used for on a Quadcopter (not airplane) ?

Thanks,
Martin

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

Harakiri aka multiwii port to stm32

Post by cGiesen »

mr.sneezy wrote:Had some more time today to add text. Mainly translated the original German text.
File attached.

PS. Did you find a way to increase the tool-tip text display time ?

PSS. Backup of files in the XML editor works :)

Many thanks.
There is a new editor in the download. Can you please use this?
There I include an updated field

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

mr.sneezy wrote:Questions about two settings I've not used before.

What does the Power Meter Alarm set point value do for us ?

What is Throttle PID attenuation used for on a Quadcopter (not airplane) ?

Thanks,
Martin


Hi Sneeze,

As i know of Throttle PID attenuation - it reduces the pids slightly on throttle bursts. So if you pull your throttle up and it starts to wobble, just give it some of this and it should take away the wobble. it works well.
not sure what Power Meter Alarm means. id say for batt voltage set?

ive got a questions too, what is the velocity PID at the bottom for ?

cheers, paul.

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I think velocity PID is used to set maximum speed of flight controller auto altitude, in either Position Hold (when pilot commands a different height via throttle) or during auto-land. Might be able to check that in the code somewhere, or gets Rob to verify it.

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

cGiesen wrote:
mr.sneezy wrote:Had some more time today to add text. Mainly translated the original German text.
File attached.

PS. Did you find a way to increase the tool-tip text display time ?

PSS. Backup of files in the XML editor works :)

Many thanks.
There is a new editor in the download. Can you please use this?
There I include an updated field


Seems to work fine. Added a couple of things. Your date function should show where :)

Perhaps I should PM the updates?
Attachments
BaseFlightGUI2 help3.zip
(9.55 KiB) Downloaded 212 times

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

Re: Harakiri aka multiwii port to stm32

Post by cGiesen »

mr.sneezy wrote:Had some more time today to add text. Mainly translated the original German text.
File attached.

PS. Did you find a way to increase the tool-tip text display time ?

PSS. Backup of files in the XML editor works :)


Hi Sneezy

I have change my GUI in one point!
The Values on the tab parameter are the same as some in CLI SET
So I remove the section specially for Parameter and link to CLI SET
Now I have to copy your work to the new items.

So please wait until tomorrow, before you go on with your work ...

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Hi Guys,

I've been setting up my little hex6x on the naze32 running Harakiri. First of all, thanks for all the hard work, both on the GUI and Harakiri and Baseflight from all of those that have worked on and continue to work on these...

I'm coming from some experience with the MultiWii 2.2 based NHAdrian modified code which has some similarities to the Harakiri fork (minus the recent sonar/baro fusion addition) http://www.multiwii.com/forum/viewtopic.php?f=8&t=2965.

I've found that the harakiri doesn't have any generic defaults for PosHold PosHoldRate or NavRate when I loaded it up. There is a post here http://fpv-treff.de/viewtopic.php?f=18&t=1368&hilit=naze32+harakiri+PosHold&start=1860#p34396 with some guide and values and of course the english post at the beginning of the Naze32 CodeEcke here has been helpful too. What values are you guys finding effective for the gps_pos, gps_posr and gps_nav values? I've loaded up the values listed in the CodeEcke post I linked to above, As I do some testing and tweaking I'll share back my findings.

Cheers!

PS: I've got a SRF04 sonar, but this isn't going to work on a HEX without a PPM Rx, I've also got a SRF08 I2C Sonar, but it doesn't look like it's supported, just the SRF04 and a mod using a i2c breakout. This I2C sonar works with the same code as the SRF02 and SRF10.. without delving deeper into i2c.c, it looks on the surface like modifying the address of the i2c DaddyWallroos SRF shield is enough to get it going, but I am probably wrong here and don't have the toolchain setup to re-compile... :p

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Felix. Rain,rain,rain thats the weather here... I just uploaded a version including a hexfile. There are several changes so pls look in config.c. Daddywalross did an i2c sonar based on srf04 on his own with the idea in mind to link several together - his protocol is different from what you need. Anyway by looking at the srf10 datasheet it's not very complicated to produce a driver for that but currently i am not up to this - maybe if the rain keeps me grounded. Connecting some sh** to the i2c port is always dangerous because errors (connection, device etc) can disturb the sensorreading or ground your copter. BTW the cli command "status" has an build in I2C scanner for those die hard DIY guys who want to connect stuff to the I2C bus and check the connection.
Greetings
Rob

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Thanks though Rob, I'll upload the new build and try and give it a test out this evening or tomorrow lunchtime. Weather here has been windy but otherwise okay.
FWIW, there is SRF02/08/10 code in the main 2.2 repo... might be a good reference point?... sorry, I've got next to no programing experience, but reads kind of similar to me though... Maybe I'll try and set up a toolchain to do my own compiles and start hacking away.

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Felix: Thank you very much for your info that mwii already has the driver - didn't know that. I will see to implement it soon. Btw please check the I2C levels of that sonar. I didn't find information on that subject but i will bet that it does 5V - and that will probably destroy the stm. Maybe a LLC comes in handy http://fpv-treff.de/download/file.php?id=4722&t=1

Cheers
Rob

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Short Warning!
While the rain stopped i took the chance for a testflight. DAMN! I was able to produce an unwanted "alarmstart", that really surprised me but i supressed my adrenaline rush and landed it safely :). Hope this bug is fixed with the new hexfile - anyway i couldn't reproduce it - though i tried hard. Look at the downloadpage.
So long
Rob

crashfpv
Posts: 18
Joined: Mon May 13, 2013 1:44 pm

Re: Harakiri aka multiwii port to stm32

Post by crashfpv »

tried the new firmware, apart from sonar stuff, i seen that you can arm with altitude hold enabled, however i couldn't get it to arm. any help on this? everything else seems to work ok, i didnt get any unwanted weird behaviours. keep up the good work rob.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

PS, Maybe not repost their SCAM URL ;)

I gave the latest Harakiri a try out yesterday in strong winds.. at first I had some trouble with stability, and then I recalled I had the MMA Accelerometer enabled (I thought to try it out) and it was really horrible, not sure what that is... anyway, the MPU60x0 handled MUCH better. Initial test with Position Hold was great.. even in winds.. then I switched on RTL and off she went, but because the wind direction was the same direction as home position... it came in a bit hot ;) ... some manual intervention was required due to the high winds.. I'll give it another test on Sunday. Thumbs up so far!

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I haven't been able to get a nice position hold in any sort of wind, and I've tried a bunch of PID changes. Thinking now of operating on my FF board and upgrading to the same sensors you guys are getting good results on. This is one way to do it I think, but I'll need to disable or remove the old ACC/BARO/MAG chips...
http://www.ebay.com.au/itm/10DOF-Module ... 1099849066

Can anyone see why it wouldn't work if connected properly ?
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I've been tinkering with a friends MTK 3329 module on his Qaud board, and then I got out my own MTK 3329 and had another play with Harakiri10Beta4 to see if I could get Binary mode working. What I tried to do on both MTK modules was update to the firmware that support Binary mode, and then get one to work on my board. I succeeded in updating both GPS module to v1.9 (AXN1.51-2776) firmware, but failed to get Harakiri to work with either...
I confirmed with MTK miniGPS.exe that the GPS is responding at 38400 Baud, and does now show firmware version 2776 in the 'about GPS' window. Changed my flight board in the CLI to GPS_type = 3 and GPS_baud = 38400. Confirmed the changes after reboot. BaseFlightGUI2 no longer reports a GPS present and there is no Sat or Fix or PKT indicator activity.

Question - Is anyone using a MTK3329 with v1.9 (AXN1.51-2776) firmware successfully on Harakiri ?

I have a feeling I might be the only one trying...

Thanks guys,
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@mr.sneezy: The last time i checked mtk3329 with 1.9 worked on the bench, reporting Lat/Lon etc ... but i will check that again..

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Harakiri aka multiwii port to stm32

Post by felixrising »

Hi Crashpilot100,

I'm doing some tests and have a fairly repeatable issue. During position hold (not tested during RTL), if I yaw, the quad starts to circle in ever larger circles, like the heading isn't properly updated and the nav direction is wrong. I ran out of time during testing but my initial observations are that a yaw to the left produces a increasing spiral/precession (initially a few meters and rapidly growing - 10m+) in a clockwise direction (looking down) until I turn off PH and regain control. I've recalibrated the mag and it looks good observing mag behaviour in ez-gui. PH and RTL without any YAW is stable. Any ideas?

Thanks and Cheers!

PS: Source050613-0640Uhr - I was seeing the same on the previous hex revision too.. but put it down to PIDs.. but now I'm not so sure.

Update: Thinking about it, I haven't verified Mag behaviour with throttle on. That said, I've done a few RTH and PH tests before, it's only when I yaw the craft that I've observed this behaviour.. I'll retest and revert here.

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Thank you very much for your serious testing and replies! Currently i squeezed a bug in the bf/magdriver that prevents reasonable gps function. So stay tuned :)

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

@Crashpilot1000

Hey Rob,
Did you get to rechecking a MTK 3329 GPS module with 1.9 FW on it with Harakiri ?
I was keen to hear if it did work at your end, so I know for sure if I have a chance of getting it working on my board.

Thanks,
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Martin!
Sorry for late answer. I re checked MTK in 1.9 Binary and NMEA Mode both parsers are working 100% correct. But the ins stuff is done for ublox so i doubt that it will work well on mtk ... you will have to try out and maybe lower gps_ins_vel to 0.5 (just guessing here).
To use mtk3329 with 1.9 binary FW type in cli:
set gps_type = 3 (retrun)
feature gps (return)
save (return)
MTK is configured automatically then (baudrate etc)

To run your MTK in NMEA Mode type
set gps_type = 0
set gps_baudrate = 38400
feature gps
save

Repower your FC afterwards because otherwise MTK might stay in binary mode (if it was doing that before), so the nmea parser will not understand a word of that talk....
Cheers
Kraut Rob

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: Harakiri aka multiwii port to stm32

Post by Gaijin »

Hey Crashpilot,

I've been flying the Official Harakiri10b for a few months now, I like it, it fly's really nicely stock, now I've just uploaded the latest hex and I'm wondering sonar type do I set in the CLI to enable proper use of my SRF-04, I have set Feature - Sonar on.

I tried searching the fpv-treff threads but search doesn't work when it is translated, Also as I run one of the old green boards with the ADXL345 and Bosch barometer I'm wondering if I'll notice much of an improvement if upgrade to a newer white board?

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Gaijin!

Please have a look into config.c of the sourcefile (open it with a texteditor etc). There is always a more or less correct description of the parameters like this:

// SONAR

// SOME INFO ON SONAR:
// PWM56 are 5V resistant, RC78 only tolerate 3.3V(!!) so add a 1K Ohms resistor!!!
// Note: You will never see the maximum possible sonar range in a copter, so go for the half of it (or less?)
//
// Connection possibilities depending on Receivertype:
// PPSUM: RC78 possible, PWM56 possible (on max. quadcopters, see below)
// Normal RX: Just Connection on Motorchannel 5&6 (PWM56) is possible.
// The PWM56 sonar connection option is only available in setups with max motors 4, otherwise sonar is not initialized.
//
// HC-SR04:
// Operation Voltage: 5V (!! Use PWM56 or 1K resistor !!)
// Range: 2cm - 400cm
// Angle: 15 Degrees (Test out for yourself: cfg.snr_tilt = X)
//
// Maxbotics in general
// Operation Voltage: (some 2.5V)3.3V - 5V ((!! Use PWM56 or resistor with 5V !!)
// Only wire the Maxbotics for PWM output (more precise anyway), not the analog etc. modes, just wire echopin (normally pin 2)
// Range: 20cm(!) - 765cm (some >1000cm), MaxTiltAngle is not specified, depending on Model
// Tested on MB1200 XL-MaxSonar-EZ0
//
// GENERAL WARNING: DON'T SET snr_min TOO LOW, OTHERWISE THE WRONG SONARVALUE WILL BE TAKEN AS REAL MEASUREMENT!!
// I implemented some checks to prevent that user error, but still keep that in mind.
// Min/Max are checked and changed if they are too stupid for your sonar. So if you suddenly see other values, thats not an eeprom error or so.
// MAXBOTICS: SET snr_min to at least 25! I check this in sensors and change the value, if needed.
// NOTE: I limited Maxbotics to 7 meters in the code, knowing that some types will do >10m, if you have one of them 7m is still the limit for you.
// HC-SR04: SET snr_min to at least 5 ! I check this in sensors and change the value, if needed.
// DaddyWalross Sonar: I DON'T KNOW! But it uses HC-SR04 so i apply the same limits (5cm-400cm) to its output
// NOTE: Sonar is def. not a must - have. But nice to have.
cfg.snr_type = 3; // 0 = PWM56 HC-SR04, 1 = RC78 HC-SR04, 2 = I2C (DaddyWalross), 3 = MBPWM56, 4 = MBRC78
cfg.snr_min = 25; // Valid Sonar minimal range in cm (5-200) see warning above
cfg.snr_max = 200; // Valid Sonar maximal range in cm (50-700)
cfg.snr_debug = 0; // 1 Sends Sonardata (within defined range and tilt) to debug[0] and tiltvalue to debug[1], debug[0] will be -1 if out of range/tilt. debug[2] contains raw sonaralt, like before
cfg.snr_tilt = 18; // Somehow copter tiltrange in degrees (Not exactly but good enough. Value * 0.9 = realtilt) in wich Sonar is possible
cfg.snr_cf = 0.7f; // The bigger, the more Sonarinfluence, makes switch between Baro/Sonar smoother and defines baroinfluence when sonarcontact. 1.0f just takes Sonar, if contact (otherwise baro)
cfg.snr_diff = 0; // 0 disables that check. Range (0-200) Maximal allowed difference in cm between sonar readouts (100ms rate and snr_diff = 50 means max 5m/s)
cfg.snr_land = 1; // Aided Sonar - landing, by setting upper throttle limit to current throttle. - Beware of Trees!! Can be disabled for Failsafe with failsafe_ignoreSNR = 1


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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

Crashpilot1000 wrote:Hi, Martin!
Sorry for late answer. I re checked MTK in 1.9 Binary and NMEA Mode both parsers are working 100% correct. But the ins stuff is done for ublox so i doubt that it will work well on mtk ... you will have to try out and maybe lower gps_ins_vel to 0.5 (just guessing here).
To use mtk3329 with 1.9 binary FW type in cli:
set gps_type = 3 (retrun)
feature gps (return)
save (return)
MTK is configured automatically then (baudrate etc)

Kraut Rob

Hi Rob,
I should drop the MTK stuff as a lost cause, but as an old school technician I hate not knowing the answer to the problem. So predictably I did more testing tonight.

Firstly reverted back to my uBlox and tested gps_type = 1, no problem there in the GUI, all running.
Refitted the MTK with V1.9, set gps_type = 3, set, save, reboot, then a power restart. No joy.
(I noted that the GPS's LED flashes at one second rate right after system booting, but after the FC board finishes initializing the LED goes out, so the GPS responds to something from the board...)
(Note too that I check the CLI settings after each reboot to make sure they set correctly)

I did some checking with Realterm serial terminal after that, with a direct USB-TTL connection to the MTK 3329 GPS.
It seem that the GPS is only sending one string repeatedly, and sending it at 57600baud. The string is:
$PGACK,003,-1*71CrLf (the last bit being Carriage return Line feed).
I then set the CLI to gps_baud = 57600 just in case,then a set, save, reboot, power restart. Still no joy...

I Googled that string text, and it actually lead me back to you (what a small word). There was some discussion on a forum back in December about 'Vendor Protection' in relation to MTK 3329 GPS modules.

Could this be relevant to me or did I misunderstand the posts ?

Cheers,
Martin

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

Re: Harakiri aka multiwii port to stm32

Post by mr.sneezy »

I noticed that BaseFlight GUI has had some updates from Carsten. Nice description icons next to the PID's :)
Didn't have time to check everything, but noted that the communications seem much more robust now.
Also noted that the US Tool Tips didn't seem to be appearing. I had US set in the setting.ini, and did an online Help update too.

Regards,
Martin

Post Reply