1.7 and NMEA, bit of an odd one!

OK guys,


here we go....


Got the IMU set up, worked through a problem with the AP ignoring the IMU data stream...


As i destroyed a ublox some months ago, thought that i would run up the AP/IMU combination with the locosys 200031 in NMEA.


so, after getting everything speaking the same language and at teh same speed...waited for the locosys to lock...it deos....little red led starts flashing. IMU agrees....blue light locks...and im seeing data in the stream reflecting GPS, long, lat etc...


so in my testing with another problem, it was on for about an hour...in that time, i noticed that after 2-3 mins, the blue was locked on IMU, but the AP kept dropping out....


hooked up to the AP...i can clearly see the GPS data working fine, every 5th luine or there abouts....after 2-3 mins,,,,it drops...still gettign IMU data, but no gps...


It comes in fits and starts AP blue starts flashing, then goes out or comes on depending on how it feels as the GPS data comes back, almost like teh GPS data is getting out of sync with the IMU, this pattern continues conistently...Data in...peters out....stays out...peters back in....


so as the blue stays locked in IMU and teh data coming out of the IMU is spuradic that leads me to believe that its the parsing.


The IMU never loses lock, and the data going into the IMU would confirm that, what a strange thing..


I know that NMEA is not a priority, but would be good to sort this out, see why...i dont dare fly as is, everything else is playing ball..




any thoughts?





