Hello, I fear I'm lost again in the void of virtual space :facepalm:
I'm trying to retrieve from the simulation the distance between :
- The Sun and the Earth
- The Sun and the Moon
- The Earth and the Moon
... and, why not, between two any bodies...
This is of course possible since MFDs do it constantly.
I tried to get the Global vectors of the bodies to get started, but CELBODYs are a special family of objects, so it doesn't work (I have a "no possible conversion between CELBODY and OBJHANDLE error)...
I'm trying to determine Earth and Moon shadow cones, and this is going to be a very complex problem I fear... :shifty:
So any help welcome... It's annoying to have a ship coded to overheat because of the Sun heat flux in the shadow of a planet... :dry: :facepalm:
Thanks, :tiphat:
I'm trying to retrieve from the simulation the distance between :
- The Sun and the Earth
- The Sun and the Moon
- The Earth and the Moon
... and, why not, between two any bodies...
This is of course possible since MFDs do it constantly.
I tried to get the Global vectors of the bodies to get started, but CELBODYs are a special family of objects, so it doesn't work (I have a "no possible conversion between CELBODY and OBJHANDLE error)...
Code:
VECTOR3 Earthpos;
Earth = oapiGetGbodyByName("Earth");
CELBODY * EA = oapiGetCelbodyInterface(Earth);
EA->GetGlobalPos(Earthpos);
I'm trying to determine Earth and Moon shadow cones, and this is going to be a very complex problem I fear... :shifty:
So any help welcome... It's annoying to have a ship coded to overheat because of the Sun heat flux in the shadow of a planet... :dry: :facepalm:
Thanks, :tiphat: