[Math] Convert LLA (long, lat, alt) to flat earth model

coordinate systemsgeodesygeometrytransformational-geometrytrigonometry

I would like to divide the globe into 1000 $\times$ 1000 meter geodesic squares, and then map any long / lat to the applicable square.

The altitude of each block would be the altitude of the earth at the block's center.

Could someone point me in the right direction please as to how to calculate the flat grid and map long/lat to it.

EDIT

Since squares don't map onto a sphere, a solution I thought of is to calculate the circumference for a given latitude (taking into account the 1000 m grid), and divide it into 1000 m blocks (rounded up). So the number of blocks that map around the earth will decrease as we move away from the equator.

The squares will be slightly narrower at the top as we go North, and at the bottom as we go South.

Best Answer

The length of a line of latitude is $4.0075E8 \cos \lambda$ meters, where $\lambda$ is the latitude. Similarly it is $4.0008E8$ meters around a line of longitude due to flattening. So your spacing in latitude is $\frac {360}{40075}$ degrees all the way around. Then at each latitude (it doesn't change much in 1 km) you have a spacing of $\frac {360}{40075 \cos \lambda}$ degrees to get 1 km by 1 km squares.