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.

ublox NEO-M8T first impressions…

are far from impressive 🙁

I bought it as I thought it had the broadest set of satellite sources it could read, combined with EMI protection, and a large antenna. The first test was simply to see how many satellites it could find, and it has failed this test magnificently.  After 4 days of testing, running for several hours each day, the most it’s found is 9 (briefly) and normally it’s around 6 or 7.  In contrast, Hermione’s current GPS reader consistently got 9 today (the minimum level for high quality tracking) and my DJI Mavic got 13!

The major problem with this is there’s nothing I can do about it – you just plug it in and read it; there’s no configuration I can tweak or play with.  Oh, and the fact it cost over £100 and the £40 from Amazon is better.

What the GPS saw.

In preparation for the arrival of the M8T, I did a 2m square live flight based on a file controlled flight plan.

Here’s what the ground facing video saw:

What the video saw.

What the video saw.

What the GPS saw was absolutely no change; nada, nix, nichts, null, yet the 36 line results definitely come from the same flight based on the 36 second flight timed by the IMU clock:

latitude, longitude, altitude, satellites, epx, epy
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000
51.000943, -1.000837, 84.400000, 10, 2.323000, 2.514000

So next I did roughly the same, but with a passive flight i.e. with me carrying her around the 2m square course.  Here again is what the GPS saw:

latitude, longitude, altitude, satellites, epx, epy
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000907, -1.000748, 90.500000, 10, 2.254000, 2.500000
51.000913, -1.000755, 85.300000, 10, 2.254000, 2.500000
51.000910, -1.000750, 85.400000, 10, 2.254000, 2.500000
51.000905, -1.000745, 85.500000, 10, 2.254000, 2.500000
51.000902, -1.000738, 85.400000, 10, 2.254000, 2.500000
51.000900, -1.000735, 85.300000, 10, 2.254000, 2.500000
51.000900, -1.000730, 85.200000, 10, 2.254000, 2.500000
51.000903, -1.000723, 85.200000, 10, 2.254000, 2.500000
51.000907, -1.000717, 85.300000, 10, 2.254000, 2.500000
51.000912, -1.000712, 85.200000, 10, 2.254000, 2.500000
51.000913, -1.000707, 85.200000, 10, 2.254000, 2.500000
51.000918, -1.000703, 85.000000, 10, 2.254000, 2.500000
51.000922, -1.000708, 85.100000, 10, 2.254000, 2.500000
51.000925, -1.000715, 85.400000, 10, 2.254000, 2.500000
51.000930, -1.000720, 85.600000, 10, 2.254000, 2.500000
51.000933, -1.000727, 85.500000, 10, 2.254000, 2.500000
51.000932, -1.000737, 85.600000, 10, 2.254000, 2.500000
51.000928, -1.000745, 85.700000, 10, 2.254000, 2.500000
51.000923, -1.000753, 86.100000, 10, 2.254000, 2.500000
51.000920, -1.000760, 85.900000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.500000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.200000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.000000, 10, 2.254000, 2.500000
51.000917, -1.000763, 84.900000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.200000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.300000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.200000, 10, 2.254000, 2.500000
51.000917, -1.000763, 85.000000, 10, 2.254000, 2.500000
51.000917, -1.000765, 85.000000, 10, 2.254000, 2.500000

And a graphical version too this time as there are many different GPS readings:

Trying again

Trying again

Frankly, this is the best I’ve ever seen by a very long way in terms of consistency between each reading and resolution of each reading very much less than a meter.  This strongly suggests the problem is with electrical noise from the motors; if I could move the GPS receiver far away from the motors, the problem would be fixed.  On the plus side, the M8T does include EMI shielding, so I’m hoping this will work.

M8T EMI shielding

M8T EMI shielding

It’ll be arriving later this week.  Fingers crossed!

Ahoy there, matey!

Matey

Matey

No, not the bubble bath I used 40 years ago – this one:

Ublox Neo M8T

Ublox Neo M8T

In my previous post, it’s so clear the problem is in the GPS unit itself that, courtesy of a lead from Ben’s comment on the post, I’m getting one of these Ublox NEO-M8T GPS receivers from Drotek, my friendly French supplier from whom I used to also get the MPU-9250 until I found the Sparkfun one from Pimoroni without the pointless (to me) altimeter.  The NEO-M8T also has an I2C magnetometer to give orientation for the GPS location which I may use, though initially at least, I’ve stick with the one on the MPU-9250 which I have working well.

Fingers crossed, this will solve the problem as otherwise, my project once more may be permanently stuck.

 

Finally worth showing…

First video purely sets some context for the second:

This second is what the post’s about:

So here’s my take on “What was happening”:

The seconds video shows the GPS tracking is essentially working, except for the ‘minor’ fact she completely overran the target landing point, and once again, I ended the flight by encroaching her personal space i.e. the Sweep saw me coming and switched over to an orderly landing.

The problem is, I don’t think the problem’s mine.  Two facts to know before going further: the flight was twenty seconds long and GPS updates happen once per second.  So walking through the various logs from each process involved…

GPS process

GPS process logs

GPS process logs

