CreateDock(_V(-0.042, 0, 2.136), _V(0, 0, 1), _V(0, -1, 0));
CreateDock(_V(-0.006, 0.000, - 2.125), _V(0, 0, -1), _V(0.500011, -0.866019, 0));
void Atlantis::DoIDARing()
{
if (TUNNELODS == 1) {
VECTOR3 new_dock_pos = _V(-0.042, 2.2250, 8.2264);;
new_dock_pos.y += (soft_capture_ring_proc * 0.4);//0.45
OBJHANDLE v = GetHandle();
int idx = 0; // dock index
OBJHANDLE docked_ship = GetDockStatus(GetDockHandle(0)); // object handle of docked vessel
if (docked_ship != NULL) // make sure handle is valid, if it is...
{
VESSEL* docked = oapiGetVesselInterface(docked_ship); // get VESSEL interface for docked vessel
int dcount = docked->DockCount(); // get number of docking ports
for (int i = 0; i < dcount; i++) // Cycle through ports
{
if (docked->GetDockStatus(docked->GetDockHandle(i)) == GetHandle())
{
idx = i;
docked->Undock(idx, 0);
SetDockParams(hDockODS2, new_dock_pos, SHUTTLE_DOCKDIR, SHUTTLE_DOCKROT);
//sprintf(oapiDebugString(), "SHUTTLE_DOCKDIR.x %lf SHUTTLE_DOCKDIR.y %lf SHUTTLE_DOCKDIR.z %lf SHUTTLE_DOCKROT.x %lf SHUTTLE_DOCKROT.y %lf SHUTTLE_DOCKROT.z %lf", SHUTTLE_DOCKDIR.x, SHUTTLE_DOCKDIR.y, SHUTTLE_DOCKDIR.z, SHUTTLE_DOCKROT.x, SHUTTLE_DOCKROT.y, SHUTTLE_DOCKROT.z);
docked->Dock(v, idx, 0, 0);
}
}
}
else {
SetDockParams(hDockODS2, new_dock_pos, SHUTTLE_DOCKDIR, SHUTTLE_DOCKROT);
}
}
}
CreateDock(_V(-0.006, 0.000, - 2.125), _V(0, 0, -1), _V(0.500011, -0.866019, 0)); which is 30 degrees offsetThanks. That solves that. Now to figure out the issue with the moving dockThe STS-74 image obviously shows the Mir-side of the DM.
//move ods dock
void Atlantis::DoIDARing()
{
if (TUNNELODS == 1) {
VECTOR3 new_dock_pos = _V(-0.042, 2.2250, 8.2264);;
new_dock_pos.y += (soft_capture_ring_proc * 0.4);//0.45
OBJHANDLE v = GetHandle();
int idx = 0; // dock index
OBJHANDLE docked_ship = GetDockStatus(GetDockHandle(0)); // object handle of docked vessel
if (docked_ship != NULL) // make sure handle is valid, if it is...
{
VESSEL* docked = oapiGetVesselInterface(docked_ship); // get VESSEL interface for docked vessel
int dcount = docked->DockCount(); // get number of docking ports
for (int i = 0; i < dcount; i++) // Cycle through ports
{
if (docked->GetDockStatus(docked->GetDockHandle(i)) == GetHandle())
{
idx = i;
docked->Undock(idx, 0);
//SetDockParams(hDockODS2, new_dock_pos, _V(0, 1, 0) , _V(0, 0, -1));
//sprintf(oapiDebugString(), "SHUTTLE_DOCKDIR.x %lf SHUTTLE_DOCKDIR.y %lf SHUTTLE_DOCKDIR.z %lf SHUTTLE_DOCKROT.x %lf SHUTTLE_DOCKROT.y %lf SHUTTLE_DOCKROT.z %lf", SHUTTLE_DOCKDIR.x, SHUTTLE_DOCKDIR.y, SHUTTLE_DOCKDIR.z, SHUTTLE_DOCKROT.x, SHUTTLE_DOCKROT.y, SHUTTLE_DOCKROT.z);
docked->Dock(v, idx, 0, 0);
}
}
//}
}
}
}
CreateDock(_V(-0.042, 0, 2.136), _V(0, 0, 1), _V(0, -1, 0)); MIR
CreateDock(_V(-0.006, 0.000, - 2.125), _V(0, 0, -1), _V(0.500011, -0.866019, 0)); Shuttle
void Atlantis::DoIDARing()
{
//sprintf(oapiDebugString(), "new_dock_pos.y %lf soft_capture_ring_proc %lf ", new_dock_pos.y, soft_capture_ring_proc);
if (TUNNELODS == 1) {
VECTOR3 new_dock_pos = _V(-0.042, 2.2250, 8.2264);;
new_dock_pos.y += (soft_capture_ring_proc * 0.4);//0.45
OBJHANDLE v = GetHandle();
int idx = 0; // dock index
OBJHANDLE docked_ship = GetDockStatus(GetDockHandle(0)); // object handle of docked vessel
if (docked_ship != NULL) // make sure handle is valid, if it is...
{
VESSEL* docked = oapiGetVesselInterface(docked_ship); // get VESSEL interface for docked vessel
int dcount = docked->DockCount(); // get number of docking ports
for (int i = 0; i < dcount; i++) // Cycle through ports
{
if (docked->GetDockStatus(docked->GetDockHandle(i)) == GetHandle())
{
idx = i;
docked->Undock(idx, 0);
SetDockParams(hDockODS2, new_dock_pos, _V(0, 1, 0), _V(0, 0, -1));
docked->Dock(v, idx, 0, 0);
}
}
}
else {
SetDockParams(hDockODS2, new_dock_pos, _V(0, 1, 0), _V(0, 0, -1));
}
}
}
Yes. Because the docking module alignment is 30 degrees off center. It causes the angular rotationSo the thing is, as the ring retraction plays out and it undocks and docks, it induces angular rotation on the shuttle+DM? I had somehow understood it was the docking module's docked angle which was changing.