ArnhemAnt

  • *
  • 147
When GPS doesn't get a suitable fix?
« on: August 03, 2015, 02:44:20 pm »
Not sure if this is the place to post but here goes - Mods/Admins, please feel free to move this elsewhere if you like.

For quite a few flights, when flying with a FC and GPS, i have struggled to get a 'solid' GPS fix and therefore cannot arm the FC and fly, leaving me with the option of packing up and going home. My situation is different to most as I don't always travel with a computer (laptop) and therefore can't just connect to the GCS and disable the GPS for example.

I have always wondered if there is a way to automatically disable the GPS features if a suitable satellite fix isn't achieved in a suitable timeframe (say 5-10 minutes). If this were possible, then I would still be able to arm and fly my frame, but I just wouldn't have access to the GPS features. Obviously, I would have to ensure at least one of my flight modes was set to something like Attitude/Rattitude, etc.

What do you think? Is this possible or is it something that is merely a pipe dream??
If you do what you need, you’re surviving. If you do what you want, you’re living.

Re: When GPS doesn't get a suitable fix?
« Reply #1 on: August 03, 2015, 11:59:00 pm »
In principle it would not be so hard.
The real issue is defining how it should behave, for example what to do with gps flight modes or when gps became available in mid flight.
The problematic part is to define very well what should be the expected behaviour and how to interact with the user.

ArnhemAnt

  • *
  • 147
Re: When GPS doesn't get a suitable fix?
« Reply #2 on: August 04, 2015, 12:04:28 am »
Would it be as simple as just disabling GPS if suitable lock isn't achieved after a selected timeframe (user defined through GCS). Once this timeframe is up, then no features are available until the board is again repowered.

Another way would be to just disable the GPS and all features with a stick or switch on the Tx.
If you do what you need, you’re surviving. If you do what you want, you’re living.

DanNT

  • *
  • 18
Re: When GPS doesn't get a suitable fix?
« Reply #3 on: August 04, 2015, 12:55:21 am »
Thats a great idea. I'd had the same problem a couple of times when i was first testing my revo (I have since removed the gps as I wasn't using it)..

I've got a Taranis and am using 6pos flight mode switch/s. Being able to disable gps flight modes and features from another channel/switch while the board is disarmed would be great. Assuming you wouldn't want to have that sort of functionality enabled while the board is armed and airborne, could end badly!

ArnhemAnt

  • *
  • 147
Re: When GPS doesn't get a suitable fix?
« Reply #4 on: August 04, 2015, 01:21:57 pm »
Thanks Dan,

I've been giving this a little more thought through the day. Here is a scenario, for want of a better term.

If I had a Tx with more than one set of switches, then shouldn't I be able to assign one switch (only needs to be 2 position) to enable or disable the GPS connectivity to the FC? - regardless of whether I can get a good satellite lock or not.

For example, I currently have a 3 position switch for flight modes and I also have a few spare 2 position switches. By setting the above through the GCS, then I should be able to enable the GPS connectivity and therefore have my 3 position switch assigned to some GPS assisted flight modes.
However, if for some reason I flick that 2 position switch to disable the GPS functionality, then my flight modes would then be assigned to 'standard' flight modes that do not involve the GPS. Again, this would be set up ahead of time in the GCS, AND there would need to be some type of determiner that only enables the switching of GPS/no GPS prior to arming ONLY.

In effect this gives my 3 position switch a total of six flight modes, three involving GPS and three that don't and this is governed by the position of my 2 position switch prior to arming for a flight.

Does this all make sense??? and hopefully, better still, can this actually be achieved through some coding magic and a few alterations to the LibrePilot GCS??

I sure hope the answer is 'YES' on both accounts.
If you do what you need, you’re surviving. If you do what you want, you’re living.

DanNT

  • *
  • 18
Re: When GPS doesn't get a suitable fix?
« Reply #5 on: August 05, 2015, 01:16:31 am »
Thats kinda what my switch mixes do (or did), and yes it makes sense to me. I'm guessing it'll be a code change though as I couldn't see a way to enable / disable devices via switch input.

Its been a while, but I remember having to both Disable GPS and update the Attitude Estimation Algorithm before I could fly my revo's without gps / mag? Does that sound right or am I confusing myself? If so, could we allow a channel assignment to update the alogorithm?

Re: When GPS doesn't get a suitable fix?
« Reply #6 on: August 06, 2015, 09:32:22 am »
I believe you have to change both the sensor fusion algo from INS13 to Complementary and remove any GPS based flight mode.

I think it would be cool to implement a function in eg minoposd to do this via its setup screen.

Since OSD and goggles would have to come along anyway to fly FPV there would not be any extra equipment necessary. Provided one have an OSD on the craft that is...

Re: When GPS doesn't get a suitable fix?
« Reply #7 on: August 06, 2015, 07:48:07 pm »
I'm not expert but I think the complication with this resides in the sensor algorithm, as Slievar has suggested. I believe the INS13 EKF relies on GPS and Mag sensors as part of it's estimation so it would require a switch to Complimentary at the same time.

