Welcome to Multi-Rotor UK. Please login or sign up.

Saturday,April 27, 2024, 04:35:09

Login with username, password and session length

Shoutbox

Gaza07:
23 Apr 2024 08:09:45
The Domain expires for the forum in 60 days, I'm not going to renew it this time unless I see any activity  :beer2:
Gaza07:
20 Apr 2024 18:02:50
Is there anyone who would like to see this forum stay open ? :shrug:
hoverfly:
17 Apr 2024 17:15:13
 :rolleyes:
Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Members
  • Total Members: 8,195
  • Latest: lokloks
Stats
  • Total Posts: 201,427
  • Total Topics: 20,261
  • Online today: 24
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 18
Total: 18

Theme Changer





3d - Printworx

Loiter mode(and altitude hold) stuttering, how to tune? (Flightvideo)

Started by TheEdge, Monday,May 05, 2014, 21:29:32

Previous topic - Next topic

TheEdge

Hello

I am fairly new to quadcopters and need some help with tuning the quadcopter for stable and easy handling.
Have linked to some flightfootage, and hope you can have a look and maybe suggest some changes to do to my settings from what is shown in the video.
The day I was flying, there was no winds, so the quad should have been pretty stable.

Flightfootage: https://www.youtube.com/watch?v=0UjOJ0eIvMk&feature=youtu.be (you can hear the motors stuttering)

My PID settings.https://dl.dropboxusercontent.com/u/98131243/quadcopter/PIDsettings.jpg



I have this Crius Quadcopter:  http://www.ebay.com/itm/380616101499?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

1x Crius AIO PRO 2 FC
1x Crius GPS module
1x 450mm frame
4x Skywalker 20A 2A-BEC Brushless ESC (now flashed with BlHeli 10.4 firmware)
4x SUNNYSKY X2212-980KV
2x 1047 propeller pair
1x HENGE 5v 6A UBEC
Turnigy 9x with stock tx/rx

I flashed the esc';s with BlHeli 10.4 firmware and the flightcontroller with MegaPirateNG 3.0.1 R4.
I am now trying to tune the quadcopter by watching youtube and reading forums.
Have tried a bit with tuning various parameters by inflight tuning using channel 6.
I would like the quadcopter to be stable and easy to fly, and good for aerial photography rather than acrobatics.

In stabelize mode I was able to tune out some of the wobble in fast descent by lowering rate roll P and rate pitch P from 0,1500 to 0,0800 but still needs some tuning.
The biggest problem is Loiter mode( and also Alt. Hold) where the motors are stuttering. I have not been able to tune out this stuttering.
From what you can see of the flightfootage, what changes do you suggest for me to do to my settings to get ridd of the stuttering and make for a more stable flight in Loiter?

Since the stuttering is only present in Loiter and alt.hold mode, and not in stabelize, I am pretty sure it has to do with the flightmode settings and not any bad connections to the motors.
Never mind the jello in the video as my jello killer camera mount is sort of broken.
I have tried my best to balance the propellers and motors, so there should not be too much vibrations, and I had pretty much jellofree video before my cameramount broke..


Hands0n

Have you covered the Barometer chip with a piece of light blocking open cell foam (typically a dark grey).  Baros do not like light or propwash and need to be shielded from both. 

Next I';d say you may want to tweak Loiter P upwards - if you can put it on a rotary pot on your TX so you can trim it in flight it will be quicker than landing, changing, testing.  Once you find the right stability keep the pot where it is, land, pop it on Mission Planner and read the value - then save that value and disable the pot (in MP) so it doesn';t corrupt your setting.

I';d look at those two first.
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

TheEdge

Quote from: Hands0n on Tuesday,May 06, 2014, 07:56:33
Have you covered the Barometer chip with a piece of light blocking open cell foam (typically a dark grey).  Baros do not like light or propwash and need to be shielded from both. 

