Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: Help for ECEF coordinates  (Read 6033 times)

andfly

  • Sr. Member
  • ****
  • Posts: 347
Help for ECEF coordinates
« on: September 17, 2014, 01:37:54 pm »

I have a technical question for cameni.
I hope  have found the right section of the forum (I read support ...).
I need to read the world position in ECEF coordinates of a model using script commands.
This possibility exists without reading the longitude latitude and height through JSBSim and perform a coordinate conversion?
I seemed to have seen it once in the Wiki, the command GET_POS (maybe I just imagined it and now can not find it).
I also tried the command get_pos_offset, but, due to problems of non-comprehension of the English language, I could not figure out if I can be useful, and however, have not been able to get any value (surely I did not use proper grammar).
Can you help me?
« Last Edit: September 17, 2014, 01:45:31 pm by andfly »
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Help for ECEF coordinates
« Reply #1 on: September 17, 2014, 02:04:05 pm »

You can get the ECEF position from the geomob object, via get_pos()

Code: [Select]
var v = this.get_geomob(0);
var ecef = v.get_pos();
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 347
Re: Help for ECEF coordinates
« Reply #2 on: September 17, 2014, 02:45:54 pm »

You can get the ECEF position from the geomob object, via get_pos()

Code: [Select]
var v = this.get_geomob(0);
var ecef = v.get_pos();
Thank you so much for your reply lightning !!!
If I'm not too stressful, can you explain how to read, in the variable "ecef", separate data of the coordinates x, y and z ?
I realize that for those who know Javascript should be elementary, but I did not even know the existence of Javascript before knowing Outerra and I read a manual found on the web just to be able to build something in the world of Anteworld.
Fortunately, my knowledge of the Basic language has allowed me to understand most of the possible commands,but my gaps are still huge ...
I do not claim a programming class and if the answer involves too many basics ...
forget it, no problem!
I will cover the famous manual and I will come to end.

However, really, thank you !!!
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Help for ECEF coordinates
« Reply #3 on: September 17, 2014, 02:48:41 pm »

The returned variable contains x, y and z members, so you just use them simply as ecef.x, ecef.y ...
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 347
Re: Help for ECEF coordinates
« Reply #4 on: September 17, 2014, 02:53:30 pm »

The returned variable contains x, y and z members, so you just use them simply as ecef.x, ecef.y ...
Great !!!

Thanks.
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.