Another user suggested a similar thing the other day and whilst I think people agreed (sorry, can't remember which forum) the difficulty was the sensor algorithm.

If it is possible to switch sensor algorithm mid-flight, I think it would be cool if the sensor algorithm could be set per flight mode, so that the Revo could just disable the GPS-dependant flight modes if the GPS dropped out. Communicating this event to the user would be difficult, though, and potentially dangerous given that they might be presuming RTB is available when actually it might not be.

Re: When GPS doesn't get a suitable fix?
« Reply #8 on: August 10, 2015, 09:48:46 pm »
With our current code it would require changing from INS13 to ComplemetaryFilter "Attitude Estimation".

You can switch to INS13 even in flight(?) because it likes movement when initializing.

You cannot currently switch to CF in flight because it needs to be perfectly motionless while initing.  It does gyro calibration and it determines what direction is up from the accels at that time.

I would like to see the CF/EKF option be added to the flight mode switch setup instead of using a new channel for a new FC switch type.  The problem would be a new user using that to switch into a CF mode in flight.  Another possibility would be to run both CF and EKF at the same time, if there is enough CPU.  Another possibility would be for the old mode to tell the new mode what direction is up at switch time, but that would mean that a good feature from this would be useless.  That good feature would be a fallback from one mode to the other.  If one mode gets confused (say EKF goes crazy because of bad magnetic fields) it would not be good for EKF to tell CF its crazy information.

ArnhemAnt

  • *
  • 147
Re: When GPS doesn't get a suitable fix?
« Reply #9 on: August 10, 2015, 11:46:30 pm »
Not sure if I am completely understanding what is being said in the posts above. My idea was to ONLY be able to decide whether you are using GPS features or not BEFORE arming the frame. Once armed, you would continue with your selection. If you wanted to change for some reason, you would have to land, disarm and then make the change before arming and flying again.

My main reason for suggesting this is that I have had numerous trips away from home and when I first try to fly (with Revo and GPS) I cannot get a suitable sat lock (open space, no trees, clouds, etc). This has even been the case while powered up and waiting for 30mins. If I was able to turn off (disable GPS features) then I at least still could have been flying.
If you do what you need, you’re surviving. If you do what you want, you’re living.

Re: When GPS doesn't get a suitable fix?
« Reply #10 on: August 23, 2015, 07:37:33 am »
Sorry for the late reply, but here is some info that may help you and others with using a GPS with your FC at the field:

As part of startup, your GPS downloads the almanac (and more), the list of what satellites are where.  That takes 12.5 minutes from first satellite after power on.  Better figure 15 minutes.

Most GPS's have a battery or supercap (equivalent to a smaller battery) to store the almanac.  The OP GPS (supercap) will store it for 5+ hours.  Other GPS's may store it for up to 6 days.  Parts of almanac, etc. get stale in 4 to 24 hours, so you really should do this almanac download at the start of each flying day even if you have a battery that lasts since you flew it last time.  By the way, a supercap doesn't wear out, but a rechargeable cell (battery) can go bad after years of our kind of abuse.  Some GPS's may not have a battery or supercap, but I haven't seen one.

GPS guidelines to make life easier:
- As soon as you get to the field, plug a battery in and let the vehicle sit, right side up, out in the open, for 15 minutes, to acquire the almanac.  After that, for the rest of the flights that day, you should get a good fix in just a minute or two, unless you have a supercap GPS (e.g. an OP GPS) and you let it go without power for 6 hours.  Plug in the power for just a second and the OP GPS supercap will be good for another 5+ hours (my calculation).
- GPS's don't work well in the house.  Being in the woods can hurt reception too.  Being beside a building or a cliff or in a deep valley can cause bad problems by blocking reception from part of the sky.
- If you fly, but then travel a long way with the GPS powered off, and want to fly another flight, you may find that the GPS takes more than a couple minutes to get a good fix.  It thinks it is still back where you flew the first flight.

ArnhemAnt

  • *
  • 147
Re: When GPS doesn't get a suitable fix?
« Reply #11 on: August 23, 2015, 08:01:09 am »
Thanks Cliff,
That's good info and you have mentioned a few things I was unaware of, like the supercap.

I still don't understand why I haven't been able to arm and fly (with GPS) at some places, which are clear, even after waiting at least 30 mins. Maybe the satellites in my area, at that given time, weren't enough to enable the GPS?? Not sure.

Regardless, it would be super cool to be able to control whether we enable or disable the GPS functionality with the flick of a switch on the radio. I know our team of Dev's are working hard at getting a LP release out right now, so maybe, one day down the track, this may become a reality.

Until that time, I'll have to bring my laptop along with me and disable the GPS through the GCS instead, or, better still, have another frame that doesn't have the GPS fitted.
If you do what you need, you’re surviving. If you do what you want, you’re living.

Re: When GPS doesn't get a suitable fix?
« Reply #12 on: August 25, 2015, 12:15:00 pm »
Were you able to verify if it was the GPS which did not get a lock and not a mag alarm?

I brought a quad on a backcountry trip and had to arm it while holding it high in the air for the mags to be OK at that spot.

When you have been carrying quad and all the FPV gear for hours through difficult terrain you really want to be able to fly it :-)

ArnhemAnt

  • *
  • 147
Re: When GPS doesn't get a suitable fix?
« Reply #13 on: August 25, 2015, 12:27:57 pm »
^^ Very interesting point. I did not think of this. How can I check if it is the GPS or the mag alarm?

What you have said makes some sense as the difference in the locations was about a seven hour drive over some very rough terrain. When at 'home' the quad arms just fine and flies very well, but when I go to this other area, it never is able to arm.

Maybe you have found the issue?
If you do what you need, you’re surviving. If you do what you want, you’re living.

Re: When GPS doesn't get a suitable fix?
« Reply #14 on: August 25, 2015, 12:38:52 pm »
If you do not have and OSD the best thing is probably to bring a laptop and connect the GCS via eg Bluetooth or oplink.

Otherwise you can (remove props to be safe) try and arm the quad while holding it in your hand as high as possible.

But let it sit for a while first to ensure you get a GPS lock.