Next I';d say you may want to tweak Loiter P upwards - if you can put it on a rotary pot on your TX so you can trim it in flight it will be quicker than landing, changing, testing.  Once you find the right stability keep the pot where it is, land, pop it on Mission Planner and read the value - then save that value and disable the pot (in MP) so it doesn';t corrupt your setting.

I';d look at those two first.

Thank you for the reply.

Yes, the barometer is covered. The quad did not have this stuttering before I flashed the firmware, so I don';t think it is hardware related. Unfortunatly I did not make a screenshot of the settings before flashing, I should have done so.
I have tried a bit with tuning with the pot on channel 6 but I am not sure what to choose from the dropdown list for channel6 to tune the correct values.
What to choose from the channel6 dropdownlist  to tune Loiter P?
Loiter uses alt.hold mode, and alt.mode is also stuttering, do I need to tune the alt.hold to solve the problem with Loiter?

I have not bought this quadcopter from Peter King, but would it be a good idea to upload his Crius V3.0.1 configfile for this controller to my quad? In case, would I also have to load the internal compass hex file Crius V301r3 QUAD internal, would that one be ok even though I have 3.0.1 R4?

BadgerG

Hey Edge, I have the same problem. Haven';t found a solution yet. I did make a copy of my settings and it didn';t stutter before, but it does now with the exact same setting as before so it has to be a difference in the firmware. Hopefully someone that has solved this issue will post.

kilby

If you have updated firmware then it';s entirely possible that the settings from a previous version will have issued as behaviour often changes between versions.

Check the release notes
Not much kit, but what I have I like
Armattan Tilt 2, Morphite 180, Quark 150, Decapitated NanoQX
Taranis+

TheEdge

Hello again.

I have for the last couple of weeks been strugling with this quadcopter. At one time I got so fed up with it that I just kicked the stupid thing into a bush and walked
away, leaving it halfway running in the bush there. I have been ready to give it up several times, but then again I don';t really want to give it up. I just don';t know
anymore, the problems does not make any sense since they are sort of different almost every time..

Before I started messing with the stuttering problem, I saw Peter Kings videos of Loiter fix and moved the flightcontroller onto the topdeck of the frame to avoid interference from the powerdistributionboard in the bottom of the frame. Stabelize, Loiter and RLT was still working fine after this with the default settings in 4.0.1.R4(except for the stuttering). Physically I have not changed anything after this, just messed with settings and versions of firmware.
Also in regards to Peter King';s videos on youtube, I have used the magnetic declenation site to enter the declenation for the compass calibration, and I always leave the
quad standing for 3 minutes after I plug in the battery before I start flying. 

Since I did not get any advice on how to get ridd of the stuttering I had to try on my own, so I have tried flashing the controller many times with the official 4.0.1 R4
and 4.0.1 R3 from Peter King and have also loaded PK';s parameters file for the R3. Started adjusting the PID settings, and some things might start to get a little better
untill I suddenly overdid something so that it would wobble itself to death. Even if I tried undoing the change I last made, it was still screwed up and I would have to reflash the firmware to start over againt with default settings..
For every change I do, I fix something and screw up something else that was previously working. With Peter Kings 4.0.1 R3 it flew very nice in Loiter, and RTL was
working just perfectly, but in Stabelize it had started to always fly foreward even with full backwards trim. Recalibrated everything over again many times(on a
perfectly level surface), and reflashed the stupid thing many times, always drifting foreward. I also noticed that one of the front propellers did not fire up at the
same time as the rest of the propellers, so I figured it was the esc calibration and reran this. But still the same problem. Then I tried with recalibrating the one esc
alone, and then that problem was fixed. For some reason that esc had not been calibrated together with the rest. So now it does not drift any longer and Stabelize is now
pretty stable, and Alt Hold is working very nicely.

But now I have this stupid problem with Loiter and RTL. If I from a steady hoover in stabelize switch to Loiter, it will sort of hoover for a second or two, then it
makes a voilent movement in one direction and stabelizes again for a few seconds, and this repeats several times(seamingly random direction).. Finally it starts to fly away so that I have to switch back to stabelize to keep it from crashing into something or fly away. Also RTL behaves the same way.

