Idea Shuttle Fleet recompile for Orbiter 2016

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
Where is the translation on the dialog box ?
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Here you go.
hfRp1dp.jpg


I am still not sure if I can make my rms switch reference points.

Code:
VECTOR3 Atlantis::CalcAnimationFKArm() {
	//Do forward kinematics to get the current position of the wrist joint
	double current_phi_s = linterp(0, shoulder_min, 1, shoulder_max, arm_sp);
	double current_phi_e = linterp(0, elbow_min, 1, elbow_max, arm_ep);
	double current_beta_s = linterp(0, -180, 1, 180, arm_sy);
	double current_phi_l = current_phi_s - current_phi_e;
	double rho_e = lu*cos(RAD*current_phi_s);
	double z_e = lu*sin(RAD*current_phi_s);
	double rho_w = rho_e + ll*cos(RAD*current_phi_l);
	double z_w = z_e + ll*sin(RAD*current_phi_l);
	double x_w = rho_w*cos(RAD*current_beta_s);
	double y_w = rho_w*sin(RAD*current_beta_s);
	//  sprintf(oapiDebugString(),"ll %f lu %f arm_sy %f beta_s %f arm_sp %f phi_s %f arm_ep %f phi_e %f FK %f,%f,%f",ll,lu,arm_sy,current_beta_s,arm_sp,current_phi_s,arm_ep,current_phi_e,x_w,y_w,z_w);
	return _V(x_w, y_w, z_w);
}

void Atlantis::SetAnimationIKArm(VECTOR3 arm_wrist_dpos) {
	arm_wrist_pos = CalcAnimationFKArm();
	//Candidate position. Calculate the joints on it... 
	VECTOR3 arm_wrist_cpos = arm_wrist_pos + arm_wrist_dpos;
	double r = length(arm_wrist_cpos);
	double beta_s = DEG*atan2(arm_wrist_cpos.y, arm_wrist_cpos.x);
	double rho = sqrt(arm_wrist_cpos.x*arm_wrist_cpos.x + arm_wrist_cpos.y*arm_wrist_cpos.y);
	double cos_phibar_e = (r*r - lu*lu - ll*ll) / (-2 * lu*ll);
	if (fabs(cos_phibar_e)>1) return;//Can't reach new point with the elbow
	double phi_e = 180 - DEG*acos(cos_phibar_e);
	double cos_phi_s2 = (ll*ll - lu*lu - r*r) / (-2 * lu*r);
	if (fabs(cos_phi_s2)>1) return; //Can't reach with shoulder
	double phi_s = DEG*(atan2(arm_wrist_cpos.z, rho) + acos(cos_phi_s2));
	double anim_phi_s = linterp(shoulder_min, 0, shoulder_max, 1, phi_s);
	double anim_phi_e = linterp(elbow_min, 0, elbow_max, 1, phi_e);
	double anim_beta_s = linterp(-180, 0, 180, 1, beta_s);
	if (anim_beta_s<0 || anim_beta_s>1) return;
	if (anim_phi_s<0 || anim_phi_s>1) return;
	if (anim_phi_e<0 || anim_phi_e>1) return;
	//but only keep it and set the joints if no constraints are violated.

	//Limited IK on the wrist
	double new_phi_l = phi_s - phi_e;
	double current_phi_w = linterp(0, wrist_min, 1, wrist_max, arm_wp);
	double current_phi_s = linterp(0, shoulder_min, 1, shoulder_max, arm_sp);
	double current_phi_e = linterp(0, elbow_min, 1, elbow_max, arm_ep);
	double current_beta_s = linterp(0, -180, 1, 180, arm_sy);
	double current_phi_l = current_phi_s - current_phi_e;
	double new_phi_w = current_phi_w - new_phi_l + current_phi_l;
	double anim_phi_w = linterp(wrist_min, 0, wrist_max, 1, new_phi_w);
	arm_sy = anim_beta_s;
	SetAnimationArm(anim_arm_sy, arm_sy);
	arm_sp = anim_phi_s;
	SetAnimationArm(anim_arm_sp, arm_sp);
	arm_ep = anim_phi_e;
	SetAnimationArm(anim_arm_ep, arm_ep);
	arm_wp = anim_phi_w;
	SetAnimationArm(anim_arm_wp, arm_wp);
	arm_wrist_pos = arm_wrist_cpos;
}
and this:
Code:
//IK setup
	VECTOR3 shoulder_pos = _V(-9.784, -2.10, 2.05);
	VECTOR3 elbow_pos = _V(-3.3, -2.26, 1.7);
	VECTOR3 wrist_pos = _V(3.55, -2.26, 1.7);
	elbow_pos -= shoulder_pos;
	wrist_pos -= shoulder_pos;
	shoulder_pos -= shoulder_pos;
	lu = length(elbow_pos);
	ll = length(elbow_pos - wrist_pos);
	shoulder_neutral = 0.0136; //In anim coordinate
	shoulder_range = 147;      //in deg
	shoulder_min = shoulder_range*-shoulder_neutral; //Min angle, deg
	shoulder_max = shoulder_range*(1 - shoulder_neutral); //Max angle, deg
	elbow_neutral = 0.0123;
	elbow_range = 162;
	elbow_min = elbow_range*-elbow_neutral; //Min angle, deg
	elbow_max = elbow_range*(1 - elbow_neutral); //Max angle, deg
	wrist_neutral = 0.5; //In anim coordinate
	wrist_range = 240;      //in deg
	wrist_min = wrist_range*-wrist_neutral; //Min angle, deg
	wrist_max = wrist_range*(1 - wrist_neutral); //Max angle, deg
	arm_wrist_pos = wrist_pos;
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
You'll have to get it from the SSRMSD code or the SSU RMS code. Both are available aren't they ?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
I have seen the SSU RMS code but not sure about the SSRMSD. But the SSU RMS is coded differently than the Atlantis. So not sure if I can do it
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
If the sf code were available it would make things easier. But I am tring to rework the rms code similar to SS RMS.


