1 In the 7.0 release and later. INAV only supports Ublox and Ublox7 protocols.
2 In the 8.0 release and later INAV Ublox GPS units with Ublox Protocol version < 15.00 are deprecated and from INAV 9.0 will no longer be supported.
4 Recommended GNSS units are M8, M9 or M10 models for best navigation performance. While it is uncertain if there are M8 versions with Protocol version lower than 15.00, the majority of the units should be 15.00 or newer.
6 While older versions as M6N and M7N also work up to INAV 8.0. But later generation M8 and the newer M9/M10 versions are superior.
7 Most GNSS modules have a built in magnetometer (compass), but there are also some available without e.g. [Matek M10Q](http://www.mateksys.com/?portfolio=sam-m10q) or [Beitian BN-220](https://inavflight.com/shop/p/BN220) which are perfect for planes and flying wings.
9 Modules known to work reasonably well:
10 * [Matek M10Q-5883](http://www.mateksys.com/?portfolio=m10q-5883) M10
11 * [Beitian BE-880Q](https://store.beitian.com/products/beitian-compass-qmc5883l-amp2-6-pix4-pixhawk-gnss-gps-glonass-dual-flight-control-gps-module-bn-880q?variant=44696118133023) M10
12 * [Beitian BK-880Q](https://store.beitian.com/products/beitian-compass-qmc5883l-amp2-6-pix4-pixhawk-gnss-gps-glonass-dual-flight-control-gps-module-bn-880q?variant=45152276119839) M9
13 * [Beitian BN-880](https://inavflight.com/shop/p/BN880) M8
16 **Note** : Not all GNSS units are made equal. If you buy cheap, you are more likely to get cheap performance. Many GNSS units do not include a quality _front end LNA and SAW filter_. Without those components, the chances of poor performance is much greater if you have localized RF noise from a VTX or RX with telemetry.
20 Using default settings INAV will configure the GPS automatically, **there is no need for configuring it manually** using software like `u-center`. Nevertheless you have to configure your FC with INAV to receive the GPS signals.
22 For INAV before 1.9, it is also necessary to perform some [manual configuration of UBLOX 3.01 firmware GPS](https://github.com/iNavFlight/inav/wiki/Ublox-3.01-firmware-and-Galileo) to use Galileo satellites.
24 With INAV 7.0 and later, `GPS`, `Galileo` and `BeiDou` or `Glonass` can be enabled in the GPS configuration tab (the `GPS` constellation is enabled by default). **Always enable as many constellation as your hardware will allow.**
26 The magnetometer / compass is normally included as part of the GNSS (GPS) module.
27 If you want to use an external magnetometer other than the one on your GNSS module, do not use both together. You can't use two identical chips/magnetometers on the same I2C bus.
29 If your flight controller has an internal magnetometer on the FC, using it will likely to have poor results due to magnetic interference (not recommended).
33 **From the release of INAV 7.1 the use of a compass is no longer mandatory for multirotor navigation as it once was. BUT it is still recommended for the best navigation performance, when it comes to maintaining a fixed position for an _extended period of time_, without heading drift.** e.g. in Poshold. Or taking off and immediately starting a Waypoint mission.
34 * Compass-less navigation performance is heavily dependent on a clean build, that has minimal levels of Gyro/Acc noise. It **will not** work correctly if your multirotor is producing excessive vibrations, caused by unbalanced motors, propellers or frame resonance.
35 Always enable the maximum number of GNSS constellations your hardware will allow. Poor EPV and EPH (Standard deviation of position error) will greatly effect navigation precision. Regardless of having a 3D fix, or what you consider an acceptable number of satellites.
37 If you decide to omit the use of a compass on a multirotor or VTOL platform, due to space limitations or magnetic interference that can not be overcome. **Be mindful that none of the navigation modes** (_RTH, Failsafe, Poshold, Cruise or a Waypoint mission_) **will become operational until a GPS based heading is obtained**. To accomplish this, start flying the copter in a straight line until -
38 * the OSD Home arrow appears, showing a valid home direction.
39 * both the OSD _Heading_ and _Course over Ground_ indicators show a valid heading.
40 * keeping both headings closely aligned for a short time.
42 As seen in this [video](https://www.youtube.com/watch?v=iopZfH-DdTI)
44 Only then can the IMU heading data be trusted for _fixed position_ or slow speed navigation. Do not omit any of the above steps or your multirotor can experience toilet bowling, just as surely as it would with a poorly setup compass. Also conduct some tests to be sure everything is working correctly when you first setup a multirotor without a compass, just as you would with a compass.
46 * **Note** : Presently multirotor navigation flight modes (RTH, POSHOLD etc) are required to be set **before** the magnetometer is turned off in the Configuration tab. Otherwise the navigation modes will not appear in the modes tab. You can select magnetometer type FAKE if no device is installed. Then proceed to alter your navigation modes. Once done, set Magnetometer type back to NONE for compass-less navigation. **This will be fixed in 7.1.1**.. The same will apply if your flight controller doesn't have a barometer. In this case you will be required to enter `inav_use_gps_no_baro = ON ` in the CLI, and select Barometer type FAKE. Then you can alter the navigation modes. Once done, set the barometer type back to NONE.
47 **Be aware. If you don't use a barometer as well as a magnetometer. And your satellite HDOP is greater than 1.3, the copters altitude and position accuracy will be greatly reduced.**
49 INAV 7.1 will also offer better compass interference rejection. But this is not an excuse to be tardy on your install, or shortcut the calibration process.
51 INAV 7.1 and later will also benefit fixed-wing models by the use of a compass, in providing better heading estimation. While in previous releases a compass provided no extra benefit.
53 ## INAV GPS Configuration
55 INAV will attempt to provide GPS configuration. This is controlled by a number of CLI settings
60 INAV only requires a few UBLOX messages and it is recommended that you leave auto-config enabled to ensure the GPS is configured to INAV's requirements.
62 In particular, if you enable messages that INAV does not require, it is possible to seriously downgrade or even disable GPS functionality. This is typically indicated by a high error count being reported. In this case, it is recommended that you use "u-center" to reset the GPS to factory settings and let INAV perform auto-configuration.
64 ### INAV runtime Configuration steps
66 When the GPS port is enabled, INAV will:
68 * Auto-baud if set, to the limit set by `gps_auto_baud_max_supported`. Do not set this too high on older models
69 * Disable "standard" NMEA periodic sentences
70 * Set UBLOX parameters
71 * Enable the required UBLOX periodic messages
73 Note that GPS is a push protocol; if your GPS has pre-configured messages enabled for transmission, then they will be sent; it is not practical for INAV to disable the whole of the large UBLOX message catalogue. If in doubt, perform a factory reset.
75 ### INAV Required Messages
77 INAV will enable UBLOX periodic messages according to the UBLOX version:
79 | Class | Id | Usage | UBLOX Versions | INAV Version |
80 |-------|------|--------------------------------------------------------|----------------|--------------|
81 | 0x01 | 0x02 | UBX-NAV-POSLLH Geodetic Position Solution | 5,6 | < 9.0.0 |
82 | 0x01 | 0x03 | UBX-NAV-STATUS Receiver Navigation status | 5,6 | < 9.0.0 |
83 | 0x01 | 0x12 | UBX-NAV-VELNED Velocity Solution in NED | 5,6 | < 9.0.0 |
84 | 0x01 | 0x21 | UBX-NAV-TIMEUTC GPS Time Solution | 5,6 | < 9.0.0 |
85 | 0x01 | 0x35 | UBX-NAV-SAT Sattelite Infrmation | 5,6,7 | < 9.0.0 |
86 | 0x01 | 0x35 | UBX-NAV-SAT Sattelite Infrmation | 8 | |
87 | 0x01 | 0x42 | UBX-NAV-SIG Signal Information | 9,10 | >= 8.0.0 |
88 | 0x01 | 0x07 | UBX-NAV-PVT Navigation Position Velocity Time Solution | 7,8,9,10 | |
90 As of July 2024 / INAV 8.0.0-dev.
92 ## Installing the GNSS unit - Antenna orientation
94 Ensure the ceramic antenna (light brown or beige in color) faces skywards. To provide the strongest signal and best hemispherical satellite coverage.
96 * **Important** : Be sure your GNSS module is mounted a minimum of 5cm away from any source of Radio Frequency or (Electro) Magnetic interference. **e.g.** A digital or analog video transmitter and its antenna. A radio receiver that has telemetry and its antenna. Or for the sake of the magnetometer, any source of magnetic fields. High current power wires, Motors or a Beeper.
99 ![M10Q-5883_4](https://github.com/iNavFlight/inav/assets/47995726/5fd7604b-986e-417f-b134-235b9c67c3dd)
103 ## Setting up the compass alignment
105 INAV's default Orientation Preset is `CW270FLIP`. This value is based on the orientation of the magnetometer chip on its PCB, chosen by the manufacturer. With respect to the Arrow direction they provide facing the front of the aircraft. Or the plug facing the rear of the aircraft.
107 * Circled in _Red_ at the base of the GNSS unit. Is the QMC5883 magnetometer chip **with its white DOT providing an axis magnetic bearing reference based on the internal coils**.
109 * Circled in _Orange_ is the orientation arrow showing the direction the compass should **ideally** be mounted, with that arrow facing the front of the model, and its direction of travel. Along with the Flight controllers arrow facing forward as well.
111 ![Matek M10Q](https://github.com/iNavFlight/inav/assets/47995726/52d67080-b96c-47be-bf3a-e6db04f5d374)
113 However, there are many manufactures that have released GNSS/compass modules onto the market without any thought of adding an orientation arrow to assist installation.
114 In this case you maybe required to work out the orientation preset required for your hardware based on the magnetometer chips position, on your specific installation.
115 This chart is a reference to help gauge the hardware `Orientation Preset` of your magnetometer, based on the chips **Clockwise rotation**. And the power plug being a reference marker for the rear, if no forward arrow is provided. The Orientation Preset must first be established, based on the hardware reference marker, before making any alignment changes with the `align_mag_pitch`, `align_mag_roll`, `align_mag_yaw` settings in the CLI or alignment tool sliders.
117 ![Clockwise Orientation reference chart](https://github.com/iNavFlight/inav/assets/47995726/c047fb0d-7b83-4a2d-9b2f-b1b986ecfc89)
119 You may use the Alignment Tool in the configurator, for _basic_ compass/flight controller orientations until after 7.1.
120 _But in future releases the alignment tool will cover more extensive hardware alignment._ Alternatively, you may
121 instead choose the impercial method, outlined below.
123 The image below is an example of a module that does not use the default orientation preset, nor has a mounting direction arrow from factory. **The orange orientation arrow has been added to the image below to assist your installation if you have this unit. Its Orientation preset is CW180FLIP with the plug facing to the rear of the model.** _Beitian made the first GPS modules that included a compass for hobby use, back in 2014. And this is how we ended up the confusing default orientation preset of CW270 (flip)_
126 ![Walksnail M181 GPS](https://github.com/iNavFlight/inav/assets/47995726/5146a1fd-8ea3-479f-abb4-45e1dbbe61df)
129 **NOTE :** The compass must work in conjunction with the Flight controllers IMU. If you invert the flight controller or rotate it on the Yaw axis, this will effect the compass alignment settings.
130 Before attempting to use any navigation modes, you should verify that the compass alignment is working in unity with the flight controllers alignment. By using the Configurator SETUP/STATUS Tab, and moving the model on all axis's with your hand, to ensure the graphical model moves identically to your motions, without any axis drift.
131 So be mindful of the complexity involved in getting the correct orientation settings if you do deciding to mount the flight controller or GNSS/compass unit on an axis different from the manufacturer recommendation arrow.
134 ## Compass calibration and testing
136 The general rule behind compass calibration is to ensure the magnetometer reports the earths magnetic field strength equally on all axis's, regardless of weak localized magnetic perturbations. Therefore calibration of the compass should be done _in_ the aircraft.
138 Ideally, its not good enough to rotate the compass or aircraft, so that each axis faces skyward or towards the ground. Because this can leave areas where _complete_ calibration is missed. Which will provide poor results and navigation performance.
140 To acquire the best 3 axis calibration results, **your arm and wrist should move the aircraft in a figure 8 or infinity [∞](https://www.google.com.au/search?sca_esv=c7d05ac6ad01166f&sca_upv=1&q=3D+compass++calibration+motion&tbm=vid&source=lnms&sa=X&ved=2ahUKEwiThc-btLGEAxVEa2wGHaZaAO8Q0pQJegQIDBAB&biw=1366&bih=615&dpr=1#fpstate=ive&vld=cid:8bdfdcb6,vid:J_cZnPcW-Yw,st:0) symbol motion in the air, while ensuring every axis faces skywards in the process**. Do this several times (not too quickly) within the allotted 30secs.
141 * Use a long USB extension lead if its done via connection to the configurator.
143 The end result should be the `maggain_x` `maggain_y` `maggain_z` calibrated settings should not be greater that 100 points of each other, and as close to 1500 as possible. While `magzero_x` `magzero_y` `magzero_z` can vary. But should never exceed +- 1000 on any axis. Any dramatic difference indicates a poor calibration. Or too much localized magnetic or electromagnetic interference.
144 **Note**: A good calibration may take several attempts. So use the above information as a reference if you attempt to obtain a more precise calibration.
147 * Perform any tests away of sources of magnetic interference. Domestic appliances or even audio speakers can cause erroneous affects. Computer monitors may also interfere.
148 * Use an analogue compass in preference to a digital (mobile phone) compass. The compass in your phone is likely to be a similar chip to that on your aircraft, and is as susceptible to the same errors of interference and calibration
149 * Alternatively, if you know the orientation of surrounding landmarks (e.g. my house is pretty much N/S), then you can do static tests against land orientation.
151 Check your machine at cardinal points (North (0°), East (90°), South (180°), West (270°)). Degree perfect alignment is not necessary (and probably not measurable), but you should aim for +/- 5° of known magnetic direction.
153 * If the values are incorrect by a multiple of 90°, then the numeric alignment needs to be changed
154 * If the values are just randomly wrong across the cardinal points, then FLIP is probably wrong (as well).
156 * If external Compass module is mounted at 30 degree.
157 For example at top of a Cam mount,
158 free alignment is possible by Cli commands.
159 Cli setting Align_mag must be set to
160 `Align_mag = default`
163 For example CW270flip, this value is to ADD manually.
164 For free Alignment, all three axis need to set manually.
165 A sensor flip is always to realize
167 For example cw270flip:
169 set align_mag_pitch = 1800
170 set align_mag_roll = 0
171 set align_mag_yaw = 2700
174 * For 30 Degree Backwards tilted GPS/Compass Module, reduce align_mag_roll about 300
176 set align_mag_roll = -300
179 * Because Magnetometer with CW270° has its roll axis in relation to the Pitch Axis of the FC
181 The terminology of the setting FLIP. Is based on the magnetometer chip being upside down, on the under side of the GNSS unit.
182 If the chip could be mounted with it top facing the sky. FLIP would not be required. The only other exception is if your Flight Controller is mounted inverted in you model. Because the Compass and FC work together to provide the correct heading. FLIP is not required in that case.
184 Enhanced Explanation in #6232
185 [How to Align and Check if your readings are Correct ](https://github.com/iNavFlight/inav/issues/6232#issuecomment-727636397)
187 Painless360 has done a video on this: (https://www.youtube.com/watch?v=kVVJ-DjUjsc)
190 There is an Alignment Tool built into the INAV configurator for INAV 5.0 and later.
192 ## Emperical Method of Determining Compass Alignment<a id="emperical-method"></a>
194 Rather than using the alignment tool, it is sometimes easier to instead test the actual readings you are getting from
195 your compass. The following procedure can be used.
197 If the compass is tilted at an odd angle, use a piece of tape or similar to temporarily hold it flat.
200 First ensure the FC alignment is correct. In the Setup tab it must move the correct direction in all three axis.
202 Point the aircraft north. Look at the heading in the Setup tab. Quickly turn the aircraft 90°, so it points east, and set it down. Watch the heading reading over the next five seconds. Does it remain stable, or does it slowly change, by more than 10°?
204 If the heading slowly catches up over a few seconds, the compass alignment is upside-down. If it remains stable, it's right-side up. If needed, add/subtract 180° to the roll to flip it.
206 Now that it's right-side up, we need to set which way is front by adjusting the yaw. Adjust the yaw in 90° increments so that the heading reads about 0°/360° when the aircraft is pointed north.
208 Confirm east, south, and west also read correctly.
211 If you 3D-printed a mount to put the magnetometer at a weird angle, adjust for that now in the alignment tool.
214 That's it, you're done!
216 * If you have a tiny whoop board with the 45° angle mounting, you may need to adjust yaw in 45° increments.
221 ## Initial flight tests
223 Once you're content that the static configuration of the compass is correct, it's time to go flying. There is still no guarantee that the machine will not generate interference, so it's advisable to do some controlled testing before attempting more advanced navigation modes:
225 * In a clear space (no trees!) attempt a simple line of sight POSHOLD. If the craft fails to hold (toilet bowling, or ever increasing circles (in range and speed)), be prepared to disengage PH and take manual control.
227 To confirm magnetic interference, blackbox logging is most useful:
229 * Fly at a reasonable speed (> 5m/s) in straight lines, as close as possible to a 90° crossing paths, or a square / rectangular pattern.
231 * The blackbox can be analysed to compare the course over the ground (from GPS) with the compass readings (`GPS_ground_course` v. `attitude[2]/10`). Run `blackbox_decode` with the `--merge-gps` option to get GPS fields in the log.
233 * If you need help doing this, post the log in the INAV RC Groups forum (or Discord / Telegram channel) and ask for help. There are a number of users familiar with this type of analysis who can assist.
235 * It is necessary to fly at a reasonable speed in order to get useful GPS data. Just hovering is not useful as the GPS cannot detect direction without movement.
237 * If you use mwp as a ground station with telemetry, then mwp logs can also provide useful analysis, but blackbox is preferred, as there is more data and it is also possible to analyse throttle affects.
239 Only when you're content that the compass reads correctly for all throttle settings and directions should you progress to more advanced navigation feature (way points, return to home). The majority of navigation failures are due to poorly performing compasses.
241 ## Getting started with Ublox GPS
243 - Physically connect your GPS to your FC using UART (preferred) or softserial (not recommended). Connect RX from GPS to TX on FC, TX from GPS to RX on FC
245 - Activate GPS in the ports tab in INAV configurator and set it to `57600`, `115200` using UART. Or `19200` using softserial (on your chosen port)
247 - The baud rate can be set to `230400` when using an M10 device. Which can be beneficial. BUT higher baud rates are also susceptible to interference if the GNSS UART leads run close to a source of RF/EM interference. If you choose to use a higher baud rate, be sure to twist the `TX/RX/5v/G` leads together. Especially if the cable length between the GNSS module and FC is more than 5cm or so.
249 - Activate GPS in the configuration tab, set it to Ublox7.
251 - Using external compass:
253 * Connect the magnetometer to I2C ports (SCL/SDA) Be aware that with SDA/SLC lines connected the flight battery must often be connected to access configurator and power up the magnetometer.
255 * Select your newly connected magnetometer by using `mag_hardware` CLI command. Example `set mag_hardware = auto` if you only have one magnetometer connected.
257 * Most built in magnetometers are on the underside and rotated 180 degrees, use example `set align_mag = CW180FLIP`. If compass is not working properly in all directions then either think and figure out the direction of your mag, or go through them all until it works as expected.
259 * INAV does provide an automatic declination setting, based on GNSS coordinates, which is enabled by default `inav_auto_mag_decl = ON`. But if you want to change magnetic declination manually `set inav_auto_mag_decl = OFF`. You have to set correct declination of your specific location, which can be found here: www.magnetic-declination.com. If your magnetic declination readings are e.g. +3° 34' , the value entered in the INAV configurator is 3.34 (3,34 in some locales). In the CLI, the same effect would be `set mag_declination = 334`. For west declination, use a minus value, e.g. for 1° 32' W, `set mag_declination = -132`. In all cases (both CLI and GUI), the least significant digits are **minutes**, not decimal degrees.
261 * Calibrate your compass according to [compass calibration](https://github.com/iNavFlight/inav/wiki/Sensor-calibration#compass-calibration)
264 Some FC boards may not provide 4.5V power on USB supply. In order to power the GPS it is necessary to connect the battery or use another power source (a 4.5V source may be powered by USB). The onboard 3.3V will be powered by USB, but may not provide adequate voltage, as the GPS regulator typically requires 3.6V minimum.
266 Once you have connected the GPS to your flight control board
268 - Open the INAV Configurator
269 - Enable GPS on your desired UART port
271 - Press "Save & Reboot"
272 - Then go to the "Configuration" tab in the INAV Configurator
274 - Set the "Protocol" to UBLOX7
275 - Set the "Ground Assistance Type" to "Auto Detect"
276 - set MAG Alignment to CW270FLIP
277 - Press "Set & Reboot"
278 You can confirm the GPS unit is working by going to the GPS tab in the INAV Configurator and if it is working you will see the "Total Messages" count on the left incrementing in numbers.
280 ## GNSS Ublox update rate
282 INAV 7.0 and later supports a higher GNSS update rate for Ublox receivers. `gps_ublox_nav_hz`. With M10 (now) supporting up to 25Hz.
283 If you wish to increase navigation precision. And you have a low noise build, good fix and with EPH/EPV data being acceptable. You may wish to alter this setting. But only do so according to the table below. Note how the maximum update rate can only be achieved with lower concurrent constellations.
284 _And a trade off will also be noticed. The satellite count will generally be a little lower, the higher the update rate. But this isn't a draw back. Because higher precision can still be achieved._
286 ![update rate](https://github.com/iNavFlight/inav/assets/47995726/a541d4bb-3dca-4813-a3ce-60a067ae67a1)
289 If it is the first time you have connected the GNSS unit, then it can take several minutes for a satellite fix to be obtained. This is the time required to download the Almanac and Ephemeris data. This is perfectly normal. But if it takes longer than 10 minutes. You likely have GNSS RF band interference coming from a hardware source in your model.
291 **Note:** For the GPS unit to work & pick up satellites it needs an unobstructed view to the sky (so if using indoors, don't expect any satellites to be picked up!)
294 * Inav since 1.5 version and newer uses default automatic magnetic declination, if your on old verion or want to change magnetic declination manually you have to set correct declination of your specific location, which can be found here: www.magnetic-declination.com. If your magnetic declination readings are e.g. +3° 34' , the value entered in the INAV configurator is 3.34 (3,34 in some locales). In the CLI, the same effect would be `set mag_declination = 334`. For west declination, use a minus value, e.g. for 1° 32' W, `set mag_declination = -132`. In all cases (both CLI and GUI), the least significant digits are **minutes**, not decimal degrees.
295 * Calibrate your compass according to [compass calibration](https://github.com/iNavFlight/inav/wiki/Sensor-calibration#compass-calibration)
300 When using a UBLOX GPS the SBAS mode can be configured using `gps_sbas_mode`.
305 | -------- | ------------- |
308 | WAAS | North America |
311 | SOUTHPAN | Australia NZ |
314 If you use a regional specific setting you may achieve a faster GPS lock than using AUTO, but keep in mind to change it if you change your location for holidays etc.
316 This setting only works when `gps_auto_config= ON`
318 ## AssistNow Online/Offline
320 INAV 8.0 adds support for AssitNow Online and AssistNow Offline GPS assistance services, which is a proprietary A-GNSS service that can reduce Time To First Fix (TTFF) but requires access to the internet to fetch data. AssistNow Online data is valid for a few hours, while AssistNow Offline data can be valid for weeks. It can be specially beneficial for new GPS units and for units without flash or battery backed ram (BBR).
322 In order to use the service, you have to create a thingstream account and register applications to use AssistNow Online and Offline service. The process is described here: https://developer.thingstream.io/guides/location-services/assistnow-getting-started-guide
324 Once you have your AssitNow service token, you need to configure INAV Configurator to use it, by clicking on the gear cog on the top right of the Configurator window.
325 ![image](https://github.com/iNavFlight/inav/assets/23555060/1b0baf83-2306-4e19-a321-110ba480a9aa)
327 Once INAV Configurator has your token, you can use the buttons on the bottom of the GPS tab to upload AssistNow data to your GPS unit.
329 ![image](https://github.com/iNavFlight/inav/assets/23555060/2bd2a160-5756-4f4e-8550-04962b19acaf)
331 AssistNow Online data requires an active internet connection, while AssistNow Offline will cache the data for 3 days, and will not need internet connection, unless the data is expired.
333 If you have internet access, it is recommended to use both AssistNow Online and Offline services.
336 - **`X!`** in the OSD `GPS Satellites` field indicates the flight controller isn't receiving a valid data signal from the GPS.
337 - No GPS lock: often due to electric noise from flight controller or other equipment such as 1.2ghz video TX. Try getting the GPS as far away as possible from electric noise emitting parts as the FC, ESCs or power cables. Placing the GPS on a mast is also a common way, you can further try shielding with aluminum or copper foil. Don´t place the GPS inside the frame.
338 - "Toilet bowling": in the beginning the copter holds its position and then starts to make bigger and bigger circles, you probably have your magnetometer not calibrated correctly or it’s interfered from the magnetic field of your power lines or the beeper.
339 If you are using your FC onboard mag, try to place the the FC as far away as possible from the magnetic interference causing parts e.g. mounting it on/under the top plate on small racers.
340 - 3.3V GPS units, such as the GPS from 3DR should not be powered by the flight controller's 3.3V pin along with a Spektrum (or other DSM) receiver. The current draw can cause the Spektrum receiver to brownout. Instead use a 3.3V regulator and power the GPS from the BEC or separate battery.