
Global Positioning System (GPS)
Although we can hook up two GPS antennas for more accuracy, as the process is the same for both, we're only going to use one. Besides, we're a bit pressed for space on this rover.
The first thing you'll notice is with most GPS antennas, the plugs do not match. In fact, they don't on most components you'll buy for Pixhawk 2.1. The powers that be have elected to change the plug configuration to something of an entirely different shape. Although these plugs are far superior to previous versions (they lock in place and can obviously only fit in one way); it means that changing plug ends is needed.
Luckily, the Pixhawk 2.1 comes with patch-style plugs (male at both ends). One end plugs into the new plugs, while the other goes to the older version. We need to remove each wire from the plugs (on both the older version end, and on the end from our component) one at a time and solder them together. Matching the wires is a matter of placing them end to end, with one plug upside down and the other right side up, as shown in the following image:
You can't rely on the color of the wires. Notice that the one on the right is rainbow colored, while the one on the left is all black with one red wire. You must have one plug flipped to match them up. Notice how the lighter plug (top-right) has little silver dots along the top (actually indents exposing the pins), while the darker plug (lower left) is completely flat on top. This is how to match them up to make sure you attach the wires properly. Doing it wrong can damage your component and/or the Pixhawk.
Removing the wires from the plug is a simple matter of using something sharp to push down on that indent (which exposes the pin), and gently pulling the wire out of the plug as shown in the following image:
As each pin is removed from each side, solder them together one at a time. Doing all of them at once can and will lead to confusion.
Wrap each solder with either heat-shrink or electrical tape, and then wrap the whole bundle with more tape (as shown in the following image):
Now, where shall we place the GPS? Much like the main Pixhawk, GPS modules usually contain a compass. Thus, you should look for the arrow on top. This should always point forward, regardless of where the cable is attached. We decided to put our GPS up front (where we were originally thinking the Pixhawk could go). This keeps it well away from the electromagnetic interference that a motor can produce. It should be easy to keep it clear up here on the nose of the vehicle (as shown in the following image):
You can also see that the GPS antenna is now plugged into the GPS1 port. Using 3M automotive body tape to secure components is a great way to do it. It's very strong tape, double sided, and flexible. You can pick it up at any autoparts store.
The GPS 1 cable (which comes with the Pixhawk) also has an arm button. This button allows you to get everything going without activating any motors or servos. Once you're ready to roll, you just hold down this button for a couple of seconds. We'll get to that in just a bit.