Question Getting level and tile number from coordinates and span

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Hi,
I've been stuck at getting the tile a proper level and tile number (north - east tile number I mean) from the tile's horizontal/vertical span, and its center coordinates.
I know that a tile vertical span is computed from the level like this:
[math]h=\frac{\pi\cdot R}{2^{(level+8)}}[/math]So I tried reverse engineering the equation to get the level. I got level 8 for a tile with a 20m vertical span. But using the equation above gives me a 305m vertical span. Not good.

For the coordinates, I can easily get the coordinate for the center of the tile, its top left, bottom right, or any point needed to compute the tile's numbers.

The problem is so: how to get a tile level, and its "Orbiter coordinates" ?
Can you guys help me? Thanks in advance. :tiphat:
 

paddy2

Addon Developer
Addon Developer
Joined
Jul 21, 2012
Messages
384
Reaction score
1
Points
18
Location
Kent, UK
I take it you are refering to the Moon, I have a tile with sides of 83.31 metres at the lunar equator. the width is down to 58.91 at 45 degrees north. Could have the earth's radius plugged into one sum and the moon in an other??
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
This was for Earth, and is the Vertical Span, so not changing with the latitude.

I I know that 1 tile from let's day Lvl 8 is 4 from Lvl 9, I can dig on that too.
 
Top