LibrePilot Forum

Development => Firmware General => Topic started by: mak24 on July 01, 2016, 08:45:17 pm

Title: GPS No Fix
Post by: mak24 on July 01, 2016, 08:45:17 pm
Hi:

I am new to the quad building hobby.  Trying to get my Revolution board working on my S500 frame.

I tried flying the quad after basic config., without sensor calibration and the quad flew like a "drunken" sailor.  I was advised by one of the members of this forum that I should have done the sensor calibration and was amazed that the quad even armed without the sensor calibration.

Attached my GPS to the main port of CC3D at 57600 baud rate, saved and power cycled.  I believe auto-config worked and GPS got recognized.  Please see the attached screenshot.

Below is my GPS

http://www.banggood.com/Mini-Ublox-7M-GPS-Module-for-CC3D-Naze32-Flip32-SP-F3-Flight-Controller-p-1042849.html

Any assistance is appreciated
Title: Re: GPS No Fix
Post by: hwh on July 01, 2016, 09:13:20 pm
...Any assistance is appreciated
If the gps doesn't get a fix and you're testing it outside, replace the gps.
Title: Re: GPS No Fix
Post by: Mateusz on July 01, 2016, 09:42:00 pm
You need to fix your "drunken flying" behaviour, before even attempting more advanced modes, such as autonomous flight modes with GPS. Adding GPS won't fix that magically, you need first to get copter flying well in Complementary (Basic) before attempting anything more advanced.
Title: Re: GPS No Fix
Post by: mak24 on July 01, 2016, 09:56:47 pm
Thanks very much.  I will contact the vendor to get the replacement.

My copter flew like a "drunken" soldier during its maiden flight.  I raised this question in the forum and a member mentioned that I need to do sensor calibration for a revolution based copter to fly.  Is that correct?  Or should I start a new topic describing this issue?

Below is the thread where I discussed my issue previously

https://forum.librepilot.org/index.php?topic=921.msg13827#msg13827

Thanks kindly
Title: Re: GPS No Fix
Post by: Mateusz on July 01, 2016, 10:09:30 pm
You should read about calibration here
https://librepilot.atlassian.net/wiki/display/LPDOC/Sensor+calibration

If you don't do that. Then you flight-controller basically does not "know" to what level to stabilize, where ground is etc...
Every flight-controller needs sensor calibration always, otherwise it won't work correctly.

I think you should not use GPS now, but start with basic flight modes, using Complementary. Once you become familiar with all the options, and what is needed for GPS flight modes, only then step up to use GPS.
Title: Re: GPS No Fix
Post by: f5soh on July 01, 2016, 10:22:46 pm
All sensor calibration is mostly needed while setup a GPS assisted vehicle to get the best accuracy from the sensors, running INS13.
If you run Complementary, your Revo board should works perfectly at Wizard end with only the level calibration done. Like a CC3D setup.

How is mounted/oriented your Revo board ?

Title: Re: GPS No Fix
Post by: mak24 on July 01, 2016, 10:40:20 pm
Sorry, what does running complementary mean?  Does this mean not using GPS assisted mode?

My FC is mounted facing forward.  Please see the screenshot.  My receiver is at the front of the copter.

FYI.  I had am APM 2.6 working on this quad (I have dropped APM for now.  One of the forum member convinced me:-))

Title: Re: GPS No Fix
Post by: f5soh on July 01, 2016, 11:07:07 pm
Complementary refers to the Basic fusion algorithm used with CC3D, this is the default at wizard end.

Mount looks fine here, sometimes while the board is facing down the level settings are not set correctly.
Maybe you just need to adjust PID for a more locked result.

Please post your config file:
File > Export UAV settings
Title: Re: GPS No Fix
Post by: mak24 on July 01, 2016, 11:11:54 pm
Hi:

Please find attached my config file
Title: Re: GPS No Fix
Post by: f5soh on July 01, 2016, 11:26:43 pm
I see nothing wrong in your config file.

Try adjusting PID, if you have a potentiometer in your radio you can use the last channel input as Accessory for EasyTune.
As a start you can set the Pitch/Roll with same PID.

https://librepilot.atlassian.net/wiki/display/LPDOC/EasyTune

