Winter Wondering

Worth reminding yourself of yesterday’s down-facing Mavic video of the flight first.

This graph is made from the raw GPS data from the NEO-M8T – no processing by me other than saving the results to file:

GPS waypoints and flight

GPS waypoints and flight

The grey line is the 3 preset waypoints: orange, red and purple correspond to the same coloured frisbees you can see in the down-facing video from yesterday.  The GPS waypoints on the graph are a very plausible match with their places in the video, both in location of each and the distance and direction between them .

The blue line is Hermione recorded live as she flew to the orange waypoint.

Here are the problems:

  1. Hermione took off from the purple frisbee in real life.  As she took off, she determined her GPS takeoff point dynamically.  This GPS point in the graph is about 4m away from purple waypoint(s) on the graph.
  2. In the video, you can see she flew in the right direction towards and beyond the orange frisbee.  In contrast, she thought from her GPS tracking that she was only ½ way to the orange waypoint, hence the real-world overshoot, and my termination of the flight.
  3. Hermione was travelling at 1m/s and the video back this up.  However the intermediate GPS locations she read suggest more like 0.3m/s based on the fact GPS updates happen at 1Hz.

Both for presetting the waypoints, and during the flight itself, 9 satellites were in use.

While the difference in take-off location of 4m is just about tolerable as a fixed offset, the fact the GPS points suggest 0.3m/s (compared with the real, correct 1m/s) is not and I have absolutely no idea why the NEO-M8T is doing this.

Winter wonderland?

Yes, based upon my walk to the next village shop along a bridleway this morning:

Winter wonderland 1

Winter wonderland 1

Winter wonderland 2

Winter wonderland 2

Sadly no, based on flying Hermione in the park shortly after I got back from my walk:

GPS gave 15 samples corresponding well with the lateral flight time.  However the stats showed it still had 4 meters to reach the first waypoint when I aborted the flight.  I’m not clear as to the cause of this; perhaps how GPS prerecorded the waypoints verses how it then flew towards them?

On the plus point, she

  • flew well at 1m/s despite the reduced contrast for the down-facing video
  • was heading in the right direction.

On the downside, due to weather, start of kids’ school holidays, and Christmas, this may turn out to be my last flight in 2017!

Speedy Gonzales

Currently, all speeds, both horizontally and vertically are set to 0.3m/s for the sake of safety in enclosed arenas like indoors and the walled back garden.  The down side is that in the park with the GPS waypoints perhaps 20m apart, it takes a very long time, often over a minute between waypoints, wearing out the batteries in a few flights.

The limitation other than safety is to ensure the down-facing video can track the difference between frames, which means there needs to be a significant overlap between consecutive frames.

The video runs at 10Hz*.  The RPi camera angle of view (AOV) is 48.8°.  With the camera 1m off the ground (the standard set throughout all flights)**, 48.8° corresponds to 80cm horizontal distance (2 x 1m * tan (AOV / 2)). Assuming there needs to be a 90% overlap between frames to get accurate video macro-block vectors, every 0.1s, Hermione can move up to 8cm (10%) or 0.80m/s compared to the current 0.3m/s.  I’ll be trying this out on the GPS tracking flights in the park tomorrow.


*10Hz seems to be about the highest frequency for the video that the macro-block processing can handle without causing other sensor processing to overflow – specifically the IMU FIFO.

**1 meter height is for the sake of safety, and because the video 320² pixels macro-blocks can resolve distance accurately on grass and gravel.  Doubling the height requires quadrupling the video frame size to 640² to get the same resolution required for grass / gravel, and once again, the processing time required will cause IMU FIFO overflowing.


P.S. The weather isn’t as good as I’d hoped to do the GPS tracking flights in the park yet, but I did take Hermione into the back garden this morning to test her increased horizontal velocity changes; she happily ran at 1m/s over the grass, so that will be the new speed used for the much longer distance GPS flights to reduce Hermione’s flight time and hence her and the DJI Mavic’s battery drain.

Grass mowing followup

Although she wasn’t running full stats, she always logs some core details.  These show that she probably had around 1.5m to reach the target.  At 1m, she moves onto the next target, or lands if there are no more left.  She was probably only a few seconds away from this happening when she flipped.  This is in line with my speculation that the mowing simply was due to the main LiPo no longer having enough power to keep her up in the air.  Post flight checking shows it at 38% which (after 5 years experience) is where flights always go wobbly. It was contact with the ground that triggered the lawn mowing flip.

She took off and hovered pointing roughly upwards in the video, and the GPS had her heading approximately 60° anticlockwire i.e. as Z gyrometer defines the angles in the main motion processing:

RTF
TAKEOFF
HOVER
GPS: WHERE AM I?
GPS TARGET 8m 58o
GPS TARGET 8m 58o
GPS TARGET 8m 58o
GPS TARGET 8m 58o
GPS TARGET 8m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 58o
GPS TARGET 7m 57o
GPS TARGET 7m 58o
GPS TARGET 6m 58o
GPS TARGET 6m 58o
GPS TARGET 6m 57o
GPS TARGET 6m 57o
GPS TARGET 6m 57o
GPS TARGET 6m 56o
GPS TARGET 6m 56o
GPS TARGET 5m 56o
GPS TARGET 5m 56o
GPS TARGET 5m 57o
GPS TARGET 5m 56o
GPS TARGET 5m 57o
GPS TARGET 4m 57o
GPS TARGET 4m 56o
GPS TARGET 4m 55o
GPS TARGET 4m 54o
GPS TARGET 4m 53o
GPS TARGET 3m 52o
GPS TARGET 3m 50o
GPS TARGET 3m 52o
GPS TARGET 3m 53o
GPS TARGET 3m 56o
GPS TARGET 2m 61o
GPS TARGET 2m 62o
GPS TARGET 2m 63o
GPS TARGET 2m 65o
GPS TARGET 2m 66o
GPS TARGET 2m 68o
Flight time 44.65

