Coordinates from dGPS Not Accurate

Thanks for the link to DOP info. I will look it over in more detail.

The chip on the dGPS board is an Atmel MEGA328P AU 1544. The antenna is a G223. I hope this helps.

The weather has not been conducive to ongoing tests today, and the neighbors wonder what this nut is doing walking around his driveway under an umbrella and looking at a little box in his hands. In any case, my last test was promising. The NXT reported that the initial dGPS coordinates were within a 10’ diameter circle (box, actually, bordered by lat/lon lines) and so I took a short walk. The subsequent data points followed as they should. I might be on to a working solution. It just a matter of power cycles until I get a good start, at least I hope it continues to look good as a fix.

I find it hard to believe that other users of the dGPS have had this experience. There’s no way, without going through what I am going through, that you could build a robot that would reliably navigate around a parking lot. The error is just too great at times.

Thanks,
Paul

1 Like

Maybe that’s why that particular board has been discontinued? :wink:

Which board do you have? The early one with the DIP or the later one that’s all surface mount with a big battery under it?

I have the later model, and there’s mention of updated firmware.

I found some assets here, including a pinout, but none of the signals are described other than as “a” and “b”.

I also discovered that ev3 files are actually pkzip files that unpack into several assets, one of which is the program which is an XML file.

There’s a GitHub repo for this stuff here:

That just proves you’re a full-fledged member of this forum - Welcome to the club!

I have a GoPiGo3, and I chase my wife around with it. . .

Others have various things that they want to do interesting things with.

I have an article I wrote here on interesting things we do with our 'bots:

I’m also working on a way to easily multi-boot a Raspberry Pi so I can run both Raspbian for Robots AND GoPiGo O/S, (a simpler system that uses Jupyter notebooks, a Blockly-based programming interface, and a bunch of other fun goodies.

I also included a recent version of Raspbian 64-bit beta, I’m trying to re-spin R4R on a 64 bit userland - and not having much success!

@KeithW has a bot with a LIDAR on it, and he’s teaching himself all the fun stuff you can do with Robot O/S (ROS).

@cyclicalobsessive has a robot named “Carl” (Mine’s Charlie), that he wants to be self-aware.

@thomascoyle11859 is busy working on a “DARPA challenge” class of robot and he gave up on the Raspberry Pi, opting instead for the Jetson Nano and Jetson Xavier dev systems from NVIDIA. (I have a Nano, and it’s a BEAST!)

I really haven’t met anyone with a NXT 'bot, so you are especially welcome and we are all interested in what you can do with that thing.

Those projects sound great. I’ll explain my ultimate goal in a moment.

First, I have the new dGPS sensor with the backup battery on the bottom. I have the latest firmware which allows you to access # of sats, HDOP and altitude data.

With regard to my project, I came across a post many years ago where a guy was able to create an autopilot for model airplanes based on the Lego NXT (GEO Crawler 1). I had been in the model airplane hobby since I was about 10 (over half a century ago), and this just blew me away. First, I wasn’t even aware of the NXT, which is essentially a toy for young folks. The idea of a model airplane with autopilot control was the stuff of fantasy at that time. I got actively involved and hoped to make an NXT autopilot myself. However, the associated community took off like a rocket and not long after was offering an autopilot based on the Arduino board (Ardupilot) and NXT was abandoned. Still, I was fascinated and have always wanted to recreate the NXT autopilot. That is my goal. GPS accuracy within, say, a 20’ radius is essential, but I know it can be a lot better than that as I did get an Ardupilot and the GPS data was spot on, way better then even a 10 foot radius. The control was amazing.

So, if I can’t get reliable data out of the dGPS, my project is bust. For me, there are no alternatives. I would love to learn how to code, but I don’t think that’s going to happen. I have to work within the NXT-G environment.

So, we’ll see how this goes.

Paul

1 Like

Paul,

I’m an aircraft buff myself, but have never had the $$$ for anything but silly el-cheapo drones and the like.

There are alternatives.

For just “plane” :wink: fun, the GoPiGo is my choice. True, it won’t fly, but getting something of any size up in the air is a non-trivial task.

GoPiGo O/S is especially designed for beginners. (I’m a programming hack that struggles with Bash scripts. Python? Fuggeddaboutit!)

It has a very well designed scratch-like block programming language that also allows you to see the underlying Python. To be honest, especially if I’m doing proof-of-concept stuff, I always do that stuff in Bloxter. There’s a working GPS for it too, but it’s a 3rd party device. Difficult to find but over in the states where you are you’ll have better luck than I. (I’m stuck here in Moscow Russia until the Coronavirus dies down a bit in the US)

You can use a Pi-3 or 4 and a grove board by seeed studios and build things out of that. (I hate seeed studio’s products and hate to recommend them.)

There’s the Pivot-Pi.

Then there’s the way you’re going. Though how you’re going to hoist a humongous beastie like that NXT behemoth into the air is a mystery to me.

(I just read your link, and that’s a huge beastie)

I really don’t know what to tell you. I"m tempted to say that you’re tilting at windmills, but then again, my multi-boot project using a dip-switch to select the O/S to start at boot time has been called a “unicorn” by others too - and I have that just about busted wide open.

Don’t give up the ship!

Jim

Hi Jim,

I could very well be tilting at windmills. I have gone back-and-forth as to whether or not this is achievable. I have the lifting power, that’s not an issue. I have the sensors, servo multiplexer and NXT servo controller. I have worked out most of the proportional control logic to handle turns and straight flight toward a given waypoint and to maintain a given altitude. Notwithstanding the dGPS issues, I think I’m close to making this work. One concern I have read about from a similar project is sensor vibration. I’ll probably have to convert one of my nitro planes to electric to reduce engine-induced vibration. As you can expect, I’ll do a lot of testing on the ground before I commit to a flight.

You mentioned that you have a dGPS yourself. What has been your experience with the sensor? I bought it a number of years ago but other things kept me from digging into this project. I’m only now seeing the issues with the sensor. Maybe your situation is similar.

In any case, I certainly hope your confinement in Moscow ends soon. My wife and I got our first vaccine shots just this week and go for the second in a month. I think the U.S. is close to getting this under control.

Paul

1 Like

There’s nothing wrong with tilting at windmills, The Wright brothers did that too.

“Go to the moon? Yer daft!”

The list goes on and on. Even if you fail miserably, you still will have accomplished much and will be that much more prepared for the next windmill.

Yes I have one, but all it has done so far is collect dust since I don’t have libraries or programming spec’s for it.

However, the GoPiGo supports i2c and now that I have found what might be usable code samples, I might just try it.

Unfortunately, that’s at the end of a long list of other projects that have a better chance of success. :wink:

I’d love to here about your project as it makes progresses. Pictures are always welcome!

As for me, my own 'bot, Charlie, had a severe accident today, breaking his baseplate clean in half along with possible other damage.

Viz.:
https://forum.dexterindustries.com/t/breaking-news-charlie-critically-injured-more-at-11/8188

In order to assess the damage, (and try to repair it), I had to completely disassemble the poor beastie.

If I can’t repair the broken parts, I have replacements so, eventually, things should work out.

Hi Jim,

I’m sorry to hear about Charlie, but I read the press releases and I’m glad to hear surgery went well.

On the dGPS front, I believe I have the workaround I need. As I mentioned, a good initialization is essential. Why it can initialize itself with an error of as much as 300’ is beyond me, but with good initial coordinates, it works very well. I just have to cycle power until I get a good start.

I did a more extensive test to see how it tracks travel relative to a given waypoint. In the linked screenshot below, my initial point was at the center of the small circle on our driveway. Since I got an initial reading within that circle (or box, really, between lat and lon lines), I walked north and then west toward the waypoint. The long red lines show heading toward and distance from the waypoint at each reading along the way. The yellow lines show my heading while walking and the green ones show angle-of-travel (the sensor provides both). The latter two should be the same, but they must be calculated slightly differently. I was curious, so I captured both.

The long red lines all terminate within a 30 foot radius of the waypoint. That will work for a model airplane circuit. I actually think in practice I can hit a waypoint in a smaller area. It wasn’t easy drawing those lines on the map, so I could be off myself. Also, I never actually walked directly toward the waypoint, which should improve readings over time.

So, things are looking up.

Link to photo:
Screen Capture

Paul

1 Like

The screen-capture link took me to a google login and then to a “it’s not here!” (404) page.

You can upload pictures to the post itself.

Hi Jim,

I was looking for how to post pics and missed it. Thanks.

1 Like

I am assuming that the read lines point toward where the GPS thinks the waypoint is?

A thirty foot radius is still a bit large, (unless you’re a cruise missile). You should, ultimately, be able to get to about 3-5 meters.

The only other constraint I can imagine is the precision of the calculations done by the NXT device itself if there is any interpolation or calculation needed. Or, maybe the precision of the binary representation. These are all potential sources of error.

One other thing: How fresh is the GPS’s battery? If it has to re-calibrate every stinkin’ time - is the battery still good? Or, maybe there’s a jumper somewhere that we both missed that needs to be closed to allow the battery to backup the GPS/NVRAM?

If I could figure out which of the two data pins is the clock and data lines, I could play with the beastie myself - I could wire up a Grove connector to the solder-pads and plug it in.

Looks like you’re making huge progress!

P.S. I long for the day when I live in an area like yours.

This is where I live when I am in Moscow:
(the white circle is our place)


 

And as a humorous aside, this is what Russians think of America’s sanctions:

A bar/pub named “Sanctions”.

Russians have a tradition of naming a mixed drink after significant events.

They created a drink called “Sanctions” which contains no alcohol at all which is their opinion of the sanctions.

On the other hand, there’s a drink called “Coronavirus” which contains, (among other spirits), two or three shots of 200 proof pure grain alcohol, (the canonical recipe specifies raw distilled alcohol or high-octane moonshine), and is guaranteed to bring even the biggest and toughest Russian truck-driver to his knees!

Hi Jim,

That is exactly correct–the red lines point to where the dGPS thinks the waypoint is. That was one of the main reasons for test, to see if my theory holds that a good initial reading means the rest will be good and that individual coordinate readings won’t jump around randomly and widely. In fact, the path plotted from the data points is within a few feet of, or is right on, my actual path. I think the unit is performing better than the red lines indicate. If I have to continue using my initialization test, I’ll want to get that starting circle, or box, as small as possible while not having to go through many power cycles first. Also, the dGPS is limited to 8-digit coordinates, which might limit just how small my box can be before the bordering lat and lon lines merge.

The battery is brand new. I did wonder if removing and/or changing the battery has some sort of reset effect on the unit. I actually removed and re-seated the new battery just to see if I got better results. It had no effect on the randomness of initialization.

I did a search to see if any information was out there on GPS initialization error. While I didn’t find anything that relates to my specific problem, there is a lot of info on GPS initialization in general. Here is an example with some good information:

GPS Initialization

Based on that article, I’ll try moving my unit to different areas with power cycles, and then run my initialization test centered within the starting box and see if I get an immediate good start. However, I have done enough restarts that by now the unit should have gone through any required self-initialization already.

Thank you for your kind remarks about our home. This is our retirement home and we moved here about one and a half years ago. We basically share the woods with the local deer population, along with lots of other critters. There is a lake nearby, but we have never been water-sports people, so we don’t take advantage of that.

Thanks for the photo of your current home. It appears to be a bit wooded as well. During my career I had the great good fortune of traveling, but I never had the opportunity to visit Russia, which, along with China, I would have loved.

Speaking of love, I would love to visit “Sanctions” and have a “Sanctions.” However, I enjoy my eyesight, so I don’t think I would sample the “Coronavirus.”

Paul

1 Like

“Coronavirus” wouldn’t damage your eyesight, that is unless you get a massive concussion falling off of something, as they don’t use denatured alcohol in their drinks.

Eight-bit precision is limiting indeed as an 8-bit signed integer, (which is what I believe is returned), has a resolution range of ±127. A resolution of ±127 represents a maximum resolution of about 0.71 degrees of arc.

A full degree of arc is not a trivial amount, especially as distance increases, which could explain the large magnitude of error at the waypoint.

Wow - 2/3 of a degree of arc. . . I didn’t think the digital resolution wold be that bad.

You should also note that the degree of precision guaranteed by the GPS is at the location of the GPS itself, not the location of some distant object.

Because of the lack of angular precision, (along with accumulated errors in the imprecise data), the HDOP at a location that is even as close as your target can be quite large. Taking that into account, that 30’ circle is pretty darn good.

If you continue to test, you will likely discover that the positional accuracy of the target point increases as you get closer.

It is important to remember as you test, that the primary function of a GPS is to determine YOUR location with precision, not the location of some distant target.

Since positional information is an eight bit signed integer, that would explain the large variation of precision when starting the GPS. The GPS itself, at maximum accuracy, has a variation of no less than 3 meters, often more. Add to that a 2/3 degree dilution of precision in all directions, it’s no wonder that some of your startup positional readings are in the next county!

BTW, according to this article, a full degree, in either direction at your approximate location, is darn close to 70 square miles.

Since your location is being, (at least internally), calculated to a much higher precision than that, obviously there is either some method of calculating position that is much more highly accurate, or the dilution of precision is caused by the ATMEL processor only being 8-bits wide.

Darn good article that explains things remarkably well.

Question:
Once the GPS is started, does the accuracy location change with time? (It should get better) Do you get better initial accuracy if you are out in a large open space instead of near your house and the copse of trees nearby?

One point to note is that automobile GPS’s have two advantages YOU don’t have.

  1. It is programmed to move - and lock - your position to the nearest road. So, even if you are quite distant, it looks like your positional accuracy is quite good. (Assuming you’re out in the open.)

  2. The GPS has mapping and waypoint data built-in. Because of this it has, (at least), two points of reference it can use to determine your position - the satellite position and the known geographic location of various places in the mapping and waypoint data.

  3. Additionally, since the GPS assumes you are on a road, (and not out in a nearby field), it can use that information as part of the calculation of your position.

All of this extra data provides valuable “hinting” data that a smart GPS will use to fine-tune its own positional accuracy over time; gaining the equivalent of additional bits of precision.

An additional data point for you: When traveling around Moscow, the HDOP is often non-trivial and I’ve had my own GPS, (a later model Garmin), warn me about an upcoming turn or exit AFTER I have already passed it!

One other observation:
When I mark a place on the map, it shows the lat/lon data as a relatively long string of numbers, which leads me to believe that the calculation is being done with signed integers that are - at a minimum - 24 bits long and possibly as many as 32 bits of signed precision, (±231 after you subtract the sign bit)

I confess I haven’t been following this thread very closely. So I only just realized you’re making an autopilot for the NXT. Sounds like a fun personal project - I imagine others will be interested as well (e.g. on sites like Hack-a-Day).

I’m a little familiar with ArduPilot - I have a larger robot that I want to use Ardupilot with along with ROS. This led me to the GoPiGo3 as an easier initial learning platform for ROS navigation.

Best of luck with your project - I’m not at the GPS stage. When I am I’m sure I’ll be back to re-read these posts.
/K

1 Like

If they’re using moonshine, depends on the distillation skills of the moonshiner. Never buy from a moonshiner who doesn’t drink their own product :slight_smile:
/K

1 Like

True.

My family comes from a long line of moonshiners in the mountains of Virginia, West Virginia, Kentucky and North Carolina. Where they come from, if moonshine is suspected of being tainted, the locals force the 'shiner to drink his own 'shine to prove it’s OK.

In the commercial sense, there’s moonshine and there’s moonshine.

  • “Commercial” moonshine is a nom de plume for high-strength alcohol and is pure advertising.
  • “Real” moonshine - (samagon - самогон) - is held to high standards by the community it serves. Russians have a very low tolerance for bad booze.
     

“Moonshine” isn’t that uncommon. In the same way that there’s a thriving “home brew” industry in the US - and you can almost buy beer-making kits from WalMart, commercially available and certified stills are available from many sources in Russia and moonshining is an active hobby here.

1 Like

Although I grew up in Arkansas, it wasn’t in the Ozarks, which is where I think of traditional moonshine being distilled, so I didn’t have any personal contact.

My wife is from Ireland, and in college tended bar at a small hotel in west Cork during the summers. There she did make the acquaintance of makers of traditional Irish poitín, or at least friends thereof. When we got married in her hometown in Tipperary, she wanted to have a traditional Irish wedding cake, which is more of a fruitcake than a US wedding cake. And traditionally it’s liberally loaded with poitín. She let her friends know she needed some of the traditional ingredients, and a few days before the wedding a couple of unlabeled glass bottles showed up as an early wedding gift. I was a bit wary of the stuff, but was assured that it was perfectly fine (which it proved to be).

And you’re right - many of the craft distillers in Arkansas make a “Moonshine” now, which I think is essentially their bourbon base that’s higher ABV, and not aged (so no color from the barrels).

I’d still be wary of hobby moonshine unless I knew the person really well. I have a degree in chemistry and have done different kinds of distillation, so I’m well aware that it only takes a little lack of attention on one distillation to make for a very bad product.

/K

1 Like

Ooh! Cool beanies!

I’ve done fractional distillation myself and it’s not a simple task so I know you’re right.

I can’t speak with any confidence but - if I remember rightly - tainted moonshine comes from people who are careless and either don’t keep their still clean and bright inside, or use unsuitable metals - which are considerably less expensive than pure copper sheets and copper rivets.

As far as moonshining goes, there’s a story that circulated in my family about how relatives “gamed” the system during Prohibition.

Background:
Apparently, (as you know), even the best and most well-built still has a limited lifetime, after which it’s usually destroyed so that unscrupulous moonshiners can’t try to repair and re-use it. This would ultimately lead to tainted 'shine and a stain on the entire industry so worn-out stills were deliberately destroyed.

The Story:

It appears that a fairly large number of my relatives from back then were “master moonshiners” and had a large and loyal following for their high quality 'shine.

Other parts of the family had been recruited by the ATF and FBI to help stamp out moonshining in that region. Part of the incentive was a cash bounty for every still they found and destroyed, something like $100 in gold which was huge money in the 1930’s.

To claim the bounty, they had to return with parts of the still, including the “worm” which was the tube used to cool and liquefy the distilled vapors.

Apparently what happened was that the moonshiners would let the “other side of the family” know when a still was going to be taken out of service because it was worn out. The “government” side of the family would then “find” the still, “destroy” it, grab the parts needed, and go claim their bounty.

They would then use the government’s cash to finance the moonshiners by buying the moonshine they were supposed to be eliminating.

This racket went on until WWII if I remember rightly.

What a group!

2 Likes

Really great story. People always figure out a way to work the system.

If I recall it was the use of lead that caused some of the problems of contaminated moonshine (hence favoring copper parts). Methanol has a lower boiling temperature than ethanol, so comes off first. So you have to pay attention to the temperatures to know when you can stop throwing away the distillate and start keeping it from what I recall.
/K

1 Like

I am really getting an education, and not just about GPS, but about alcohol as well. And to think I had been holding off all these years out of concern for my eyesight. :grinning:

Anyway, Hi KeithW. Yes, I am attempting to build an NXT-powered autopilot. As you probably saw in the posts, it’s not an original idea on my part; rather, I hope to recreate what someone else did some time ago. An internet search will turn up a few other NXT autopilot projects, but none made it to the flying stage, other than Chris Anderson’s effort, that I can find. I will come back and post whatever progress I make.

My confidence with the dGPS is growing since I think I have a way to work around what appears to be an initialization issue. It’s a shame that none of the Dexter Industries folks, who might have had some insight into this, are still around. As Jim suggested, maybe this is one reason why the sensor is no longer offered. I actually came across an old link where they were being sold in clearance at $20 per unit. I’m a little surprised that no GPS unit is available for Lego NXT or EV3, but maybe all of the other platforms, e.g. Arduino, Raspberry Pi, etc., have taken over this field.

Thanks,
Paul

1 Like