So I am trying to use this code from the shuttle on another vessel
But I get this:
So what should rotm be defined as?
Code:
if (SPIN1 == 1) {//spintable#1
if ((spintable == 1) || (spintable == 3) || (spintable == 4)) {
SPINACC = 5 * 360 / 60;
spintable_vel = spintable_vel + SPINACC * simdt;
spintable_phi = spintable_phi + spintable_vel * simdt;
int multiplier = ((int)spintable_phi) / 360;
if (spintable_vel > (50 * 360 / 60))(spintable_vel = (50 * 360 / 60)); //limit spped
if (spintable_vel == (50 * 360 / 60)) spintable = 3;//speed achieved
spintable_phi = spintable_phi - (double)multiplier * 360;
MATRIX3 spintable_rotmat = rotm(_V(0, 1, 0), spintable_phi * RAD);
SetAttachmentParams(sat_attach1, pl1_ofs, _V(spintable_rotmat.m21, spintable_rotmat.m22, spintable_rotmat.m23), _V(spintable_rotmat.m31, spintable_rotmat.m32, spintable_rotmat.m33));
ATTACHMENTHANDLE ah = GetAttachmentHandle(false, 0);
OBJHANDLE hChild = GetAttachmentStatus(ah);
if (oapiIsVessel(hChild)) { // something is attached!
VESSEL* v = oapiGetVesselInterface(hChild);
// sprintf(oapiDebugString(), "%s is attached",
// v->GetName());
}
}
}
But I get this:
Severity Code Description Project Path File Line Suppression State
Error (active) E0020 identifier "rotm" is undefined VENTUREstar D:\orbiter100830\Orbitersdk\samples\VENTURESTAR D:\orbiter100830\Orbitersdk\samples\VENTURESTAR\VS.cpp 851
So what should rotm be defined as?