LibrePilot Forum

Users => Vehicles - MultiRotors => Topic started by: CMOL on February 21, 2016, 06:03:58 pm

Title: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 21, 2016, 06:03:58 pm
Hi,
I'm not sure if you can help me, but the problem I am having is that everytime I try to disarm my quad it doesn't do anything. In Librepilot I have managed to get my GPS Ublox M8N and Revolution to work well together, but then after a short while it all fails and the ATTI, STAB & MAG all turn red, which we're all green before.
I been reading everything I can get my hands on, but the problem still remains the same.
(I have a Taranis X9D 16CH transmitter and a X8R receiver)
All I want to achieve is to make my quad to be able to return to home by the flick of a switch OR if I loose connection to the aircraft. I was also attempting to be able to use the position hold function.
I would be very happy if someone can help me with this tricky but interesting problem.
Thanks in advance  ;D
//CMOL :)
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: rotomoto on February 21, 2016, 06:55:42 pm
Also tried to solve this puzzle over the weekend. Looks like you need magnetometer moved outside the FC. There are too many issues with integrated mag. V9 GPS was a Openpilot solution, but it is not available anywhere.
 Next Libreoffice release will hopefully solve this problem with support to external mag. Maybe then we can use some of those GPS+mag pugs out there.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: TheOtherCliff on February 21, 2016, 07:47:18 pm
It really sounds (red mag causes other things to be red) like you have mag problems.  You need a careful mag calibration (see Mag Calibration section here https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration (https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration) )

If everything looks good until the motors are running hard, then you need to address the mag fields from your wiring.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 21, 2016, 07:59:13 pm
...Next Libreoffice release ...

I use LibreOffice too but I never thought it supported gps units or revos  ;D
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 03:50:36 pm
What is the V9 GPS, would it solve my problem?
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 04:39:31 pm
What is the V9 GPS, would it solve my problem?

The OpenPilot v9 gps (also called the Platinum gps) was made by the original project (now defunct) but is no longer available except for occasional used ones that pop up for sale.

The next release of LibrePilot will support two replacements, gps units with two cables (one for gps, one for mag) and also Naza type gps units that combine gps and mag in one cable.

Would it solve your problem?  Maybe.  You should still follow Cliff's advice and twist all your cables to minimize their magnetic fields.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 05:38:34 pm
http://www.banggood.com/Ublox-NEO-M8N-GPS-For-Mini-CC3D-CC3D-Atom-CC3D-Revolution-Flight-Controller-Built-in-Compass-p-999341.html

This GPS is the one I have, many people have got it working with position hold and RTH whilst using a Revo. How have they done it you think?
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 06:15:05 pm
http://www.banggood.com/Ublox-NEO-M8N-GPS-For-Mini-CC3D-CC3D-Atom-CC3D-Revolution-Flight-Controller-Built-in-Compass-p-999341.html

This GPS is the one I have, many people have got it working with position hold and RTH whilst using a Revo. How have they done it you think?

That appears to be one of the gps units that while they may have a compass inside it's not connected to the cable.  Someone else (Cliff?) mentioned them, if you want to use the compass part you have to add a cable and connector for it.  If you look at the GCS screen picture they posted you can see that while GPS is green, mag is black (no mag available).

Twisting the power cables to minimize their magnetic fields is even more necessary using the revo's onboard mag sensor than when using an external mag.  Some vehicles can't get the interference from the power wires low enough to get reliable mag from the revo's onboard mag, that was the reason for the external mag sensors in the gps units.

Have you gone through the complete sensor calibration as shown at https://librepilot.atlassian.net/wiki/display/LPDOC/Sensor+calibration ?     
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 07:48:56 pm
http://www.banggood.com/Ublox-NEO-M8N-GPS-For-Mini-CC3D-CC3D-Atom-CC3D-Revolution-Flight-Controller-Built-in-Compass-p-999341.html

This GPS is the one I have, many people have got it working with position hold and RTH whilst using a Revo. How have they done it you think?

That appears to be one of the gps units that while they may have a compass inside it's not connected to the cable.  Someone else (Cliff?) mentioned them, if you want to use the compass part you have to add a cable and connector for it.  If you look at the GCS screen picture they posted you can see that while GPS is green, mag is black (no mag available).

Twisting the power cables to minimize their magnetic fields is even more necessary using the revo's onboard mag sensor than when using an external mag.  Some vehicles can't get the interference from the power wires low enough to get reliable mag from the revo's onboard mag, that was the reason for the external mag sensors in the gps units.

Have you gone through the complete sensor calibration as shown at https://librepilot.atlassian.net/wiki/display/LPDOC/Sensor+calibration ?     
Yes, I have gone through the calibration. But wouldn't it work if I bought an external compass that I could connect via the flexi port?
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 08:05:28 pm
Just a quick update,
I have found this: http://www.digikey.se/product-detail/en/CGGP.25.4.A.02/931-1126-ND/2690283

I think this is the GPS people have been naming platinum GPS or V9.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 09:07:47 pm
Just a quick update,
I have found this: http://www.digikey.se/product-detail/en/CGGP.25.4.A.02/931-1126-ND/2690283
I think this is the GPS people have been naming platinum GPS or V9.

That's the patch antenna that's used on the V9, not a whole V9 gps.  It would be really nice if that were the whole gps, it works out to cost about $5 (USD). The V9 isn't made anymore and were never sold through any distributors.  The only way to get one is to find one for sale in places like the "for sale" area on rcgroups.com.

This is what the V9/Platinum GPS looks like:
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 09:17:25 pm
But isn't the Ublox M8N GPS from bang good better than this one? Because this one doesn't include a compass, or does it? :P
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 09:48:59 pm
I have found this
http://www.aliexpress.com/item/Ublox-NEO-7N-GPS-With-3-Axis-Electronic-Compass-For-CC3D-Revolution-Flight-Controller-Black-GPS/32434783219.html?spm=2114.10010108.100010.1.3ODGWS
I thought it looked interesting since it had two cables coming out of it which probably means that one is for the GPS and the other is for the compass.
Would this be worth buying? But how would I set up an external compass in LibrePilot?
Regards,
CMOL
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 09:50:32 pm
But isn't the Ublox M8N GPS from bang good better than this one? Because this one doesn't include a compass, or does it? :P

The V9 is the original gps with compass for OpenPilot.   It not only has a compass, it sends the compass data down the same wire as the gps data so it only uses one port on the revo.  Until Cliff wrote the Naza gps decoder that's in the next release it was the only way to get gps and compass on one port.  Now we have another option for using just one port, the Naza gps lite or one of it's clones.   The next best choice would be one of the gps/compass units that has two cables, one for gps and one for compass.  Those are also supported in the next release.  Both are also in the "next" branch in the source tree if you want to compile your own version before the official release.  Neither of these options comes with the correct connector for the revo/sparky2/cc3d so you have to change the connector.

The V9 has 3 connectors but normally you only use one of them.  One is the combined gps/mag data (used for revo/sparky2), one just gps data (for cc3d and other brand flight controllers), and the third is a debugging port for developers.

The banggood one you posted a link to doesn't seem to have the second cable that's required for the compass data on anything but the V9 or Naza gps units.  That particular one is also a bit overpriced.  This one, http://www.banggood.com/Ublox-M8N-GPS-Compatible-with-DJI-NAZA-Lite-V1-V2-Flight-Controller-Phantom-1-2-Vision-p-991718.html is one of the Naza clone gps units that Cliff's new code supports for both gps and compass.  You just need to change the connector, most people just buy short cables with the connector on eBay and splice them onto the existing cable.  The connector pins are really, really tiny and hard to crimp even if you have the correct crimper.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 10:02:15 pm
I have found this
http://www.aliexpress.com/item/Ublox-NEO-7N-GPS-With-3-Axis-Electronic-Compass-For-CC3D-Revolution-Flight-Controller-Black-GPS/32434783219.html?spm=2114.10010108.100010.1.3ODGWS
I thought it looked interesting since it had two cables coming out of it which probably means that one is for the GPS and the other is for the compass.
Would this be worth buying? But how would I set up an external compass in LibrePilot?
Regards,
CMOL

