Jump to content
Sign in to follow this  
Guest

Lat/Lon - Tile Formulas

Recommended Posts

Guest

Ok, Im confused.I thought I thoroughly understood lat/lon conversion formulas. I still think I have them right, because the database work I've done all lined up great... but I notice I cant teleport below 85

Share this post


Link to post
Share on other sites
Guest Colins2

BradIt's the way that the Fly! world is projected.85

Share this post


Link to post
Share on other sites
Guest

Could you please post it here, Colin? Or mail it to me, too. :-)nick@nik2.com

Share this post


Link to post
Share on other sites
Guest Colins2

NickHere is the formula:With an already declared array double zlat[256];void makelat(void){zlat[128]=0;zlat[127]=-1.40625;zlat[129]=1.40625;// northern hemispherefor(int z=130;z<256;z++){ zlat=zlat+(1.40625 *cos(zlat/ RAD)); }//southern hemispherefor(int z=126;z>=0;z--){ zlat=zlat-(1.40625 *cos(zlat/ RAD)); }}(You have to replace the < > with square brackets)1.40625 = 360/256 and is the constant for the longitude boundaries, they never change.It is a form of Mercator projection that varies the lattitude scale so that the longitude scale remains the same.I've also sent you a mail with a spreadsheet.Colin

Share this post


Link to post
Share on other sites
Guest

Ok, I finally got a chance to check out the spreadsheet you sent me Colin, but im a bit confused.If im reading your spreadsheet correctly...for GlobeTile 172:153You list latitudes of (assuming 173 is upperbounds of 172)173

Share this post


Link to post
Share on other sites
Guest Colins2

BradYou are reading the globe tile numbers wrongly.the globe tile numbering is transverse mercator, i.e. long:lat.In the example lattitude is tile 153 and longitude is 172.Colin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...