# How to set vessels position in lua

#### xjflcf520

##### Member
I want to set my vessel‘s position by lua，but I don't know how to realise it

#### kuddel

##### Donator
Donator
As usual I would first consult the manual
\Orbitersdk\doc\orbiter_lua.chm

"Vessel position" is a bit tricky to answer without knowing what exactly you would like to achieve.
For an "orbital" position something like this would do the job:
SQL:
v:set_elements ({a=4000e3, e=0, i=0, theta=0, omegab=0, L=0}, {href=oapi.get_objhandle('moon'), mjd_ref=0, frame='equ'})
With the first table being of type ELEMENTS:
• a semi-major axis [m]
• e eccentricity
• theta longitude of ascending node [rad]
• omegab longitude of ascending node [rad]
• L mean longitude at epoch [rad]
I have no example for a position on the surface of a body, but I guess there is at least one (Lua-)function or forum-member that can help

C++ Question Maintain ISS attitude
Replies
6
Views
514
Replies
0
Views
751
Replies
12
Views
384
Replies
3
Views
240