You posted a few seconds before I did.  That one is one of the two cable ones I was talking about.  It looks like it may even have the correct connectors on it, it's hard to tell for sure from the pictures but they seem to say it does.

That's the type gps that the link in Cliff's earlier post was talking about setting up, an I2C aux mag.   The compass part isn't supported in the current released version, only in the next one or if you compile your own from the next branch in the source.

Either that one or the one I posted should work fine.  The choice is using one port or two and maybe changing the connector or not.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 22, 2016, 10:20:59 pm
I read through your post and you mentioned Cliff's coding. So it supports DJI Naza Lite on Revo, and has one cable including GPS and compass? If that's true then it's really good, and might actually be a very good option! :D But how does one know how to jumble up the wires correctly when changing a Naza Lite connector to one that will suit the CC3D's main port?
Regards,
CMOL
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 10:37:33 pm
I read through your post and you mentioned Cliff's coding. So it supports DJI Naza Lite on Revo, and has one cable including GPS and compass? If that's true then it's really good, and might actually be a very good option! :D But how does one know how to jumble up the wires correctly when changing a Naza Lite connector to one that will suit the CC3D's main port?
Regards,
CMOL

I could work it out but Cliff actually did it to both a real and clone Naza gps while working on this.  If he see this he'll probably post the pinout.  Even better, he could add it to the wiki.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: emjay on February 22, 2016, 10:42:22 pm
Might be worth keeping an eye on what this guy is selling via the Classifieds for OpenPilot hardware.
http://www.rcgroups.com/forums/showthread.php?t=2598796#post33936030
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 22, 2016, 11:22:55 pm
Might be worth keeping an eye on what this guy is selling via the Classifieds for OpenPilot hardware.
http://www.rcgroups.com/forums/showthread.php?t=2598796#post33936030

I purchased one of my V9 gps units from him a few weeks ago.  He's legitimate, shipped it out the next day.

Currently he's listing an older V8 gps and they don't have the compass on them.  It's just a NEO-6 gps, not a bad gps but you're better off with one of the newer ones on eBay.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 23, 2016, 12:10:34 pm
http://m.banggood.com/DJI-NAZA-Lite-Version-Multi-rotor-GPS-Module-p-86239.html

I found this GPS, I think it's the real deal, GPS & compass and not a clone.
But how do we get Cliff to help us? Because it would help a lot of people :D
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 23, 2016, 03:42:23 pm
http://m.banggood.com/DJI-NAZA-Lite-Version-Multi-rotor-GPS-Module-p-86239.html

I found this GPS, I think it's the real deal, GPS & compass and not a clone.
But how do we get Cliff to help us? Because it would help a lot of people :D

That does appear to be a real Naza GPS but you can usually buy them for less money than that on eBay.  In the US at least they usually go for around $85.

If you search for "JST SH" on eBay you can buy short cables with the proper connector on them.

Below is a picture of the Naza connector.  It should be hooked up:

Naza               revo
-----------        ----------
1 gnd             1 gnd
2 tx                4 rx
3 rx                3 tx
4 +5v             2 vcc


Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 23, 2016, 03:59:58 pm
So by doing this, the CC3D will know exactly what to do and I'll be good to go? :D
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Mateusz on February 23, 2016, 09:10:01 pm
So by doing this, the CC3D will know exactly what to do and I'll be good to go? :D

