3D Robotics

ArduPilot GPS lock bug fixed

Thanks to Rusty's detective work, I think we've fixed the GPS lock bug (the blue LED was turning off even when the module was showing valid data). New code is here. (Basically every instance of "if (fix_position == 0x01) ..." should have been "if (fix_position >= 0x01)..." It turns out that there are three valid fix values: 1,2 and 3. See the datasheet for more.)
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Is CoPilot II compatible with CPD4?, it's now available at http://www.fmadirect.com/products.htm?cat=75&nid=6
  • Chris: you can name the ZIP file by release date, for example ArduPilot_2009_02_22.zip. Then it's also clear how old is the code version.
  • Moderator
    Chris- Personally I'd like to see folks reference the code by number, where it's listed in the repository w/that number as part of the name and w/in the code... No questions as to which version that way.
  • 3D Robotics
    Brian: Good point. Normally we'd be using the subversion repository on Google Code, which handles all that version control stuff automatically. But many of our users are unfamiliar with Subversion, so we've been going for zip archives. I should probably start adding version numbers on that archive (ardupilot1.01.zip, etc) and just hope that newcomers aren't too confused by it.

    Alternatively, I could do what you suggest, which is just give the version number at the top of the code itself, in the first tab. Which would you prefer?
  • Moderator
    Chris- With the frequency that the code is updated for ArduPilot, is it possible to include some sort of serialized build or release number within the code. Having posters reference the code by the release would really help keep things straight.

    For example I downloaded the code first thing this am after reading you had updated the code fixing the gps lock, I did not upload to my board. I checked back about an hour later and found your post where you had inadvertantly posted incorrect version, which I had downloaded. I updated w/the "current" code and tested. Now I'm looking at the posts between you and Smquest and I don't see what your are talking about. These posts were at least 5 hours after I uploaded, my code has been in RTL mode since I downloaded it this morning.
  • 3D Robotics
    Smquest: Good catch! Now fixed. The ardupilot.zip in the repository is now in RTL mode.
  • Moderator
    Chris- Thanks, it makes more sense to me now.
  • Unless I confused the source with an earlier version when I downloaded it, it looks like this one still has the NE heading test coded in. It is obviously a simple fix, comment it out and uncomment the regular code.
  • Chris,
    survey grade GPS units (for example) may indeed contain additional fix values as shown by Michael. The EM406 manual only includes 0, 1, 2 and 3 fix types. Given that some people are trying different models and that errors can occur maybe it would be better to say >=1<4 (or even <3 as PPS is a military fix type) to exclude any rogue data from the EM406 and other modes from other GPS units. ArduPilot if misled by a fix type 8 say could get into all kinds of trouble! This link gives the GPX standard for fix type http://www.topografix.com/GPX/1/1/#type_fixType

    The cm accuarcy of RTK requires expensive and relatively cumbersome hardware and a good telemetry link so is highly unlkely to feature in an amateur UAV with any kind of budget restrictions. There is a software implementation ($10,000 though) which might work with ArduPilot and a Sirf GPS. Will look for the link if anyone is interested.
    GPX 1.1 Schema Documentation
  • 3D Robotics
    Brian: Correct: RTL launch position is established at powerup (on the ground). In the next version of the code, out in a few days, we store it in EEPROM, so even if you reboot the Arduino in the air it will remember where home is.

    Michal: I don't know what those mean either, but I'm hoping we're covered with a simple >1 ;-)
This reply was deleted.