ubc-minetest-classroom / minetest_classroom

Repo for Mintest Classroom game
GNU General Public License v3.0
10 stars 6 forks source link

Feature/utm coordinates #141

Closed lukasgolson closed 2 years ago

lukasgolson commented 2 years ago

This PR adds the feature request from #77.

lukasgolson commented 2 years ago

Here is an example set of UTM Zone 10N coordinates (in units of meters) to work with for all of the MKRF512 maps:

  • Top (north of map): 5,464,756
  • Bottom (south of map): 5,464,244
  • Left (west of map): 533,244
  • Right (east of map): 533,756

Note that Top - Bottom = 512 and Right - Left = 512, which are (x,z) the dimensions of the world (exclusive of the map barrier). If we include this information as optional input in the map.conf file, then we only need a single pair of tie coordinates (e.g., Top/Left or Bottom/Right) in order to define any other UTM coordinate in the map. The above coordinates are at the center of those nodes at the defined (x,z) position, not the edge, so keep in mind when doing calculations, otherwise the calculations will be off by 0.5 m.

Hopefully this isn't a silly question, I have poor spatial understanding. I was thinking about this issue. Because all coordinates in the realm system, Minetest, and schematics are aligned at the center of the nodes, would the calculations still be off by 0.5m?

pauldpickell commented 2 years ago

In that case, there should be no issue. Just wanted to flag that the local UTM coordinates should be calculated from node centers.