Add some filtering for accelerometers, go to Attitude > filtering
(https://forum.librepilot.org/index.php?action=dlattach;topic=1931.0;attach=3535)
Title: Re: GPS No Fix
Post by: mak24 on July 01, 2016, 11:47:43 pm
Thanks - Will try changing the PIDs

Please see my APM PID settings for this copter.  Using these settings, the copter had a stable non-GPS assisted flight

I have also attached my CC3D PIDs.

In order to copy my APM PIDs to CC3D PID, do I need to change the settings to as follows using Basic Configuration?:

Proportional:
Roll = 15
Pitch = 15
Yaw = 20

Integral:

Roll = 10
Pitch = 10
Yaw = 2

Please advise

Title: Re: GPS No Fix
Post by: f5soh on July 01, 2016, 11:56:46 pm
All those settings are default, no idea about relation between Apm and LP settings.

Try easytune to make your own settings.
Title: Re: GPS No Fix
Post by: mak24 on July 01, 2016, 11:59:06 pm
Got it.  Will try.

Thanks for all the help
Title: Re: GPS No Fix
Post by: mak24 on July 02, 2016, 12:13:27 am
For Easy Tune, does Roll Rate.kp mean Roll rate PID shown in the Easy Tune Video below?

https://www.youtube.com/watch?v=6-CBHgDUF8A

Regards
Title: Re: GPS No Fix
Post by: f5soh on July 02, 2016, 12:26:02 am
You should choose EasyTuneRatePitch  and/or EasyTuneRateRoll

https://librepilot.atlassian.net/wiki/display/LPDOC/EasyTune#EasyTune-Basicsetup
Title: Re: GPS No Fix
Post by: mak24 on July 02, 2016, 05:49:57 am
You were right.  My gains were too high.

I tried using EasyTxpID, but the copter would wobble so much that I could not get to use the potentiometer.

I changed the PIDs to match the PIDs that my APM board showed for this Quad and now it flies. Yay!!!!!

I will do one more test flight and send you video.  I still have ways to go for tuning.  I think I can now start using the Easy TxPID.  ( I still do not fully understand how easy TXPID works, so may need your assistance),

Thanks for all your help so far.  Really appreciate it.
Title: Re: GPS No Fix
Post by: mak24 on July 03, 2016, 01:06:52 am
Thanks so very much for your help.  My copter flew!!

The PIDs/gains were too high.  I brought them down using the PIDs that my APM had by default for this copter.  So the copter is not as responsive as it should be, perhaps the PIDs are too low.  I will be using the Easy Tune to get the Pitch/Roll tuned.  And as I get more experienced, I will use the more advanced way to tune.  It will be a very fun summer.

Thanks once again.  Will keep you posted with my progress.

PS.  As you suggested, I have contacted the vendor to get the GPS issue fixed.  Until it does, I have plenty of tuning that will keep me busy.
Title: Re: GPS No Fix
Post by: mak24 on July 03, 2016, 06:00:25 pm
Hi. Quick update. My copper finally flew.  You were correct. Changed the PID setting to match the settings that I had for my APM board on this quad.  It is a bit sluggish. And I am learning to fly.

I will use the Easy Tune to tune it better.  I am just a bit hazy on the procedures. Will try playing with it and ask for assistance if required.

Thanks so much!!!!
Title: Re: GPS No Fix
Post by: TheOtherCliff on July 03, 2016, 08:50:07 pm
From your picture, the left side of the picture must be the front of the quad.  If not, you have the Revo (its a Revo, not a CC3D) mounted incorrectly and that is your problem.  ESC connections are on the right side.  Receiver plug is on left side.

Make sure that you have the ESCs plugged into the right places.  If it flies at all now (if you can fly it for 60 seconds), that is probably correct.

drunken ... do you mean that it has an oscillation (rocks back and forth several times a second)?

APM PIDs are not what you should be running.  See how their yaw integral is much lower than the others but ours is much higher?

Go back to our default PIDs but (since default value seems to oscillate) multiply each of those 6 numbers by 0.75
If it still oscillates then try default times 0.60
You want them as high as possible but just before oscillation.

I find it odd that a 500 size quad oscillates with PWMSync 490 on stock PID settings.
Title: Re: GPS No Fix
Post by: mak24 on July 27, 2016, 01:51:01 pm
Hi Cliff:

(Sorry for not responding earlier,.  Was waiting for my new GPS to arrive, and it arrived yesterday)

Just wanted to clarify.  I did buy a Revo from banggood, so you are correct it is Revo that I bought from here
http://www.banggood.com/OpenPilot-CC3D-Revolution-Revo-10DOF-STM32F4-Flight-Controller-Staight-Pin-p-1000068.html

I have now posted the picture of my quad where the front of the quad is in the front (12 o'clock), ESCs on the right and the receiver plug is on the left.  Is this the correct orientation of the Revo?.  I had assumed that the arrowhead above the openpilot logo pointed to the front. 

My quad does fly with lower PIDs.  It is a bit sluggish.

Oscillation was the wrong term.  It does not rock back and forth several times a second.  It wobbled, which I controlled by lowering the PIDs considerably

I will try your formula and report back.  Broke my landing gear and have ordered replacement and await arrival.

Today, I will test the GPS no Fix issue with the new GPS and see whether the issue is fixed.  Will report back.
Title: Re: GPS No Fix
Post by: mak24 on July 27, 2016, 03:26:52 pm
GPS No Fix issue remains.  I had open view of the sky.  I let the quad sit for an hour.

Attached is the screenshot of my system tab.  Seems the GPS is configured.

I noticed that I never got any more than 4 satsinview.  It would mostly be 1-2 Satsinview most of the time.  Any ideas to troubleshoot this.  I do have an FTDI card. 

IS there a way to confirm that GPS is working correctly using FTDI and Ublox software?
Title: Re: GPS No Fix
Post by: mak24 on July 29, 2016, 09:59:21 pm
I got my GPS to work.  Yay!! 

Found an article in this forum that showed that disabling Autobauding for the GPS resolves the GPS NoFix issue (Learned to use the FTDI card in the process, I am having  fun!!).

Next  I would like to set my home location, but I am unable to see the map, please see attached.  Is there a setting that I need to choose to enable that?

(Still waiting for my landing gear to arrive, to use Easy TaxPID to tune my copter)

Regards
mak24
Title: Re: GPS No Fix
Post by: Mateusz on July 30, 2016, 09:47:48 am
I saw that you are using LibrePilot 15.09 and I that you are connecting GPS. If your intention is to use flight modes that utilize GPS, you must use external magnetometer. LibrePilot 15.09 supports only external magnetometer in OP GPSv9 units (not produced anymore), be aware chinese produce OP GPS which are completely different design without mag and with cheap antenna, named like that to make money.
If you want external magnetometer required for GPS flight modes, then you must use development "next" branch of LibrePilot with preferably DJI Naza compatible GPS which I would recommend (after changing connector to JST-SH 1.0 - 4 pin).
DJI Naza compatible GPS is supported only in development branch "next".

Internal magnetometer will not work. Internal is only useful to guide you setting orientation of external mag in GCS.
Furthermore, external mag+gps combo must be  mounted on a long 14-16cm mast, but not with single screw that allows rotation of mast, but with at least two. After calibration rotating mast would invalidate that calibration.

Hope that helps.

By the way map works here on "next" development branch.
Title: Re: GPS No Fix
Post by: mak24 on July 30, 2016, 03:26:28 pm
Thanks very kindly mateusz. 

Is it ok for a newbie like me to use the next" branch of LibrePilot?  If so, where can I can get the install files please?

Also, will this GPS work with the "next" branch of LibrePilot? 

http://www.banggood.com/GPS-Compass-Module-for-DJI-NAZA-M-V2-LITE-Flight-Control-System-p-973350.html

Or do you have any recommendations?

Stay Well
Title: Re: GPS No Fix
Post by: Mateusz on July 30, 2016, 04:54:23 pm
1) I think it is OK to use development branch by everyone and I never had problems or saw complains on forum. I see opposite, people build it and fly it. However as it is with GPL free software and especially development code you should always know what you are doing and I can't give 100% guarantee.
2) external mag with linked DJI gps should work,but you need to change connector to match Revo one. You can find cables on eBay in sets of 20 very cheap JST-SH 1.0 with 4 pins.
3) I recommend GPS you linked or what Wagsy uses from this forum
https://www.youtube.com/watch?v=443R9qn3CVw

4) don't forget about mast as mag must be away from other electronics to work, otherwise it won't work.
Title: Re: GPS No Fix
Post by: Mateusz on July 30, 2016, 05:02:34 pm
Forgot, about getting files. Either search forum if someone has build it for Windows or you will have to do it yourself (check wiki how). Sometimes people share builds from time to time. You can also ask someone who provided binary on forum earlier.
Title: Re: GPS No Fix
Post by: Mateusz on July 30, 2016, 05:23:59 pm
Connectors
http://m.ebay.com/itm/20SETS-Mini-Micro-SH-1-0-JST-4-Pin-Connector-plug-Male-with-100MM-cable-female-

Mast
http://m.banggood.com/Folding-GPS-Mount-Support-Holder-For-DJI-ZERO-QAV250-RC-Multicopters-p-983662.html

Something like this but search for a bit longer rod. This one might be too short. Check for 14-16cm. Also don't buy masts on one screw as it may rotate.
Title: Re: GPS No Fix
Post by: mak24 on July 31, 2016, 01:06:04 pm
Thanks so very kindly Wagsy.

I will order the GPS. I have a couple of masts so they will do.

And will start looking into buildings the next branch build. This will keep me busy for a weeks.

Thanks so much

Stay well
Title: Re: GPS No Fix
Post by: mak24 on August 02, 2016, 02:49:06 pm
Sorry - meant to thank you Mateusz!  (And Wagsy as well :))