No, actually not, its way more complicated than you think. You need some work before achieving position hold. GPS is accurate up to 2 meters and only helps other sensors. You really need everything calibrated properly before you start using it. Starting slow, getting the thing flying nicely in Complementary mode. Then you can step up and try Magnetometer which MUST be calibrated outdoors preferably using OPlink modem. Far from metallic objects. After that you can try INS31 sensor fusion (which is just Extended Kalman). Once you have good (not oscillating) signal in Atitude states in Scopes and rock stable model in the GCS, you can try flying with INS31, be sure it is rock stable in the air. Without the wind copter shouldn't drift much. After that if your magnetometer calibration is good, you can try GPS assist or position hold, but  far away from buildings and people. And you should check before if your fail-safe is working (cutting off motors on turning off transmitter or lose of signal).
The reason not to fly close to people with GPS is obvious. As for the "far away from buildings" this is because buildings reflect GPS signal, and may fool your receiver with multi-path reflections into "thinking" the unit is few meters farer than it is in reality. Finally, these Ublox GPS modules, don't pull almanac from Wireless network and don't use WiFi for better precision. So its not like mobile phone. They usually have super-capacitor instead of battery (because capacitor does not get old though it only lasts up to 5-6hours). So before each flight you need to power the GPS, give it clear sky for 10-15min, let it collect stats and the you are ready to go, as it has up to date almanac for ~5-6h without being powered.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on February 23, 2016, 09:19:41 pm
So by doing this, the CC3D will know exactly what to do and I'll be good to go? :D

CC3D boards don't really use gps, I'm guessing you mean a "Revolution" since that's the title of this thread.  Revolution is just a name some Chinese sellers made up for web search optimization to catch people searching for either CC3D or Revolution boards.  GCS should either identify the board as a CC3D (shown as coptercontrol) or a Revolution.  If you refer to a "Revolution" as just a CC3D you'll get wrong answers because the cc3d and revo have different capabilities.

If you have a revolution then all you need to do is hook it up, go into the gcs configuration tab, and set whatever port you plugged into to GPS/115200 baud/DJI protocol.  This will only work on the next release  or if you compile your own off the next branch.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: CMOL on February 23, 2016, 10:16:14 pm
So has anyone ever gotten a GPS position hold functioning with a Revolution FC? To me this all seems very distant/a bit impossible to achieve, but that is just me being naive i suppose. I mean somebody must have gotten this working?
I will start a new thread with a more specified topic in an attempt to find people who have managed to achieve this. :)
Regards,
CMOL
Title: Revolution FC and GPS Position Hold: Has anyone succeeded?
Post by: CMOL on February 23, 2016, 10:21:19 pm
Hi,

I am trying to find solutions on how I can use my CC3D (Revolution) to use the GPS position hold function, but I am finding anything that seems plausible. What I was wondering is if anyone has managed/succeeded with this and are willing to explain how they solved the different problems. If I am completely out with the fairies concerning this matter (it isn't really possible), do say, I do like criticism.
Thank you in advance.
Regards,
CMOL :)
Title: Re: Revolution FC and GPS Position Hold: Has anyone succeeded?
Post by: Mateusz on February 23, 2016, 11:07:45 pm
Of course

https://www.youtube.com/watch?v=FD-sXesFqws
https://www.youtube.com/watch?v=vG3K5eREGxc
https://www.youtube.com/watch?v=NZiB3EytVAM
...etc...

But this flight mode was filmed when it was introduced back in OpenPilot days. It's extremely boring to make a movie of hovering just in one place for longer time, it's not very spectacular. Also people post here, when they have problems, but it works for many pilots. Just needs some effort to learn how to do it, but definitely possible. Of course it won't happen out of the box like with DJI products.
Title: Re: Revolution FC and GPS Position Hold: Has anyone succeeded?
Post by: ArnhemAnt on February 23, 2016, 11:37:22 pm
Hi,

I am trying to find solutions on how I can use my CC3D (Revolution) to use the GPS position hold function, but I am finding anything that seems plausible. What I was wondering is if anyone has managed/succeeded with this and are willing to explain how they solved the different problems. If I am completely out with the fairies concerning this matter (it isn't really possible), do say, I do like criticism.
Thank you in advance.
Regards,
CMOL :)

