Overlapping S/C in OpenGL during close-range rendezvous simulation
Closed this issue · 1 comments
Howdy!
I'm trying to simulate two S/C that are operating at close proximity (< 100 m). The way I've set up the simulation is to create two reference orbits and two spacecraft that each refers to the respective reference orbit files.
I've verified that PosN
of both S/C behave as expected, as the magnitude of the difference of PosN
vectors of two S/C show correct ranges of values. However, on the OpenGL front end, the two S/C appears completely overlapped at the exact same spot throughout the simulation. Would you be able to tell what the potential issue might be?
I guess I can also set the offsets under the Orbit Parameters
of the SC_*.txt
files, but I'm still curious how the above scenario might work.
Thanks in advance,
Jeff
In case anyone is wondering, under 42gl.c
, FindModelMatrices
function, use
for(i=0;i<3;i++) pbn[i] = (S->PosN[i] - S0->PosN[i]) + B->pn[i] - pcmn[i];
where struct SCType *S0 = &SC[0]
instead of
for(i=0;i<3;i++) pbn[i] = S->PosR[i] + B->pn[i] - pcmn[i];
since PosR
is zero unless the offsets are explicitly set in the SC_*.txt
files.