Could you kindly repost the link to the connectors?

The link below takes me to a generic eBay link
http://m.ebay.com/itm/20SETS-Mini-Micro-SH-1-0-JST-4-Pin-Connector-plug-Male-with-100MM-cable-female

Title: Re: GPS No Fix
Post by: f5soh on August 02, 2016, 03:03:23 pm
http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR0.TRC0.H0.TRS0&_nkw=20SETS-Mini-Micro-SH-1-0-JST-4-Pin-Connector-plug-Male-with-100MM-cable-female&_sacat=0

Should be the first one, check pin number and spacing
Title: Re: GPS No Fix
Post by: mak24 on August 02, 2016, 06:03:40 pm
Thanks kindly.

I was able to find a compiled "next" branch build from this forum and was able to successfully install it on Windows 10 machine (My Ubuntu skills are beginner to intermediate, so will learn to compile builds as I get some more time).

The map seems to be working in "next".  Cannot wait to test the GPS and post a video (I will try to emulate Wagsy's playfulness to the best of my abilities :)).

Thanks for all the help. 
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 02:59:18 am
Finally got the Naza based GPS.  Connected to Revo.  I now get "No GPS" with the Naza based GPS.  (Both with "next and current 15.09)

Same behavior is seen when connecting the UBX based GPS.  This GPS had shown "GPS No Fix" behavior previously. 

Have I messed up the main and flexi ports?  Is there any way to check Main and Flexi port health? 

Thanks in advance
Title: Re: GPS No Fix
Post by: chromvis on August 25, 2016, 05:10:04 am
If GPS sign in System health screen is not crossed out - you probably have normal communication with GPS. You can look at System tab there are GPS display section on the right and check how many satellites it actually see. In my case NAZA (DJI) do not show any satellites positions only numbers.
BTW you can reasonably check GPS operation only outside and far from tall buildings.
For Naza (DJI protocol) it does no matter if you use Flexi or Main port. With UBlox (two connectors if you use magnetometer) you better use Flexi for magnetometer and Main for GPS.
I personally do not see much sense to use GPS without auxiliary magnetometer - you will not get stable GPS dependent flight (positionHold, VelocityRoam, etc.)
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 06:56:37 am
Hi chromvis

Thanks for the prompt reply.  I played around a little bit more.  Think the GPS is not a DJI NAZA compatible.

When I choose DJI in Configuration tab, I get No GPS (See attached).

When I choose UBX, I get no Fix (see attached).

Any ideas?
Title: Re: GPS No Fix
Post by: hwh on August 25, 2016, 07:28:25 am
Post a picture of the board inside the gps and we can tell you if it's a DJI/Naza compatible GPS or not.
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 01:58:30 pm
Attached please see the pics of the 2 GPSs.  Look the same to me.
Title: Re: GPS No Fix
Post by: f5soh on August 25, 2016, 02:08:11 pm
Theses are GPS only.

No Naza gps here for sure, and anyways no Mag chip soldered in both pics.
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 02:18:05 pm
That was a fast response!

I had received both from Banggood.

Here is the link.  One can opt for either a Naze or CC3D
http://www.banggood.com/Mini-Ublox-7M-GPS-Module-for-CC3D-Naze32-Flip32-SP-F3-Flight-Controller-p-1042849.html

I will ask for the refund/replacement.
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 02:55:25 pm
I am going to order 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

Would you be able to tell whether this looks like a good DJ clone with compass/mag?

Thanks in advance
Title: Re: GPS No Fix
Post by: hwh on August 25, 2016, 05:21:47 pm
The last picture in that BG page shows the inside.  That is a clone of the DJI Naza gps and has a mag sensor.  It should work fine with LP.
Title: Re: GPS No Fix
Post by: mak24 on August 25, 2016, 05:24:55 pm
Thanks kindly. Will order this one
Title: Re: GPS No Fix
Post by: hwh on August 25, 2016, 05:32:07 pm
For anyone that's interested in the details:
Title: Re: GPS No Fix
Post by: TheOtherCliff on August 27, 2016, 06:40:37 pm
Naming "Naze32" vs. "Naza" is a bit confusing.

If you haven't ordered yet, here is an authentic Naza/DJI GPS for about $43 shipped.
http://www.ebay.com/itm/251862698572
Title: Re: GPS No Fix
Post by: mak24 on August 27, 2016, 06:46:07 pm
Thanks kindly.

I had ordered the above already. It is a DJI Naza clone, not Naze 32 clone. The reviews said that it was better than DJI Naza original. Fingers crossed. If it does not work then I will move on to your recommendation.

Once again. Thanks
Title: Re: GPS No Fix
Post by: mak24 on October 03, 2016, 03:35:19 am
OK.  So my S500 quad is now flying (the drunken soldier syndrome is gone)

I am not sure if I should be asking this newbie question about GPS, but everyone in this forum is so willing to help, that I am taking a chance.

I received my NAZA compatible GPS.

I found the NAZA GPS pinout here https://forum.librepilot.org/index.php?topic=902.msg6634#msg6634.  I am planning to rewire this GPS for my revo.  Need some help with that.

Attached are the pictures of my GPS. 

I tried to pull out the connector from the GPS, bit it is stuck quite tightly.  Is it OK that I force it out?  I do not want to damage it.

Second option is that I take the wires out of the current connector  that connects to the FC (second picture) and attach Revo specific connector .  The current connector (picture 2) seems tricky.  Not sure how to take the wires out.  I was thinking of using a blade to cut it or soldering gun to burn the top of the conenctor to get the wires out.

Any advice is appreciated.

Title: Re: GPS No Fix
Post by: hwh on October 03, 2016, 06:25:29 am
Most people just cut the black connector off and splice a JST-SH 4 pin connector with wires attached to the cable.  You can buy the connectors with short wires attached on eBay and the Chinese sites.

It's done this way because the SH connectors won't take a wire as large as the one that comes on the GPS.  And the SH connectors require a crimper smaller than most people have.

If you really want to remove the pins from the black connector just push down a little on the tiny tab in the slots shown in your picture and then pull the wire and pin out.
Title: Re: GPS No Fix
Post by: mak24 on October 06, 2016, 03:27:26 am
Thanks kindly.

I have successfully switched the wires in NAZA GPS to Revo pinout.  I was able to get a GPS fix.  I have done the sensor calibration

I assumed that as next step for using GPS assist mode, I just needed to change one of flight modes to one of the GPS modes but am getting Config error.  Please see screenshot.  Will read up more on using GPS modes.
Title: Re: GPS No Fix
Post by: hwh on October 06, 2016, 09:01:49 am
It's hard to say without seeing your full config but I'd guess you should look at Configuration -> Attitude -> Settings -> Attitude Estimation Algorithm.  You probably didn't change it to GPS Navigation (INS13).
Title: Re: GPS No Fix
Post by: mak24 on October 10, 2016, 12:58:23 am
hwh sir!

You were right on the dot. 

I just needed to enable INS per your instruction.  GPS Green, MAG Green.  Did my first position hold, rock solid!!!(Well I have been delinquent on using EasyTune to tune my S500, so it does oscillate a bit.  EasyTune is the next bit that I will tackle).

Tomorrow, i will try Velocity Roam.  I understand, from watching a YoutTube at this link (https://www.youtube.com/watch?v=fM2V3qo6hg8) , that one only uses the pitch and yaw to for maneuvering.  So it may be a good mode for a new pilot. 

Any suggestions?

Once again, thanks so much!!!  I do not think I should call a newbie anymore, thanks to all who have supported me to fly my quad in GPS mode.