It would be really helpful if you could be more particular with the problems you are encountering and also mention which GPS you are currently using. Is your concern with the setup of the GPS or is it calibration, or is it arming/flying with GPS functionality?
From my experience, it is essential to make sure you do the calibration steps as perfectly as possible, ie: away from any metallic objects, etc. All wires carrying power (motor and ESC's) should be twisted to help eliminate interference. GPS should be mounted as far away from potential interference (like on a post). Also make sure that your GPS is connected for at least 15-20 minutes so that it can download all the latest info from the satellites.
These are just a few issues that will make a big difference in using modes such as PosHold.
Title: Re: Revolution FC and GPS Position Hold: Has anyone succeeded?
Post by: hwh on February 24, 2016, 12:52:13 am
...
It would be really helpful if you could be more particular with the problems you are encountering and also mention which GPS you are currently using. Is your concern with the setup of the GPS or is it calibration, or is it arming/flying with GPS functionality?
...

He's got another thread that's been going on for a while on the same subject, he just decided to start another thread.
see https://forum.librepilot.org/index.php?topic=902.0 .
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: TheOtherCliff on March 02, 2016, 11:19:16 pm
The cheap M8N GPS / compass does work well.  I have helped a friend set it up using LP 15.09 and the on board mag.
I use it with the unreleased next version and use the aux mag that way all the time.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Visesh Lal on March 19, 2016, 08:13:14 pm
Good day all, I am new to the hobby, only just started trying to set up the GPS so I apologies for my nube-ness, and I have looked around a bit on the forum and did not see any existing discussion on my pblm.... if it exists and I missed it, again, apologies. 

I am using the Revo board and a YKS Ublox Upgraded NEO-7M High Precision GPS module. Everything sets up fine, the GPS unit is recognized, picks up satellites, set home position...although no map shows up the coordinates seem to make sense.

But, when I select position hold in one of the flight modes, the cc3d will not arm,I see the leds responding to the mode swich changes on the transmitter, but it will not arm, and when I select Navigation INS13, everything on my tricopter freezes, the servo which normally responds when unarmed, does not.... Anyone else have similar issues.. or am I missing something, I followed the setup as described on librepilots's site. Thanks for any help!
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Mateusz on March 19, 2016, 10:19:39 pm
To begin with, CC3D has no navigation capabilities. You must be talking about Revolution board, it's a different hardware.

Software won't allow to arm in any GPS flight mode for safety reasons. Of course its not completely foolproof, but it's not a toy that works plug & play.

You have to read and learn how to set it up, and calibrate properly. It matters how you build copter, and how you configure and calibrate. If your health alarms are not green all the time (temporary orange is not good, must be green all time), horizon is not flat and attitude scopes have any sign of oscillations it won't fly. Well it will do something ;) but you don't want to hurt yourself or anyone.

Also GPS must be first left to charge super-capacitor, powered for ~15min at clear sky to update almanac before first flight. It lasts then for 5-6h after disconnecting battery. Most GPS units dont use battery but super-capacitor. So doing that before first flight each session is needed. Otherwise it may have poor perception and pick too few usable sats.

I suggest to read Wiki, and learn first basics, start slow with basic Complementary mode, flying it, then trying by small steps more advanced modes, far from people/buildings, but knowing what you do. Be sure your failsafe works and powering off radio drops copter down. Not being able to arm is a safety feature.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Visesh Lal on March 20, 2016, 06:32:01 pm
Appreciate the response, I have been digging up on forums and YouTube. I setup the gps unit itself, went through all the configs as per the Librepilot guides, but still nothing... I am picking up all the satellites, but when I select go to home the coordinates look off.. No map comes up... And when I calibrate the board the attitude indicator and animation of the craft is just going mad. Once I reset everything without any gps settings it works fine... Well my digging and trials continue, I'll be sure to post my results... Thanks much...
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Major Tom on March 23, 2016, 02:57:37 pm
http://m.banggood.com/Mini-Ublox-Neo-6M-GPS-For-CC3D-Revolution-Flight-Controller-wBuilt-in-Compass-p-1022655.html

I bought this neo-6m with a single serial plug from BG. It says it has a built it compass. It is configured for revo and does aquire sats but the mag alarm goes red.

Is it one without the mag attached to the cables? I haven't found much for info about how these particular units are wired. 
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Mateusz on March 23, 2016, 03:27:26 pm
Neo-6M sounds good, it has only GPS sats, but maybe thats even better, you dont have spikes when jumping between different systems. It has good mast which wont rotate and looks small, maybe rode could be longer, but nice.

You must have 4 wires for serial (GPS) which are TX, RX, GND and VCC. Usually Magnetometer has 2 wires SCL (clock) and SDA(data) and is powered already from the GPS. So at least 6 wires. Does I2C communication occur (green status) with AuxMag ?

Did you calibrate it ? LibrePilot uses 3D Mag, which means it is also used to determine if aircraft is up or downward orientation.
Another thing is AuxMag must agree with Accelerometer on flight controller. So you must rotate it correctly by setting AuxMagBoard orientation. OP GPS v9 has by default correct orientation 0,0,0 but other Mags may be oriented differently.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Major Tom on March 24, 2016, 03:46:36 am
The Neo-6m has only 4 wires going into the main serial port: red, black, blue, and orange. So I'm guessing it either doesn't have an internal magnetometer as advertised, or it's not wired? I'm confused.

I did go through the ACC, Mag, and level calibration. This board flies like a dream compared to my old KK2. I get great performance in complementary, but when I select INS13 I get SATs and the GPS alarm goes green, but the mag alarm goes green or orange. 

I have my S500 quad plugged into GCS now( inside) I have 9 sats. No color in my I2C alarm. Green on ATTI, STAB, GPS. But NOW my MAG alarm is flashing Orange to Green, sometimes settling on green - sometimes green when disarmed; and sporadically orange when armed and motors spinning.  I'm getting a subtle wobble in yaw and roll in my Flight Data Graphics of maybe 3 degrees, but my Compass Graphic seems to point to the correct directions as I rotate on yaw axis. The orange alarm when armed has me thinking the onboard mag is in use and not the external mag in the GPS.

I set velocity roam as mode 2 and went out briefly to give it a try, but as soon as I armed and took off( in attitude mode before switching on velocity roam the flight seemed off, pitching to the rear. Which seems consistent with mag/ACC interference.

Also, I just noticed that my quadcopter graphic on my map seems to be roaming around my front yard maybe 15-20 meters from its true position.

I really appreciate your response; I'm not sure what any of this means. Any idea what could be going on here?
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: hwh on March 24, 2016, 06:21:28 am
If there are only 4 wires coming from that gps then you're not using a mag sensor in it if it has one.  Some people who've purchased gps units that have only 4 wires but say they have a compass have soldered two more wires to the gps and gotten the compass to work.  Some have found that the gps they purchased, despite the markings, didn't have the mag chip in it.  If you open the gps case and post a picture of the board inside someone here can tell you which you have.

The only readily available gps units that use one cable but still have a mag sensor are the DJI Naza gps units and their clones.

I don't see anywhere what version of the software you're using. The I2C external mag and Naza ones are only supported in the next branch of the code, the released 15.09 doesn't support them.  The only external mag supported in 15.09 and earlier is the Platinum (aka v9) gps and it's no longer made.

Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Major Tom on March 24, 2016, 09:41:34 pm
Thank you for the information.

I'm using the 15.09 release of gcs. I'll open up my neo-6m when I get a chance.

I'm wondering if there are any tricks to optimizing performance while using this configuration( gps + onboard mag). My quad is not small, so I might be able to reduce interference. But the unstable characteristics while using attitude mode in Ins13 troubles me.

Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Mateusz on March 24, 2016, 10:04:19 pm
Thank you for the information.

I'm using the 15.09 release of gcs. I'll open up my neo-6m when I get a chance.

I'm wondering if there are any tricks to optimizing performance while using this configuration( gps + onboard mag). My quad is not small, so I might be able to reduce interference. But the unstable characteristics while using attitude mode in Ins13 troubles me.


Also your GPS must have up to date almanac before first flight, let it collect sats and recharge super-capacitor.  It's also good to check if baro is within reasonable range. Some Revo clones had problem with baro, but fixable easily.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Major Tom on March 26, 2016, 05:37:40 pm
Neo-6M sounds good, it has only GPS sats, but maybe thats even better, you dont have spikes when jumping between different systems. It has good mast which wont rotate and looks small, maybe rode could be longer, but nice.

You must have 4 wires for serial (GPS) which are TX, RX, GND and VCC. Usually Magnetometer has 2 wires SCL (clock) and SDA(data) and is powered already from the GPS. So at least 6 wires. Does I2C communication occur (green status) with AuxMag ?

Did you calibrate it ? LibrePilot uses 3D Mag, which means it is also used to determine if aircraft is up or downward orientation.
Another thing is AuxMag must agree with Accelerometer on flight controller. So you must rotate it correctly by setting AuxMagBoard orientation. OP GPS v9 has by default correct orientation 0,0,0 but other Mags may be oriented differently.

I opened up my Neo-6m with compass from BG. I am unable to identify the mag chip on the board. Hopefully someone here can help with that. I do see the pin out on the serial port on the gps has six pins but only four are utilized. It looks like the two unused are labeled "L" and "A." Seems to me that those two must be SCL and SDA. I guess I just need to plug in some wires and find an appropriate plug for I2C when external Mag support becomes a thing in Librepilot.

I finally had a sunny day to experiment with Ins13 a little more. I ran another Mag calibration using the "click 5 times, then rotate on all axis, return to level, then save" method. The Mag alarm stays green now, and after letting the quad sit under battery power for a few minutes before plugging in usb to my PC, I aquire 10 Sats and am able to arm. However, with INS13 enabled I cannot achieve stable flight in attitude mode without constantly fighting drift. It's even more erratic in velocity roam mode.

My Baro seems good in altitude vario, so I'm not sure if that is a problem.

I'm curious, if and when a mag experiences interference, will the mag alarm always react? It's been stable green while motors are running. I have my ESCs mounted on the arms and a solid 2 inches between the bottom of my revo board and my power harness and battery.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: Mateusz on March 26, 2016, 05:56:17 pm
From the picture A983... Is the mag chip. So you have it. You are right about LA pins, just connector has no wires coming out from it ;) two pads close to it might be also connected to L A pins, you can check with multimeter continuity. If that is the case you can easily solder two wires to thise pads or buy cable with 6 wires and connector.

First it is unlikely that your mag is oriented the same way as OP GPS v9, so you need to set its orientation in GCS. Second, you must calibrate with mags Both, but for use set AuxOnly. I would use internal mag just for reference to see if your aux mag is oriented correct. But then I would switch to using only aux mag. Calibration must be performed outdoors, far from metalic elements. Outdoors over oplink is important.

In the next branch there is mag wizard showing agreement between internal mag and aux, as well as percentage of error/disagreement. Its very helpful.

Both mag and gps can never ever happen to jump into orange.

The battery in your gps is super capacitor. It lasts 5-6h usually after charging up for ~15min. So before first flight give gps that time to fetch almanac since it may be outdated. Is it 10 sats used or in view ? In view its not saying how many sats are used. Maybe none ? Is gps also always green ? To get a lock only 1s of gps and mag being green is needed but if it jumps to orange later on you will still have lock, I doubt thats suitable for flying.
Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: rubberducky on October 04, 2016, 09:11:09 pm
Hello,
i finished my revo setup with gps, mag and oplink, there is no alarm, all is green.

Now i want to fly with position hold and RTH, but i does not work.

I think i forget something in the configuration, but i cant find the problem.

Is here anyone who can help me?
Can anyone make some snapshots of a working gps

Thank you
jürgen from germany

Title: Re: Revolution; GPS, Position Hold & Return to Home
Post by: TheOtherCliff on October 18, 2016, 11:34:22 pm
It is very important that you have green mag both on the ground and when flying, and that if you are using aux mag, and that you understand and set the mag "board orientation" correctly.  See the wiki article.

High current wiring pairs (and triplets) need to be twisted together.  Battery to battery connector, battery connector to PDB, PDB to ESC, ESC to motor.

RTH (we call it RTB) is an advanced topic.  Avoid it until you get other GPS flight (VelocityRoam mode) working.  Take off in Attitude mode and switch to VelocityRoam mode.  Stick in the middle it should be the same as PositionHold.  Be ready to quickly switch back to Attitude if your GPS mode starts flying away.  Be ready for it !!!

It will not arm until you have set "Home Location".  It will not arm until the GPS and mag are both green.

It helps a lot to have telemetry so you can see what these are when flying.  A laptop with an OpLink telemetry module plugged in the USB will do this.