You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Hi Mike, Chris and Doug.

    I know that this thread is now pretty much closed considering HappyKillmore's work on the NMEA, but as a discussion it's super relevant to me because I have exactly the same hardware set-up as Dr Mike, including the same GPS. (Locosys 200031). The only difference here is that I'm an absolute total newb with ardupilot and Mike has a raft of experience with flying previous versions.

    As I mentioned, I have exactly the same kit, IMU v2, Shield V2, LS200031, and AP, but I've never flown it yet. I'm currently trying to work out how I'm going to fit it into my airframe (a Kyosho Cessna180ep with ailerons). I also have to setup a simulation environmet, perhaps even with hardware in the loop. I'm also reading through the code to get familiar.with it (fortunately I am quite comfortable with programming in processing and with Arduinos).

    With this in mind, I'd like to offer my services to help test or double check anything with mike's setup as I can duplicate it exactly (on the ground). I also have a couple of questions related to things mentioned in this thread.

    Chris, you mentioned that your supplier of Locosys gps units was working on implementing a super efficient binary protocol. Do you know if this will be in the form of a firmware that can be flashed to existing units, or just a new revision of the whole package? I ask because when i bought my LS200031, I was going to to get the 10hz model, but the retailer advised me that although it was hardware identical to the 5hz model, the 10hz firmware was a bit flakey and unsupported. This always led me to believe that these GPS units were firmware upgradable, possible at the consumer end.

    Mike, you suggested you had a large number of uBlox coming in (now arrived) with the intention of selling them in the UK. Can you send me details of your store? I only know of one ardupilot stockist in the UK and some competion could only be a good thing :)

  • OK Today....More testing...

    Given the fact that i cannot move any further forward with the GPS problem in NMEA...born out of frustration i thought i would dig out the crashed ublox... and do some side by side comparisons with ubx and NMEA and the data..

    The old ublox was in a bit of a state....

    Repaired the broken components and did a bit of maths on how long a whip aerial would be for GPS rx speed.....came up with 63mm long, in the understanding that i was convinced that there was no way i would repair SMD without a lens...had a go anyway...

    Fired up Ucentre..hooked it up and waited..GPS jumping around the globe but no fix...re-did the maths..(i was wrong it should have been 138mm, soldered it on) started again...

    (you guys would have been proud! a super bodge! took a pic but left the cam at work..will post it tomorrow, it looks so silly :~))

    Now the ublox hasnt been used since last year, and figured that a lock would take at least 15 mins if it was going to work at all...with the new aerial, it locked in 2 mins...So with this new aerial heatshrunk to a lolly pop stick hotglued to the GPS, waited for data aquasition and the accuracy, down to 7.5m so pretty happy...got 3d lock...so figured would try it with the IMU.

    Re-set the IMU file for ublox, turned the performance monitoring back on...and away we went...

    IMU blue, AP blue solid lock..never dropped

    With ublox GPS data, its shown every other line of data where NMEA is every 5th or 6th.

    Set everything back to NMEA and locosys..tried it back to every 5th until it drops...

    Now having a long think about this (in the warm smugness that my crashed muddy,bent ublox was now playing ball) i am wondering if this problem existed long before IMU parsing.

    Thinking about it logically (please correct me here) if in 2.4 AP has lock(which it should as teh GPS data in always coming IN) but with the locosys, it wandered, not lost but not direct. Bearing in mind that in real terms we really only used em406 in sirf, or ublox in ubx, how much testing was really done in NMEA, has this been a problem from early on? do we have any data streams from NMEA in early tests at 5 or even 4 hz?

    Because if its hooked up and locked, for 2 mins before dropout anyone testing the system would by now have turned it back off convinced that as we have lock, no real need to continue as the mission has been completed..NMEA works and is being parsed to GCS and AP

    I am only thinking out loud here, maybe this might ring a bell or 2 with the original code authers...and its possible that maybe this has been here the whole time, un-noticed.

    My conern here is that the Mediatec 10hz is beeing touted as teh ubx upgrade, but its in NMEA and its never going to work in the present format....( i almost bought a couple!)

    Anywa- Moving on....re-set everything with my lolly pop stick ublox nailed into the aircraft, fired it up..locked again in less than a minute..so were in business...

    went out to the field....set to FBW and auto, set off, FBW is working, almost no left movement for stearing on FBW, same with elevator, but throttle normal,.

    As it wasnt agiain trying to kill itself, thought i would switch to Auto...VERY abrupt on the turns, very violent manouvers, but this is only down to gains, and have calmed it done somewhat now...but it flew and well...

    An oddity i found in swapping back and forth GPS units..was that in my case it was easier to mount the IMU in one way with Locosys, and the other way around in ublox, the wierd demostration was that the elevator compensator in pitch for roll, was reversed with the board the other orientation (180deg round), even making the comp setting in neg numbers, didnt sort it...it not a problem as reversing the siting of the board is not a problem, but didnt see this until it tried to roll inverted!......so maybe there is something small there?

    I did for the record set all the roll/pitch from -1 to 1 so they do go the right way....just a little odd, but a simple fix, just wondering why the code hasnt comped for it..

    Throttle...worked fine with ublox, and mad with NMEA, so i think that for certian, its the GPS data for GSP thats confusing the issue...

    Bar short of gains set right....it flies very well, on Stab & FBW, i have almost no control over the aircraft from the sticks....

    TO be fair i have no idea what to expect, i think i should have control of some sort..

    EIther way ot flew 4wp's and lolloped back to me.....so a 99% success with ublox...

    I have attached my IMU file as doug has requested....would be good to get your thoughts and some enlightenment at to what the behaviours should be in FBW ans stab....

    Keep fighting the good fight!

    Many thanks.






  • Ok Guys,

    Chris, went back to basics as you suggested, removed the shield, set to airstart...

    all fired up, ran the system for about 4 hours....on the ground(well workshop anyway)

    All seamed to function as specified.

    GPS keeps dropping out as documented still...but not the end of the world...

    Sp programmed AP to Stabilised and Auto

    Popped 4 waypoints in..(if it flew would try it see what happens..)

    Anyway....after figuring that staring at it any longer wouldnt solve anything. so with a 'Devil may care' attitude went out to test it..

    Stabilize function....VERY GOOD...so good in fact when set, the aircraft sat stright and level..in fact it was so good that when i tried to stear itwith ailerons, it refused adn went stright and level...when i applied rudder it fought the rudder and continued on the ame course...

    well...i was convinced that it wasnt going to try a death spiral on me so hit Auto....

    it turned quite sharply onto the WP i set...off it went...next WP..turned....

    Then i think the GPS must have dropped again (didnt hook up the xbees and GCS for this test) as it was confused, flew straight and level, but didnt know where to go....switched back to man..brought it back..back to Auto...it must have found GPS again..and off it went...managed 3 of the 4 WP before heading off towards the coast at great speed..

    so i would say that this is 80% successfull.....

    The throttle wont pull back at all....but i guess this is a fettling issue, probably the fastest we have traversed WP`s with AP....:)

    So we need to find out what is happening with the GPS system....also as described its poss not just NMEA as Yves was having the same issue with ublox....anyone have any thoughts? is there a common part of the code that processes data?

    Play some more on the throttle system

    For the record arduIMU blows the Thermos away in accuracy and smoothness of flight...only seen this kind of control on VERY expensive Autopilots off the shelf..(this is also probably due to the excellent code, well done)


  • oh forgot to mention.....the gps is at 5hz

    Also the locosys is an odd bit of kit to program (IMHO) deosnt always obey its commands..
This reply was deleted.