https://www.orbiter-forum.com/showthread.php?t=39877

But the big 2 things I can not do is mfd and Auto pilot part.

So if someone wants to help make a mfd similar to SF let me know.

As far as the OBSS I just added a new attachment point for it so it can be rotated out.
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
so a good thing:)
I was running the SSU and was able to switch the modes but still not able to move the arm? I did the CTRL A and saw controlling rms.

Hi, I'm maybe a bit late but if you're still having problem to move the arm, here's how I do it.

  1. PANEL R13L
    PLBAY MECH PWR SYS 1..........................ON (image)
    PLBAY MECH PWR SYS 2..........................ON (image)
    ----
  2. PANEL A8L
    RMS SELECT...........................................PORT (image)
    ---
  3. PANEL A8U
    MASTER ALARM......................................DEPRESSED (image)
    ---
  4. PANEL A8L
    PORT RMS.............................................DEPLOY (image)
    RETENTION LATCHES..............................RELEASE (image)
    ---
  5. PANEL A8U
    SHOULDER BRACE RELEASE.....................hold on PORT for ~10secs (image)
    MODE...................................................SINGLE (so you can move each JOINT one at the time (in RCS rotation mode)
    JOINT...................................................as desired
    MODE...................................................ORB UNL (in RCS translation mide)
    PARAMETER...........................................POSITION X/Y/Z (or as desired/required)
    END EFFECTOR.......................................MODE AUTO


  • Keyboard bindings
    CTRL+A for QWERTY / CTRL+Q for AZERTY.(switching between controlling the RCS or the RMS)
    NUMPAD2
    NUMPAD4
    NUMPAD6
    NUMPAD8
    Arrow Keys............................................(only on ORB UNL and in RCS translation mode)
    Ctrl+Enter............................................(End Effector grapple) wait for CLOSE & CAPTURE talkbacks, then wait 3-4 seconds later, for the RIGID talkback
    Ctrl+Backspace.....................................(End Effector release) same but backward.

Hope that helps :tiphat:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Thanks. I will try it.

So this is what I have so far wiith the OBSS. I made a new attachment so it can roll out.
bbVUcVW.jpg


Then move the rms arm to attach:
0y4CsQT.jpg


But when I restart I get a new position:
9Cpbnci.jpg


I guess that will get fixed when I get the new rms/ssRMS code to work for me
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
You have to have the EE aligned with the grapple fixture exactly, or it shouldn't grapple. That will fix your problem of snappimg to the wrong position.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Ok. I will adjust the grapple distance so it is closer. Of course if I get the SS rms to work then things might be different. A big IF get the SSrms code to work
 
Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
How about the cameras ?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Mine has Camera Shift V and CTrl v in VC. They may need adjusted
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
I'm talking about the EE camera, and the elbow camera. Help to line up with grapples easier.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Me too. Running all sorts of trying to get ssrms code to work
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
So on the OBSS
oWYujfW.jpg

From the sf doc he had the attachment for obss at:
PL1_OFS 2.850 2.150 3.850
PL1_DIR 0.000 1.000 0.000
PL1_ROT 1.000 0.000 0.000

But I can see I need to adjust the point to fit it better into the MPM. But When I move the point the OBSS goes away and ctd. I see why because the rotation vectors are the same. Any ideas.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
I think you are trying to move both attachment points, when you only need to move one.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
I think you are trying to move both attachment points, when you only need to move one.

I only move the one in the shuttle

The SSU looks like it uses this:
Code:
OBSS_ATTACHMENT_POINT+MPM_MESH_OFFSET, _V(0,1,0), _V(0,0,1), "OBSS");