Before I started messing with settings to try to get ridd of the stuttering motors, the Loiter and RTL was working fine with default settings on 4.0.1 R4. Why does it not work now when I reflash the same firmware and run the same default settings that was working before(since I have not changed anything physically) ??
Every time I have flashed the flightcontroller, I have also erased the eeprom and have also tried with resetting to factory.

I got a reply on youtube to my flightvideo, suggesting to change the INS_MPU6K_FILTER to 42 and I think this has helped a bit with my stuttering but I have not really
been able to verify this as Loiter now is totally useless..

I am starting to think that my flightcontroller is damaged or something, but then again it flies so nicely in stabelize and with alt hold..
The GPS could be screwed, but at least when I connect to mission planner it shows me the correct position on the map right away so  it seems ok.

I am lost here and have ordered an APM 2.6 quad to see if that works any better and just to maybe get some actual flighttime in stead of just all the tinkering..

Here is my current settings if that could give any clue..
https://dl.dropboxusercontent.com/u/98131243/quadcopter/current.param
https://dl.dropboxusercontent.com/u/98131243/quadcopter/Current_PID.jpg


Hands0n

Hello TheEdge - I really cannot help you with AIOP and MegapirateNG other than to say that people on this forum have got on very well with MegaPirateNG Add Ons which is at an older version than you are running but seems very stable.  The later versions of MPNG seem to have pushed the hardware to or beyond its capabilities.

By going to APM 2.6 I do think that you will have a totally different experience, and a much better one at that. You already know a whole lot about Arducopter software and Mission Planner so you';re well ahead of the game.   And you';ll be running the Arducopter code on the hardware it was originally designed for. So that has got to be a big plus also.

In respect to finding out what is actually going on in your MPNG set up - do you have any flight logs that you can post up for someone to have a look at?  The configuration parameters may offer a clue, but the real information is contained in the flight logs - but I don';t know if MPNG on AIOP can do this.
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

TheEdge

Quote from: Hands0n on Wednesday,June 11, 2014, 21:29:01
Hello TheEdge - I really cannot help you with AIOP and MegapirateNG other than to say that people on this forum have got on very well with MegaPirateNG Add Ons which is at an older version than you are running but seems very stable.  The later versions of MPNG seem to have pushed the hardware to or beyond its capabilities.

By going to APM 2.6 I do think that you will have a totally different experience, and a much better one at that. You already know a whole lot about Arducopter software and Mission Planner so you';re well ahead of the game.   And you';ll be running the Arducopter code on the hardware it was originally designed for. So that has got to be a big plus also.

In respect to finding out what is actually going on in your MPNG set up - do you have any flight logs that you can post up for someone to have a look at?  The configuration parameters may offer a clue, but the real information is contained in the flight logs - but I don';t know if MPNG on AIOP can do this.

Hello

Ok, I sure hope you are right about the APM as I am ready for some flying and not so much tinkering.
Yes, I should maybe have tried with going back to an older version of MegaPirateNG, but I was not very impressed with the alt.hold and loiter in the old version my flightcontroller came with, and since I do not fully understand the PID';s and the tuning, I figured it would be easier for me just to upgrade to a newer version of the firmware.

I have been putting off reflashing the firmware untill now, cause I don';t want to use a whole collection of different software and edit textfiles  and a bunch of settings I do not fully understand, and compile code, and so on just to update the firmware to the flightcontroller.
It should be as easy as running a simple updatesoftware that loads a single firmwarefile onto the flightcontroller.
Then I found this flashtool that does just that, very easily loads the latest firmware onto the flightcontroller in one single operation.

In my desperation I also did the textediting and compilation and loaded multiwii onto my controller not really knowing what I was doing, if I would brick the controller with some wrong settings or parameters or what.. I was able to arm the motors and controll them with the throttle, but I never got around to set it up or try flying it with multiwii.

I can try an older version of megapirate if someone has a precompiled hex of the recommended addon firmware so that I can just load it from mission planner.

