Hi Jordi/Chris,

I have a question about the "remove before fly" plug in the ardupilot code. I only see this briefly mentioned in the manual, and only from the perspective of where to solder and what the plug looks like. I haven't found any explanation of what this is for or how it works, and it's not immediately obvious (to me) from reading the code what the purpose and real world usage of this feature should be.

Is this explained somewhere? I tried to do a search before posting, but didn't turn up much of anything besides the brief reference in the assembly manual.

Thanks!

Curt.

Views: 8

Reply to This

Replies to This Discussion

It just triggers a field setup process, mostly recording the home GPS in EEPROM. See the System tab in the code for details.
The code that references these pins is inside init_ardupilot() so this only has an affect when the unit is initially powered up, right?

Pin 6 is set to HIGH, and the marked as an input pin.

Pin 7 is set to LOW, and then marked as an output pin,

So then if Pin 6 reads LOW, that means the plug is installed, otherwise the plug is not.... Ok, I think I have the general idea.

Question: what is the difference between init_GPS() used when the plug is inserted and fast_init_GPS() which is used when the plug is removed?

Thanks,

Curt.
I think the first one programs the GPS into binary mode (for EM406 and uBlog); second doesn't have to.
fast_init_GPS() is just getting the GPS to a fix with the current configuration and the current stored almanac file:
Excerpt from About.com:GPS:
"If you've ever wondered why your GPS receiver sometimes takes longer to become ready to navigate after it's turned on, it is because it must acquire some basic information in addition to capturing GPS satellite signals.
You may encounter a slow start if your GPS has been unused for days or weeks, or has been transported a significant distance while turned off. In these cases, the GPS must update its almanac and ephemeris data and store it in memory.
The GPS almanac is a set of data that every GPS satellite transmits, and it includes information about the state (health) of the entire GPS satellite constellation, and coarse data on every satellite's orbit. When a GPS receiver has current almanac data in memory, it can acquire satellite signals and determine initial position more quickly."
When the jumper is ON, the GPS is re-programmed by ArduPilot, so the almanac/ephemeris data has to be "downloaded" by the GPS chip before it can get a fix. This take longer and is not necessary if it has a configuration backup, ie if the GPS board has a backup battery. The only problem is that if you want just to store a new Home location in ArduPilot's Eeprom, you will use the jumper (ON) but the GPS will be reprogrammed and fix acquisition waiting is then quite long.
I didn't do it yet, but I think I will change ArduPilot code to have the jumper just to store the new Home in Eeprom, but not to reprogram my GPS, which is working ok without reprogramming (I do not change GPS board brand very often :-)
I even once had the GPS reprogrammed by ArduPilot, but something went bad, and the GPS booted with default settings (57600 bauds) instead of the 34800 I wanted.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service