There’s 18 GPS readings, plus the prerecorded target added to the graph manual by me afterwards.  18 readings is in line with the 20s flight, and the GPS defined distance between take-off and target point is a convincing 2.6m based on what you can see in the video.  What’s wrong is that during the flight, those 18 GPS readings returned only 2 values, shown in blue in the graph; they’re in the correct direction compared to the target which is great, but the distance between them is only about 0.27m.  This then explains everything that was wrong during the flight: because the GPS readings never got to within 1m of the target the flight continued, and because the 2nd point was in the right direction, the flight went in a straight until I got in the way.

Autopilot process

Here’s what the autopilot saw.  All that really matters is there were only 2 distinct GPS reading points, and the autopilot passed those two on to the main motion processing process as distance / direction target:

AP: PHASE CHANGE: RTF
AP: PHASE CHANGE: TAKEOFF
AP: PHASE CHANGE: HOVER
AP: # SATS: ...
AP: PHASE CHANGE: GPS: WHERE AM I?
AP: GPS TRACKING
AP: GPS NEW WAYPOINT
AP: GPS TRACKING UPDATE
AP: PHASE CHANGE: GPS TARGET 3m -151o
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: PHASE CHANGE: GPS TARGET 2m -150o
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: GPS TRACKING UPDATE
AP: PROXIMITY LANDING
AP: PHASE CHANGE: PROXIMITY (0.97m)
AP: LANDING COMPLETE
AP: FINISHED

Motion Process

Motion processing ignores the distance – it just proceeds at a fixed speed in the direction specified.  The flight ends when the GPS process says it is at the target GPS location, so the motion process just keeps moving in the direction defined by autopilot at a fixed speed of 0.3m/s.  The down facing video shows this well.  Note that the -150° yaw specified by the autopilot matches beautifully with the direction flown based on the gyro (where anti/counter clockwise is positive).

Down-facing video

Down-facing video

The flight in reality travelled about 3.7m by the time I got in the way; had she received a GPS point saying she’d overshot, she’d have doubled back, but that never happened.

Why didn’t the GPS receiver not see the movement beyond the first 0.27m?  I’m adamant it ain’t my fault (for a change), and the GPS receiver is the best I’ve found so far when tested passively.  Any ideas anyone?

As a by the by, on the second video, you’ll see both the LiPo (powering the motors) and LiIon (powering the RPi and sensors) now have electronic skiers’ hand / pocket warmers – without these, Hermione struggles to get of the ground, nor read all the sensors now the temperature outside is less than 10°C.

Workable waypoints

With the car off the drive, and selecting waypoints away from significant obstacles, I got this:

Waypoints

Waypoints

Still not perfect – there’s 2.5m meters between the identical start and end points, but it’s good enough.  Waypoint 3 here is probably to blame; I think its distance from waypoint 2 is too far – it’s certainly the most ‘clustered’ point in the test with a tree, a stone wall and overhead telephone wires all within a few meters of it.  The first two waypoints will suffice by starting the flight half way between two and three, so the flight goes south for 4.5m before flying ENE by another 4 meters.  All 3 points (takeoff and the 2 waypoints) have no obstacles, so Sweep can be enabled to land the test flight if a code or GPS waypoint error brings Hermione to within a couple of meters of an obstacle.  That’s what I’ll be trying next.

GPS accuracy vs. consistensy

Sorry it’s been very quiet here.  I have written 5 posts recently but never posted them as they were so uninteresting to write, there’s no way they’d have been interesting to read.  So instead I’ve been quietly refining the autopilot code for GPS waypoint tracking.  Now it’s time to start testing.  First step, passively record pre-flight waypoints to define where the flight should go.  Here’s what I got today morning: 5 waypoints with 3 readings taken at each:

GPS waypoints

GPS waypoints

On the plus side, it’s consistent: like I said, each point on the graph is three or four GPS samples and they are identical.

On the down side, it’s inaccurate: the first four waypoints are plausible in direction / distance / location, but the last one’s direction and distance are very wrong: it should be back at the starting point yet it’s 8 meters away on the graph.  What’s not shown on the graph is the parked car between the first and fourth point which might have affected it due to satellite signals bouncing off it?  So with the car moved, the test was repeated:

GPS waypoints

GPS waypoints

This was a similar, not identical test.  Each point had 3 GPS samples and show excellent consistency again.  However, comparing the distances / directions between the two test graphs…

  • step one is believable in its own right and in comparison with the previous test distance, but they disagree on direction; I suspect both are wrong, and reality lies somewhere in between.
  • step two is believable in its own right and a very close match with the previous test
  • step three seems to only have a passing resemblance in its own right and with comparison with the previous test – I suspect test one’s direction / distance is rearer reality; it’s worth noting that point 4 is nearest to the car
  • step fours distance is reasonable, if perhaps a little long, but the significant disagreement on step three meant it too finished a long way from the starting point – 6.6 meters.

So what does this mean?  Fundamentally, if this is the best possible, then GPS waypoint tracking is too inaccurate to run on my drive and without a new test location, the GPS tracking phase is permanently blocked.  However, the similarity is close enough that I’ll do a few more tests removing all obstacles and hopefully they will provide results which are good enough to proceed.