My AIO has the onboard memory to save flightlogs, and logging is enabled. I have looked on some flightlogs, but I have not found an intuitive way of reading the logs so I have not really studied them.
There are several different logtypes, what sort of log should I upload?

Edit: I just downloaded all the log files from the flightcontroller. Sorry about the big .zip file, but it is getting late and I have to go to bed so I did not have time to filter new from older logs and just zipped the whole folder. Here it is in case it could be of any help for myself or others with the same problem.https://dl.dropboxusercontent.com/u/98131243/quadcopter/Log.zip

I guess most of the flightlogs show pretty reckless flying, it is not really my style but most flights lately have been performed with an increasing level of aggrevation due to all the problems..

xenotron

Hi The Edge

I have a Quad with KK2.1.5 flight controller, Afro ESC';2 and the same motors as you.

And guess what? My motors stutter just like yours, when i activate the "stabilization" mode in the KK2.1.5.

At 1st, i thought it was the EScC';s so i flashed them with the newest version of SimonK firmware. Still nothing...........

So.... i guess its the bloody motors....
Notice that we have the same problem, tottaly different components except the motors.

What do u think about this?

guest325

Just a thought, I';ve heard that BLheli firmware can behave strangely if not set up correctly and that there are several parameters that have to be correct. I';ve not heard of anyone using those motors with SimonK of Afro esc';s having those problems,  could it possibly be an esc problem?
The problems you both are experiencing could be esc related rather than the FC.

TheEdge

Hello

This stuttering did not appear until after I updated to MegapirateNG 3.0.1 R4, so I think it is firmware related.
I have tried many times now to flash with 2.9.1 addons, but I am for some reason not able to get the gps working with any of the older firmwares now, so I have not been able to really test this. The stuttering only appears in Loiter and alt-hold mode, not in stabelize so I don';t think that has to do with the motors.
It is however strange that xenotron get the same stuttering with a totally different hardware except for the motors if it really was firmware related..

BadgerG

Edge, I went back to MP 2.91 R300 and the stuttering is gone and Alt hold works great again. In Mission Planner the baro is jittering a lot less than it was with MP 3.01 R4. To me it seems that 3.01 is less stable with how it work with the baro, considering I was seeing the values change, sometimes up to .15 difference between values. With MP 2.91 R300 the difference is more like .03 difference. Major improvment.

Paulham

Quote from: BadgerG on Wednesday,June 18, 2014, 17:21:53
Edge, I went back to MP 2.91 R300 and the stuttering is gone and Alt hold works great again. In Mission Planner the baro is jittering a lot less than it was with MP 3.01 R4. To me it seems that 3.01 is less stable with how it work with the baro, considering I was seeing the values change, sometimes up to .15 difference between values. With MP 2.91 R300 the difference is more like .03 difference. Major improvment.
I just fixed my altitude hold problem on the newest firmware.
I had mounted my APM using double sides foam tape but alt hold was all over the place. I just changed it to a dampening ball mount and alt hold is now rock solid.

I believe this is because the newer firmware (3onwards) is much more sensitive to vibration and magnetic interference

Sent from my SM-G900F using Tapatalk


BadgerG

Quote from: Paulham on Wednesday,June 18, 2014, 18:21:58
I just fixed my altitude hold problem on the newest firmware.
I had mounted my APM using double sides foam tape but alt hold was all over the place. I just changed it to a dampening ball mount and alt hold is now rock solid.

I believe this is because the newer firmware (3onwards) is much more sensitive to vibration and magnetic interference

Sent from my SM-G900F using Tapatalk

I added a AVdome vibration mount as well and it did help, but still had some issues with Alt hold. Thats why I went back to 2.91 where it held altitude very well.

TheEdge

I have the crius board mounted on vibrationdampening.  I also tried with 2.9.1 R300 hex file from Peter King, but I am not able to make the gps work at all with that one. So I tried with downloading the whole 2.9.1 package and editing the textfile and compilating the thing, but it failed on some settings, so I just gave up the stupid thing again for now.
I am just not so into editing configfiles with settings I do not fully understand and compiling, I would really like to have a precompiled .hex file to upload to the controller.
Is there an archive somewhere with precompiled .hex files for various setups to download?

