Android Question GPS ground overlay accuracy

JLM

Member
Licensed User
Longtime User
Hi all,

I need to add a map to my app and overlay a grid at exact coordinates. It will need to show user position standing on the grid as they walk and be accurate to one centimeter...(there's a device called sxblue iii that claims that capability and is compatible with android via bluetooth)

Is this possible?

I'm still new to b4a and im having trouble understanding warwound's tutorial on gps and overlays. Any help will be greatly appreciated.
 

Harris

Expert
Licensed User
Longtime User
Nationwide Differential GPS System (NDGPS)
NDGPS is a ground-based augmentation system that provides increased accuracy and integrity of GPS information to users on U.S. land and waterways. The system consists of the Maritime Differential GPS System operated by the U.S. Coast Guard and an inland component funded by the Department of Transportation. NDGPS is built to international standards, and similar systems have been implemented by 50 countries around the world. Modernization efforts include the High Accuracy NDGPS (HA-NDGPS) system, currently under development, to enhance the performance and provide 10-15 centimeter accuracy with integrity throughout the coverage area. For more information about NDGPS, visit the following webpages:

You shall have to read more... Otherwise - standard GPS is 5 - 15 meters 50% of the time as far as I know.
 
Upvote 0

JLM

Member
Licensed User
Longtime User
Thanks for the reply. And thanks for the information about the NDGPS, I hadn't heard of it until now. I did read about DGPS but needed something that would interact with the tablet.

Let's assume my world is perfect and I have centimeter accuracy:

How would I go about drawing the grid on the tiles? Are the tiles referenced to coordinates when drawn on the map?

I'm trying to learn how to put the overlay/tiles on the map as easy as possible, but also extremely accurate to physical coordinates on the ground.

John
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Do you actually want to:
  • Add a GroundOverlay to a map.
  • Overlay a set of tiles that have the required grid drawn on them.
    • If you have a set of such tiles that are available via HTTP then you could use a UrlTileProvider.
    • I've recently created the CustomTileProvider and this would allow you to create your tiles 'on the fly'.
      Each time the map requires a tile it's request it from your b4a code, you'd have to create a semi-transparent PNG with the grid drawn on it.
      Tile are requested using TileX, TileY and ZoomLevel parameters - these are what are known as 'slippy map' tile names.
      Look HERE and you'll see various methods to convert slippy map tile names into latitude,longitude coordinates.

Martin.
 
Upvote 0

JLM

Member
Licensed User
Longtime User
Do you actually want to:
  • Add a GroundOverlay to a map.
  • Overlay a set of tiles that have the required grid drawn on them.
    • If you have a set of such tiles that are available via HTTP then you could use a UrlTileProvider.
    • I've recently created the CustomTileProvider and this would allow you to create your tiles 'on the fly'.
      Each time the map requires a tile it's request it from your b4a code, you'd have to create a semi-transparent PNG with the grid drawn on it.
      Tile are requested using TileX, TileY and ZoomLevel parameters - these are what are known as 'slippy map' tile names.
      Look HERE and you'll see various methods to convert slippy map tile names into latitude,longitude coordinates.

Martin.

I was hoping you would find your way to my post...

Lets start with: I don't know much about gps, tiles, overlays, etc.

Well, I wasn't sure(still not sure!) whether it would be better/easier to use an overlay or draw my own tiles for my project.

What it really comes down to is that I don't understand fully how it works, and I need to be able to say "your standing directly on top of 'X' location" of this grid with high accuracy.

The grid will not be transparent so I'm assuming either method would work.

I don't have any code for the gps yet, just a gui for the user.

What I need:
  • A grid of 4ft x 4ft squares drawn on the map
  • Grid size will vary by location, but the example will be 40x61 squares
  • Ability to track a person accurately on this grid and draw their position on map as well
As the squares are identical I figured I'd just redraw the same square 2440 times and just change the coordinates for each one.

What I'm really having trouble with is understanding how to draw the squares precisely where they need to be on the map

Thanks

John
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Hi there John.

I think a custom tile layer will be the best solution.
A ground overlay has it's advantages but also it's disadvantages - main problem is that a ground overlay of any significant size will take many MBs of memory space.

Now you have many options (questions to answer):
  • Are your tiles going to be 'ready-rendered' or will you render them on the device as and when they are required by the map?
  • Both the GoogleMaps library and the OSMDroid library use the 'slippy map tile naming method'.
    A tile is identified by an X, a Y and a ZOOM parameter.
    Given an X, Y and ZOOM parameter you will need to establish the geographical bounds that is covered by a tile (say north-east lat,long and south-west lat,long).
    Now decide whether you want to draw one or more grid lines on the tiles - draw any required grid lines.
    Job done - that's one tile rendered.
  • Take a look at this page: https://developers.google.com/maps/documentation/javascript/maptypes#MapCoordinates.
    It should help you visualize how tiles numbers and zoom levels relate to each other.
    You can also view this old map of mine, you can zoom in and out and pan around and you'll see the tile X, Y and ZOOM drawn on the map tiles.

I'd suggest that you download the CustomTileProvider example.
In the Sub CustomTileProvider1_GetTile try to do the maths to work out the geographical bounds of the requested tile and from that bounds decide whether or not you want a grid displayed on the tile.
If you want a grid what pixel co-ordinates would you need to draw on the tile to achieve a 4ft grid?
Leave the Sub so that it still returns Return CustomTileProvider1.NO_TILE, just use the example as a way for you to get an understanding of tile names and geographical bounds.

Martin.
 
Upvote 0

JLM

Member
Licensed User
Longtime User
Thanks for the help Martin!

I'll look into the information you gave me and see what I can do.
 
Upvote 0
Top