Latitude with NORTH Entries, North of the Equator have POSITIVE Latitude Values up to +90.
Latitude with SOUTH Entries, South of the Equator have NEGATIVE Latitude Values down to -90.
Longitude with WEST entries of the Prime Meridian have NEGATIVE VALUES Out to -180.
Longitude with East entries of the Prime Meridian have POSITIVE VALUES Out to +180.
In an attempt to make this as seamless as possible, based on 1km Mesh Tiles, the following has been set up:
Each DEGREE SQUARE (lat/long) has been divided into a CALCULATED number of tiles across (see chart below), and 112KM
(111.19492664455873km) tiles down. This isn't perfect, as the tiles are 1km squares, and the world isn't square for starters.
There will be overlap. Hopefully it won't be to dificult to make a terrain engine display the "overlaps" together as needed as
they should meld nicely if the data used to create the meshes is reasonably intact. I also have given thought - to other ways
of presenting the information - like tiles that are low resolution - but cover larger square area than 1 km for higher altitude
views.
My first charge is to try to get this working. Once it works - I'm hoping I can take a solid code base and make it more
flexible via changing it to consider the scale automatically via function parameters. "Give me TILE Filename and X,y coord for
Scale Factor X" or some such business.
Some more #'s - Each Latitude Degree contains in it: 111.19492664455873km
Therefore Each Degree (or ONE) divided by this above amount gives you: 0.0089932160591873057074081366006868 Degrees per km.
The HTML File "Calculate Longitude Radial widths.html" that's in the DOCS directory is actually a hacked up web page - whose
source remains intact. (Original:
http://www.movable-type.co.uk/scripts/latlong.html)I tried to make my own web
page - but for some unknown reason - the javascript function that calculates the longitude widths at the various latitudes
would choke on the to Radian function (NumberHere).toRad(); but it wouldn't do so in the orginal web page. Perhaps something in
the html header makes the javascript adhere to a particular "version" of javascript... dunno.. don't care (YET).
Note: I tried converting the formula to the language being used to hack up the USGS data and place it in the
database correctly, but seeing how this also failed - I went with an approximation - via a calculated chart. Perfect? No.
But it should be usuable - and improvements can/will be ongoing if interest and over value of this project warrants it
BTW - I don't care about the north or south pole. Santa Claus already has a GPS
You know, using a GPS to Calculate Lat/Long could plot you in a game - this is obvious - but I find it interesting and cool.
So I just copied the web page above, and added a button called "make chart". It gives you this:
----------------------------------------------------------------
Longitude Radial widths at the various latitudes
----------------------------------------------------------------
Lat: 0 width: 111.19492664455873
Lat: 1 width: 111.17799068882648
Lat: 2 width: 111.12718798166408
Lat: 3 width: 111.04253400159948
Lat: 4 width: 110.92405454092979
Lat: 5 width: 110.77178569784836
...
...
...
Lat: 87 width: 5.819419154609052
Lat: 88 width: 3.8805977812483374
Lat: 89 width: 1.9405944300618482
--------------------------------
I'm currently trying to work out a few things:
1: nailing down the Haversine formula - as opposed to using the chart
2: Nailing down a way to get 10meter EXACT plotting globally - so I can maybe make non-square dead on accurate tiles versus overlap
3: Making the "binary splitter routines" (GridFloat download's from USGS (FLT files)) to tiles (for the tile making process)
I know full well - that it might just make more sense to allow a few "Flaws" and move forward then trying to out do google
[edit] Number 1 - Haversine Formula - Woo Hoo - Got it working up to 15 digits of precision! Visigoth! This means we can plot a specific "DOT" Exactly where it's supposed to go - right inthe correct dir, tile, and X,Y Location! Now I just need to "Remove" the Chart... And use the dynamic calculations instead!