Hands0n

Vibration is the killer.  Since 3.0 of Arducopter the code makes use of the Accelerometers in stabilisation and Altitude Hold.  Vibration dampening works up to a point, but much more work is needed to eliminate vibration at its source.  Balance props, prop hubs, motors.  Use IMU logging to see how low you can get the vibration down to.

There is a splendid wiki page on what to do and look out for: http://copter.ardupilot.com/wiki/ac_measuringvibration/

--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

TheEdge

Yes, I have balanced the props and the motors. The strange thing is that everything was working quite well with 3.0.1 R4 except for the stuttering motors until I started screwing around with tuning in my futile attempts of getting ridd of the stuttering.. If it was really the vibrations or my way of mounting it that is the cause of the problem, it should not have worked before I started changing settings either.. Nothing makes sense anymore with this one..
I just got of ebay a kit with frame,esc';s, motors, propellers and even both a crius board and an apm 2.6 with gps and external compass, so I will screw around with this pile of junk during the weekend and see if I can find a combination of junk that actually works. I will make sure the flightcontroller is properly vibrationdampended.

I guess the apm is not a genuine 3dr for the price of the kit, but some of the clones should also work I guess..??

Hands0n

Quote from: TheEdge on Thursday,June 19, 2014, 08:33:53

I guess the apm is not a genuine 3dr for the price of the kit, but some of the clones should also work I guess..??

The APM hardware is open sourced so there is no legal impediment to anyone manufacturing a an APM board.  Quality can vary between manufacturers but generally they all seem to work really well. 

Some are more faithful to the 3DR design intention than others.  For example, RCTimer APM boards do not have PPEncoder bootloaders so you cannot at all easily update the PPMEncoder firmware as described in the Ardupcopter wiki. I found that out the hard way, so avoid RCTimer APMs these days.   Other cheap as chips APM boards do everything the 3DR native boards do So thats okay ~~

If you get a duff one it is not going to be anything other than bad luck.  That said, of the several I';ve bought on eBay over the past 12 months I';ve had 100% success so far. 
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

Oakie

Only when one looses sight of your toy does FPV become fun and against legislation already in place.

TheEdge

Quote from: Hands0n on Thursday,June 19, 2014, 08:59:12
The APM hardware is open sourced so there is no legal impediment to anyone manufacturing a an APM board.  Quality can vary between manufacturers but generally they all seem to work really well. 

Some are more faithful to the 3DR design intention than others.  For example, RCTimer APM boards do not have PPEncoder bootloaders so you cannot at all easily update the PPMEncoder firmware as described in the Ardupcopter wiki. I found that out the hard way, so avoid RCTimer APMs these days.   Other cheap as chips APM boards do everything the 3DR native boards do So thats okay ~~

If you get a duff one it is not going to be anything other than bad luck.  That said, of the several I';ve bought on eBay over the past 12 months I';ve had 100% success so far.

Yes, I am crossing my fingers I got a good one. At least the propellers that came with the kit is perfectly balanced and sturdy gemfan props, I expected some cheap crap since no brand was specified.

TheEdge

Quote from: Oakie on Thursday,June 19, 2014, 10:19:12
Hi, does the aio use i2c from gps to fc?

The GPS is connected to serialport 1-3 on my aiop if that answers the question.

Hands0n

Quote from: TheEdge on Thursday,June 19, 2014, 10:20:11
Yes, I am crossing my fingers I got a good one. At least the propellers that came with the kit is perfectly balanced and sturdy gemfan props, I expected some cheap crap since no brand was specified.

I do think that once you go APM you won';t look back :smiley:  The hardware is so affordable now.  And with the miniAPM even more so!
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

BadgerG

Quote from: Hands0n on Thursday,June 19, 2014, 13:20:51
I do think that once you go APM you won';t look back :smiley:  The hardware is so affordable now.  And with the miniAPM even more so!