But makes the OBSS 90 degrees out of synch for me.
Code:
armobss_tip[0] = OBSS_POS;
	armobss_tip[1] = OBSS_POS + _V(0.0, 1.0, 0.0);
	armobss_tip[2] = OBSS_POS + _V(1.0, 0.0, 0.0);

Code:
	SetAttachmentParams(OBSS_attach, armobss_tip[0], armobss_tip[1] - armobss_tip[0], armobss_tip[2] - armobss_tip[0]);

Code:
//mpmobss
	static UINT OBSSmpm[1] = { 0 };
	static MGROUP_ROTATE OBSS_A(7, OBSSmpm, 1,_V(2.544, 1.187, 9.613), _V(0, 0, 1), (float)(-30 * RAD)); // -180 .. +180
	anim_MPMOBSS = CreateAnimation(0.0);
	obssparent = AddAnimationComponent(anim_MPMOBSS, 0, 1, &OBSS_A);
	obss_anim[0] = new MGROUP_ROTATE(LOCALVERTEXLIST, MAKEGROUPARRAY(armobss_tip), 3, OBSS_POS, _V(0, 0, 1), (float)(0.0));
	AddAnimationComponent(anim_MPMOBSS, 0, 1, obss_anim[0], obssparent);


---------- Post added at 06:29 PM ---------- Previous post was at 11:58 AM ----------

Not sure what is going on here.
This is the OBSS_SSu attached and it looks good:
Q1Z3zNF.jpg
and here is the UltraOBSS
5tzqLVR.jpg
not sure why the rot is 0,0,0?
UltraOBSS:
Code:
[CHILD_ATTACH_0] ; To MPM's
POS = (-0.13,0.32,2.210)
DIR = (0,-1,0)
ROT = (1,0,0)
ID = "OS"

and SSU _OBSS
Code:
P -0.05 -0.275 1.47 0 -1 0 0 0 1 OS ; To MPM's
 
Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,906
Reaction score
201
Points
138
Location
Cape
Someone rotated it, of course.:yes:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Someone rotated it, of course.:yes:

Well this works for me:
I made a new cfg and used the SSU attachment vector

P -0.13 0.32 2.210 0 -1 0 0 0 1 OS ; To MPM's

Wr9fY0C.jpg



But the odd thing is this Here I just grapped it and lifted it up
ZlRbekw.jpg

ATTACHED 1:1,STS-126
exited and reloaded and now it is this:
xDxd7vc.jpg

here it is
ATTACHED 1:1,STS-126
 
Top