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.
  • 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 ;-)
  • Actually I read in some GPS document about even more "fix" values:

    0 = invalid; 1 = GPS fix (SPS); 2 = DGPS fix; 3 = PPS fix; 4 = Real Time Kinematic; 5 = Float RTK; 6 = estimated (dead reckoning) (2.3 feature); 7 = Manual input mode; 8 = Simulation mode

    though I don't know what they all mean
This reply was deleted.