Gargantua2024
The Desktop Orbinaut
- Joined
- Oct 14, 2016
- Messages
- 1,010
- Reaction score
- 1,209
- Points
- 128
- Location
- San Jose Del Monte, Bulacan
The side ports are reserved for expansion modules, just like the one render image above
The side ports are reserved for expansion modules, just like the one render image above
double sunangle = atan2(rsunloc.z, rsunloc.y); //
Y is the windows and Z is the docking ports on the long side.View attachment 31645
Yes, this looks much better! Now the solar panels tilt towards the sun,.
Can you apply this for the heat radiators also, this time to face away from the sun?
Or alternatively make the radiators fixed in longitudinal direction.
___
By the way: What are the x-y-z axes of the vessel?
Is z (forward) looking out of the windows?
void OREEFCONN::DoRadRot()
{
if (rad_rot_status == 0)rad_rot_status = 1;
if (rad_rot_status == 1)
{
double Radangle;
VECTOR3 rsun;
VECTOR3 rsuninv;
VECTOR3 rsunloc;
GetGlobalPos(rsun);
rsuninv = _V(-rsun.x, -rsun.y, -rsun.z);
Global2Local(rsuninv, rsunloc);
Radangle = (PI * ((rad_rot_proc * 2))); // current rotation angle of panels
//double sunangle = atan2(-rsunloc.x, rsunloc.z); // current angle of sun on ZX plane relative to z axis
double sunangle = atan2(rsunloc.z, rsunloc.x); // current angle of sun on ZX plane relative to X axis
sunangle = sunangle + PI;
if (sunangle < 0) sunangle = sunangle + (2 * PI); // sanity check - angle always positive
if (sunangle < 0) sunangle = sunangle + (2 * PI); // sanity check - angle always positive
double Radangle_diff = (sunangle - Radangle); // angular difference between sun and panels
int a = 1;
if (Radangle_diff < PI && Radangle_diff > 0)a = 1; // check which way the panels should rotate
else if (Radangle_diff > PI && Radangle_diff > 0)a = -1; // check which way the panels should rotate
else if (Radangle_diff > -PI && Radangle_diff < 0)a = -1; // check which way the panels should rotate
else if (Radangle_diff < -PI && Radangle_diff < 0)a = 1; // check which way the panels should rotate
double max_rot = step_time * SOLP_SPEED * 2 * PI; // check if angular difference
if (Radangle_diff > 0 && Radangle_diff < max_rot) a = 0; // is less than panel rotation
else if (Radangle_diff < 0 && -Radangle_diff < max_rot) a = 0; // during this frame
double de = step_time * SOLP_SPEED;
if (a == 1) rad_rot_proc = (rad_rot_proc + de);
else if (a == -1) rad_rot_proc = (rad_rot_proc - de);
else if (a == 0) rad_rot_proc = sunangle / (2 * PI); // set exactly perpendicular to sun
if (rad_rot_proc > 1) rad_rot_proc = (rad_rot_proc - 1); // range always 0-1
else if (rad_rot_proc < 0) rad_rot_proc = (rad_rot_proc + 1); // range always 0-1
//sprintf(oapiDebugString(), "sunangle %2.2fsunangledf %2.2f rotf %2.2f db %2.2f ", Radangle,angle_diff, rad_rot_proc, de);
SetAnimation(anim_ARRAYSOLROT, rad_rot_proc); // set the animation state and we're done!
}
else if (rad_rot_status == 2)
{
double de = step_time * SOLP_SPEED;
if (rad_rot_proc <= 0.5)
{
rad_rot_proc = rad_rot_proc + de;
if (rad_rot_proc > .5)
{
rad_rot_proc = .5;
rad_rot_status = 3;
}
}
else
{
rad_rot_proc = rad_rot_proc - de;
if (rad_rot_proc >= .5)
{
rad_rot_proc = .5;
rad_rot_status = 3;
}
}
//sprintf(oapiDebugString(), "rad proce %2.2f rad status %d ", rad_rot_proc, rad_rot_status);
if (rad_rot_proc > 1) rad_rot_proc = (1); // range always 0-1
else if (rad_rot_proc < 0) rad_rot_proc = (0); // range always 0-1
SetAnimation(anim_RADIATORSWIVEL, rad_rot_proc);
}
else if (rad_rot_status == 3)SetAnimation(anim_RADIATORSWIVEL, 0.5);
}
I am not sure if I understand that fully. Currently I treat the EVA astronaut like a vessel (with RCS), so it can float free around the station... and use the tether movement rather than rcs