Next time and weather available is Monday, so I’ll be taking here out again with a set of fully charged batteries to do the same again.  Third time lucky.

Best lawn mower ever!

Note, best watched full screen:

Hermione starts to the right of the video; the yellow frisbee (upper left) identifies the first GPS waypoint she is to reach, the red one (lower left) the second and last where she should land. And she was doing so well right until she reached the first waypoint and flipped over, left mowing the park grass!

Best guess, main battery was running low, she clipped the ground, and flipped.  No real damage done; she’s just outside at the moment drying, so I can brush the grass cuttings off her!

Herding cats

So the GPS waypoint tracking works like a dream.  Trouble is, every other part of the system ganged up so I have nothing to prove the perfect performance to you!

First problem was to get Hermione off the ground; every time she took off, either autumn leaves blew around, or the contours of the park caused the Sweep to see an obstacle and land.  But I did manage one flight clearing going towards the first waypoint before a leaf called time.

Next problem was the phone attached to the Mavic: somehow it booted into an engineers stats mode (i.e. not Android) meaning it’s much harder to control the Mavic with just the RC, and I could not check the video live.

Then one of the Mavix batteries got too low, meaning a landing and swap.

At that point, I called it a day, at which point my piPod WiFi stopped so I had to risk a hard-poweroff on Hermione.

Everybody is now back home and in working order.  Heading back to the park now to rake the autumn leaves away!

 

Park life

Hermione and I went to the play park to test the GPS against a preconfigured 5m square flight.

Video isn’t so great due to looking directly into the low midday sun.  Only real thing of note was that despite the grass having been recently mown (and hence featureless), Hermione did the square beautifully, landing just a few centimetres from where she took off.

More interesting to me was that the ublox NEO-M8T ran through the flight and produced this:

NEO-M8T live tracking

NEO-M8T live tracking

This is well within the bounds of GPS accuracy needed for flight control even though the number of satellites was only 8 at best; 2 samples showed 7 in the 121s flight.

It’s 2pm now and the sun is already setting, but from the above results, I have no choice tomorrow but to do a complete GPS driven flight i.e. a flight which tracks through a set of predefined waypoints.

P.S. I forgot to mention Hermione was pointing roughly south on take off.

P.P.S. It’s now “tomorrow” I referred to above, and the breeze has increased to about 15mph; this is fine in a sheltered area like my garden or drive, but not in the exposed park area required for the GPS tracking flight; also, it’s sub-zero outside, and although the batteries have heaters to keep their chemical ions flowing freely, I don’t.  Testing will resume when the breeze drops and the temperature rises.

Moving to France?

With a lot of help from Drotek’s excellent customer support, the only solution to my GNSS problem may be to move south to 37km SE of Toulouse in France where Drotek are based 🙂

They sent me the following results yesterday from the uCenter ublox app showing the satellites detected by the NEO-M8T I’d sent back to them.  This shows 15 satellites, all but one over 30dB signal strength.

Toulouse GNSS

Toulouse GNSS

This is what I got yesterday indoors: 9 satellites all of whose signal strengths were under 20dB:

Cotswold GNSS

Cotswold GNSS

The plot on the left shows the variance of the fixed location of NEO-M8T sat in my office.  It drifts north / south by nearly 20 meters.  I think this corresponds to the top right locations of satellites: east / west is covered well, but there’s a gaping hole north of me, leading to the north / south drift.

So I went to the field next door…

Neighbouring field

Neighbouring field

and scanned GNSS for several minutes…

9 sats

9 sats

which above is showing 9 satellites available which are all in use; occasionally 10 were available but still only 9 were used.  Graphing the logs from these nine minutes’ samples (10:47:14 – 10:56:16) shows…

9 minutes tracking

9 minutes tracking

…roughly 1m east / west and 1.8m north / south uncertainty.  That’s more than good enough for my GNSS piDrone project to proceded, but with 2 critical dependencies::

  1. I get permission from the farmer to use his field for flying.
  2. the DroTek NEO-M8T EMI shielding works well when the GNSS is running on Hermione when she’s flying.

I suspect #2 will just work.  However I have not idea how to address #1!


P.S. Anyone recognise the painting the GNSS graph portrays?  Adam (as in “and Eve”), Isaac Newton or Leonardo da Vinci? I’m sure there is a classical painting out there, but hours of googling has failed so far.

Pretty useless

I bought a second NEO-M8T to test and installed it on Hermione with a custom dome acrylic case I made:

NEO-M8T hat

NEO-M8T hat

I took her for a couple of live flights, using my now standardized 2m square flight plan.

Here’s what the ground facing video saw…

GFV result

GFV result

and here’s the NEO-M8T equivalent:

NEO-M8T results

NEO-M8T results

On the plus side, it did get updates throughout the flight, unlike any of the previous ones I’ve tried, so it seems the DroTek EMI filter is working well.

On the far more significant downside however, although the GPS could see 10 satellites, it was using just 4 of them.  In comparison, Hermione’s previous mode found 14 and used 10 of this.

Bit stuck now until DroTek get back to me with suggestions; the only suspicion I can see is their choice of GPS aerial to use with the NEO-M8T.

Homeward bound

My NEO-M8T is on its way back to France where DroTek want to check it out: they tell me they routinely get 15 satellites there, whereas in the perfect conditions here this morning, I only got 8!

In the meantime, I’m going to do some tinkering on my list of things to do when I have spare time.  Before I do that, I’ve dropped the latest working code on to GitHub.