Author Topic: Accurate Altitude Representation in WMSK?  (Read 128 times)

cwinslow

  • Newbie
  • *
  • Posts: 2
    • View Profile
Accurate Altitude Representation in WMSK?
« on: June 07, 2019, 06:33:34 AM »
Hello,

I see in the documentation on page 24 and 25 the MoveTo command has an altitude parameter. I am looking for a good conversion tool like how the calculator can convert latitude and longitude to map coordinates, but how I can convert a height in meters of a flying entity to a scale that works on the map. I tried using MoveTo on an entity that was given an altitude of 500 and I could not see him in the game view, and when I looked at the scene view he was 500 Unity meters above the map which was much too far. I've also checked out demo scene 503 with the flying airplane but that just seems to use an arc to travel to another spot on the ground, I need my game object to go to an altitude above a certain position and stay there. The documentation says that the altitude is height in meters from the ground and I have the height in meters of my entity in the real world, so is there a way to convert that to an accurate representation of altitude on the map?

Thanks,
Connor
« Last Edit: June 07, 2019, 06:57:13 AM by Kronnect »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4736
    • View Profile
Re: Accurate Altitude Representation in WMSK?
« Reply #1 on: June 07, 2019, 06:57:02 AM »
The meters refers to world space unitys (meters) but it's not at scale with the world. I'll add support for real altitude in next version.

cwinslow

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Accurate Altitude Representation in WMSK?
« Reply #2 on: June 07, 2019, 06:58:36 AM »
Thank you for the fast reply! I'll keep an eye out for the next version and just do a placeholder conversion for now.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4736
    • View Profile
Re: Accurate Altitude Representation in WMSK?
« Reply #3 on: June 07, 2019, 11:05:02 AM »
The projection used by WMSK is equirectangular which means the unwrapped world rectangle has a 2x1 proportion over a flat surface. The Earth circumference is about 40.075 km at the equatorial line and around 20.000 around the meridional line. One approximation would be to just divide your reference altitude in meters by 20.000 and use that value as the altitude parameter you pass to the Move methods or GameObjectAnimator altitude component.