GPS in an embedded system

To implement a project to use GPS in an embedded system, I need to read a vector map from an SD card, and display it on a small 2.6-inch TFT display. Since the file size of the card can be up to 500MB, I need to extract the most needed data from the origin card.

At first I thought about using .pbf files, but ran into the problem that Garmin uses its own file system. I can’t figure out what to do next.

Is it “an embedded system” that you are creating, or some sort of Garmin device? If the latter, what is it? Many Garmin devices can use maps created from OSM data. See here for a general overview, though it’s not the clearest of wiki pages**.

If you can explain a bit more about what you’re trying to do, people might be able to help. Key things to know, in addition to the system hardware, would be:

  • what area should the map cover?
  • what sort of features should appear on the map?
  • is the map just for display, or for routing as well?

**I’m being polite.

2 Likes

I’m not sure why the constraint of 500 MB, I’ve used multiple Garmin devices (going back to the GPS V, over two decades ago), one (Garmin GPSmap 60CSx…still use it today!) has a microSD card slot that accepts up to 16 GB microSDHC cards (not microSDXC, which are 32 GB up to 2 TB, although I’ve only seen current tech take these up to 1 TB for legitimate cards, supposedly 2 TB µSD cards launched in 2022-Q4). That 16 GB card, formatted as FAT32, necessarily requires file sizes not exceed 4 GB, which makes this a hard limit for Garmin’s maps in devices of this particular vintage (circa 2007). So you might be limited to 500 MB, you might be able to go to 4 GB, filesystem limitations largely guide this.

Learning to live within these limitations, during the 2010s, people published lots of Garmin-compatible maps based on OSM data, always managing to “clip” the geography to something “boxy” (rectangular) and < 4 GB (usually much less, like a “state’s worth of data” instead of “the entire USA’s worth,” which hasn’t fit into 4 GB for many many years, after it’s all “cooked” into Garmin format).

When you say “extract the most needed” data, in essence, based on how you “cook” the data (perhaps starting with .pbf, that’s possible, there are other possibilities) you can make what ends up in Garmin format (trimmed to 500 MB if need be) to be any sort of OSM data. I know this because there are already published on the Internet (look around for “OSM data for Garmin”) that do ski pistes, bike routes, mountain hiking trails, all sorts of “customized” (from OSM) data that you want in the palm of your hand displayed on your TFT. So, there may be such vector map data out there already, (the where, what-sort-of-data and how-large are “the luck of the draw”), but because those “maps” (Garmin data) were made / cooked up, you could cook up exactly what you want, too. There are even sites which allow you to specify the where (and to some degree the what), and “cook it up” for you, emailing you with a link to the results. Well, there were such sites maybe six or eight years ago, I’m not sure now. Many want a donation, which isn’t unreasonable. Some are subscription services where you really must pay before the door is opened or the data are allowed to be downloaded, these might prove to be of value to you.

Study wiki, search the 'net for sites which provide these data (maybe you’ll get lucky and find someone who has published exactly what you’re looking for), maybe learn how to cook these up yourself. “Burning” them to an SD card (micro, HC…) is the easy part. If the format is correct and the “cooking” went well, your TFT display will…(drumroll please) display.

Note that there is a convention on Garmin systems (obviously using their filesystem) of this vintage which is that at the root of the storage device (the microSD card), there must be a folder called “Garmin” and inside this folder there must be a file called “gmapsupp.img” which is the file containing the “cooked” data in Garmin format. Again, this is for my GPSmap 60CSx, your specifics may vary.

You can get there!

(@SomeoneElse is indeed polite; these are difficult pages to navigate and the data may be a decade or more old).

Thanks for the answer.

1 Like