My next build will be either an APM board or maybe a Pixhawk. No more Crius boards. I have been considering the new Eagle Tree Vector, but I don';t know much about it, and it is expensive.

TheEdge

This is a bit off topic, but I got my apm and have connected everything. Got this ublox 6m gps with compass http://witespyquad.gostorego.com/ublox-6m-gps-w-mounting-backplane.html

I am not sure of what orientation I should mount the gps/compass module. When I turn the quad in circle the rotation is shown backwards in mission planner unless I hold the gps/compass module upside down(at least it seems upside down  in my logic).. I have googled and read the instructions and set roll to 180 like the instructions says, but it still rotates the opposite direction. What am I doing wrong?

HowDoIfly

Ifly4 no more, Hubsan X4, R550v2, X650F-V4

TheEdge

Quote from: HowDoIfly on Saturday,June 21, 2014, 01:38:37
Is yours mounted like the one on this hex?

http://www.rcgroups.com/forums/showpost.php?p=28373211&postcount=798

Have not really mounted it yet since I have not been able to figure out the correct orientation, but yes I have tested with that orientation. circular movement shows backwards in mission planner. I have tried with choosing apm with external compass for calibration, have also tried manual with no rotation, rotation roll 180, rot.roll 180 and yaw 90  and several things. Still backwards rotation unless I hold it upside down

HowDoIfly

I don';t want to assume what you mean by backwards but the heading in MP will rotate the opposite direction your compass moves.
Ifly4 no more, Hubsan X4, R550v2, X650F-V4

TheEdge

Quote from: HowDoIfly on Saturday,June 21, 2014, 08:22:06
I don';t want to assume what you mean by backwards but the heading in MP will rotate the opposite direction your compass moves.

When I rotate the quadcopter clockwise around the y-axis, the simulated quadcopter in the mapview of mission planner rotates counterclockwise around the y-axis. Is that normal???
My criusboard with the internal compass never did that, rotation showed up the same direction as the actual quad rotated.

HowDoIfly

Quote from: TheEdge on Saturday,June 21, 2014, 08:54:41
When I rotate the quadcopter clockwise around the y-axis, the simulated quadcopter in the mapview of mission planner rotates counterclockwise around the y-axis. Is that normal???
My criusboard with the internal compass never did that, rotation showed up the same direction as the actual quad rotated.

I was referring to the compass heading in the HUD....sometimes it';s the simple things that trip us up.
Ifly4 no more, Hubsan X4, R550v2, X650F-V4

TheEdge

I guess I should have continued this subject in a new post as the problem now is that Loiter and RTL is screwed up also on this APM, but oh well..
Stabelize is very stable, flying nicely. Also Alt Hold works fine. When I change to Loiter however, it starts to fly off. Same in RTL, but usually not in  the direction of launch location.
When I connect the battery I always wait for 3 minutes before I take off.

I must be doing something wrong since I have exactly the same problem on a crius aiop with internal compass and now this apm 2.6 with external compass..

Peter King says in a video that Auto declenation does not work and suggest that one should get the data from the magnetic declenation website and insert the numbers in mission planner. I have tried both with and without inserting this data, and calibrating the compass over again.

I have mounted the gps/compass module with what I belive is the front, pointing forward.  here is a picture of the scrapheap.( I know, it';s a mess, but I don';t bother tidying it up if it is going to the scrapyard anyway.)White legs in the picture is front of the quad. Can you see any obvious problems with the way I have assembled?
When I look in flight data in missionplanner, I am not able to make the little quad on the map rotate in the same direction as I rotate the actual quad.
If I rotate the quad clockwise around the y-axis, the little quad in the map rotates counterclockwise. And the heading also shows up wrong compared to actual heading..
This was always rotating in the correct direction with the old criusboard with onboard compass, and also heading was correct.

The APM came with 3.1.5 already installed. I have not changed any of the default settings except for choosing different flightmodes and activating failsafe in case of loss of signal..
I have mounted the gps/compass with orientation according to this picture

Any suggestions?