Idea Shuttle Fleet recompile for Orbiter 2016

pappy2

Active member
Joined
May 3, 2012
Messages
398
Reaction score
36
Points
43
.4 is the latest

Hello "gattispilot",
So there is no .3 .OK.
The .4 is the last. OKAY ?

Regarding the file "GUIDANCE" of STS-31, in fact it the target orbit is so high that it is not possible to reach it at one time.





Below is the best initial orbit I found, then it will circularize with OMS engines in manual.

Code:
-30.000 =orbit(111,530,28.45,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
246.0=inverse()
531.0=jettison()

What do you think about it ??
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
Sounds good for me.

---------- Post added at 03:49 PM ---------- Previous post was at 06:48 AM ----------

So I get this for sts31 launch just after MECO
spJnZYu.jpg

and sts 61
YCEjnVM.jpg


---------- Post added at 04:33 PM ---------- Previous post was at 03:49 PM ----------

So I can get this.
egn2xQh.jpg

9wxr65B.jpg


Not sure what is next. But maybe the pallet needs to grap the sat?

I have noticed maybe an issue with the rms. I manually attached but you see the display shows it is not grappled. Also if I release it. I cannot grap it.

The rms attachment point id is XS.
Code:
; === Configuration file for vessel class Satellite ===
ClassName = nasa_mmu
Module = mmu
ImageBmp = Images\Vessels\Default\nasa_mmu.bmp

BEGIN_ATTACHMENT
C -.1 -.3 .95 0 0 -1  0 1 0   BACK
P .75 -0 1.35  0 1 0  1 0 0 XS ;rms TO SATELLITE
END_ATTACHMENT


---------- Post added at 04:53 PM ---------- Previous post was at 04:33 PM ----------

Also may need help on figuring the sting/fake mmu point
M94Z4Ec.jpg
 

Star Voyager

Space Shuttle Refugee
Joined
Oct 25, 2008
Messages
1,975
Reaction score
32
Points
48
Here's a great documentary that should shed some light on the procedures:

 

moonheart

Active member
Joined
Jul 12, 2015
Messages
88
Reaction score
39
Points
33
Great work Gattis - hopefully will work placing the satellites on the pallets.

Good find Star Voyager - great background to a complex mission.
 

Star Voyager

Space Shuttle Refugee
Joined
Oct 25, 2008
Messages
1,975
Reaction score
32
Points
48
Thanks! I included it because the footage of Dale attaching the berthing adapter to the 376 is hard to come by, among other great visuals from the EVAs.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
from the sts51aeva doc:
8. "PYLON RMS PALAPA GRAPPLE" = RMS Grapples the stinger with MMU
and satellite.
9. "RMS TO GARDNER SHIFT+2+F" = Move the RMS to Gardner for
antenna/ABS removal. (654123) View will change to gardner.
10."DETACH PALAPA ONMI-ANTENNA" = When RMS has stopped, remove
the antenna.
11."STOW ONMI-ANTENNA" = Attaches the antenna to pallet.
12."HOLD ABS" = Hold the ABS connector.
13."ABS ATTACH BY GARDNER" = attached the ABS to the satellite.
14."RETURN TO ALLEN" = View change to MMU1.
15."TURN-OVER RMS POSITION/SHIFT+1+F" = Moves the RMS ready for
stinger release and RMS ABS capture. (365412)
16. "TURN-OVER PYLON UNGRAPPLE" = Ungrapples the stinger from the
RMS. Select attitudeMFD mode 3 the select "rms-camera" as target. Translate
away (1 key) from RMS to 5 meters and null any velocity then turn right 90
degrees.(use orbit hud)
17. "TO STS-VC FOR TURN OVER GRAPPLE" = Focus to the STS-VC for
pre grapple. Switch back and forth between the VC and RMS Camera usings
translation thrusters on the STS-VC to match grapple position***. When the
RMS is on the grapple point proceed to next sequence.
18."TURN OVER RMS GRAPPLE" = Grapples the ABS with satellite and
unlocks the stinger from satellite.
19. "RETURN TO MMU/ALLEN" = View change to MMU1 for stowing stinger
and MMU.
20. "STINGER STOW" = Activate then translate from satellite to the pallet in
bay, you must be in range and correct orientation to attach the stinger.
21. "MMU STOW" = Activate then translate to the MMU1 berth position, you
must be in range AND the correct orientation before the MMU can lock back to
the bay.
22. "PALAPA PRE-STOW" = View change to EVA1 Gardner for pre-stowing
palapa-b2 to the pallet.
23. "RMS PALAPA STOW/SHIFT+3+F" = Moves the RMS with satellite to the
pallet for stowing. (654132)
24. "LOCK PALAPA-B2 ON PALLET" = When RMS has stopped, use
sequence to lock the satellite on the pallet

So looking at the press kit ev2 removes the omni antenna and get the ABS and attaches to the sat.

not sure to do all this
 

moonheart

Active member
Joined
Jul 12, 2015
Messages
88
Reaction score
39
Points
33
So my thought is if we can get the eva to capture the satellite then get the arm to grapple and place in the pallet that would be great. I know there are limitations with the program, but would be neat to simulate the capture and return of the two wayward satellites.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
So I need to redo the dll. But I need help in trying to test it. So for this shuttle it is a reverse engineering project.
So rms joints. This is from 2010.
WyIqkyz.jpg

When I select the 1,2,3,4 the target changes. but on the 2016 one it doesn't.
ljPE1K3.jpg


So looking at the eva51a directions he has the rms stored at different positions. So you recall the position and execute.

Code:
ARM_SEQ1 0.6581 0.6966 0.3707 0.2461 0.6324 0.4887
  ARM_SEQ2 0.6095 0.7522 0.9064 0.6738 0.3377 0.6405
  ARM_SEQ3 0.5794 0.5560 0.7062 0.2342 0.4384 0.6225
  ARM_SEQ4 0.5614 0.8862 0.9803 0.2176 0.4373 0.4252
  ARM1SET
  ARM2SET
  ARM3SET
  ARM4SET

I thought I had that working. But I couldn't find what the armset means?
Also in 2010 how to execute the stored position. Also do we need the select joint,.....

---------- Post added at 05:27 AM ---------- Previous post was at 05:25 AM ----------

So my thought is if we can get the eva to capture the satellite then get the arm to grapple and place in the pallet that would be great. I know there are limitations with the program, but would be neat to simulate the capture and return of the two wayward satellites.
I think that can be done. Eva and attach the stinger, attach the sat. Attach rms to mmu guy and position rms so sat is in the holder and attach to pallet
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,924
Reaction score
232
Points
138
Location
Cape
Armset is the settings for all the joints saved in the set. set1,set2 ...etc.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
Thanks. So not sure on the arm if I recall 1 and press execute it should go to those setting, right?

Then there is the sequence?
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,924
Reaction score
232
Points
138
Location
Cape
Correct !!:thumbup:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
Thanks. So what I have is recall the setting and that becomes the TGT. this work:)

Then press execute and then the arm should move to that position.

I am using the stow code where each joint moves til it reaches 0 difference and then goes to the next joint.

On the stow though it goes from the wrist to the shoulder.

For the recall though should it be the opposite.?

I tried running it in 2010 and press the execute button and nothing happen

Also looking at the press kit and the video. It looked like the RMS was Not used.
Code:
if ((rmsexecute == 1) && (recallstored == 2) && (Armtilt_proc == 1)) {
		//sprintf(oapiDebugString(), "arm_wr_stored  %2.2f arm_wr %2.2f ", arm_wr_stored1, arm_wr);
		double t0 = oapiGetSimTime();
		double dt = t0 - center_arm_t;       // time step
		double da = ARM_OPERATING_SPEED*dt;  // total rotation angle
		//sprintf(oapiDebugString(), "arm_wr_stored  %2.2f arm_wr %2.2f ", arm_wr_stored1, arm_wr);


		// work from the wrist down to the shoulder
		if (da && (arm_wr != arm6_Ar)) {    // zero wrist roll
			if (da >= fabs(arm_wr - arm6_Ar)) // finished
				arm_wr = arm6_Ar, da -= fabs(arm_wr - arm6_Ar);
			else
				arm_wr -= (arm_wr > arm6_Ar ? da : -da), da = 0;
			//	sprintf(oapiDebugString(), "arm_wr_stored  %2.2f arm_wr %2.2f arm_speed %2.2f ", arm_wr_stored2, arm_wr, ARM_OPERATING_SPEED);


			SetAnimationArm(anim_arm_wr, arm_wr);
		}

		if (da && (arm_wy != arm6_Ay)) {    // zero wrist yaw
			if (da >= fabs(arm_wy - arm6_Ay)) // finished
				arm_wy = arm6_Ay, da -= fabs(arm_wy - arm6_Ay);
			else
				arm_wy -= (arm_wy > arm6_Ay ? da : -da), da = 0;
			SetAnimationArm(anim_arm_wy, arm_wy);
		}


		if (da && (arm_wp != arm6_Ap)) {    //  wrist pitch not stored value
			if (da >= fabs(arm_wp - arm6_Ap)) // finished
				arm_wp = arm6_Ap, da -= fabs(arm_wp - arm6_Ap);
			else
				arm_wp -= (arm_wp > arm6_Ap ? da : -da), da = 0;
			SetAnimationArm(anim_arm_wp, arm_wp);
		}

		if (da && (arm_ep != arm6_ep)) {    // zero wrist pitch
			if (da >= fabs(arm_ep - arm6_ep)) // finished
				arm_ep = arm6_ep, da -= fabs(arm_ep - arm6_ep);
			else
				arm_ep -= (arm_ep > arm6_ep ? da : -da), da = 0;
			SetAnimationArm(anim_arm_ep, arm_ep);
		}

		if (da && (arm_sy != arm6_By)) {    // zero shoulder yaw
			if (da >= fabs(arm_sy - arm6_By)) // finished
				arm_sy = arm6_By, da -= fabs(arm_sy - arm6_By);
			else
				arm_sy -= (arm_sy > arm6_By ? da : -da), da = 0;
			SetAnimationArm(anim_arm_sy, arm_sy);
		}
		if (da && (arm_sp != arm6_Bp)) {    // zero shoulder yaw
			if (da >= fabs(arm_sp - arm6_Bp)) // finished
				arm_sy = arm6_Bp, da -= fabs(arm_sp - arm6_Bp);
			else
				arm_sy -= (arm_sp > arm6_Bp ? da : -da), da = 0;
			SetAnimationArm(anim_arm_sp, arm_sp);
		}

		center_arm_t = t0;
		if (da) {
			rmsexecute = 0;; // finished stowing
			HWND hDlg = oapiFindDialog(g_Param.hDLL, IDD_RMS);
			if (hDlg) EnableWindow(GetDlgItem(hDlg, IDC_GRAPPLE), FALSE);

		}



	}


---------- Post added at 06:43 PM ---------- Previous post was at 05:07 AM ----------

So I have this now. Recall 4 stored seq and press execute and the rms arms moves.
9gkwHzO.jpg


So in SF there are 3 more rms commands. This is where I am confused
Arm sequence
Select Joint

Sf manual:
Moving the arm using manual inputs into Sequence “TGT”
The “TGT” sequence always starts a scenario with default values stored in it until you
move a previously stored sequence in “A” through “D” into it, however you can change
the values stored in sequence “TGT” by using the CTRL+6 key. When CTRL+6 is used,
a dialog box is called requesting a joint number (1 through 7) and a value for that joint in
degrees (-270 to +270).
Enter the joint number first, a space, and then the value to set the joint to in degrees
(decimals are allowed, so “-189.9” is acceptable). You can continue to use CTRL+6 to
enter all the relevant joint angles, then when you’ve finished the input, select sequence
“F” and the order for joint movements and the arm will reposition to those values you
have input.


So my pressing a joint assign it opens and window and you then enter the joint number and value.

So you are setting the new TGT value for the arm joint. But then do you execute to move the arm there?

And Arm sequence:
The storage location targets are now in the “TGT” position, and the “ERR” or error line
shows the difference between the targets and the current, actual position. Now to move
the arm.
Select key sequence “SHIFT+F” and the following window will appear:
This window will allow us to tell the arm in what order to move the various joints. As a
reminder, the main display tells us each joints number.
For this example, we’ll move the arm starting with the shoulder pitch, then elbow pitch
then finally wrist pitch (the only joints with errors indicated) by entering “234” into the
box. You should NOT enter more than 6 distinct numbers as the remainder will be
ignored.
Once you hit enter, the system will process the order you have provided, and the arm
sequence line will update with the sequence order. To start the arm moving either an
DLH-00101
35 Fleet Version 4.8
item 18 on GPCMFD OPS 8 page needs to be entered, or the motion execute button on
the SRMS display should be depressed:

So then when you press the arm seq button you select which arm joint to move when you press Execute?
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,924
Reaction score
232
Points
138
Location
Cape
Arm sequence is the joint order, and which ones you want to move. You can move any number of joints (1-7) and any order you want. They all move one at a time, in the order you choose. Unless you ad 8 at the end, then they all move at the same time.

Select joint to move a single joint only.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
So I got the select a single joint and position and press execute and move that joint to the new position

Seq though is still an issue.

lHcGkPO.jpg

here I enter seq 123
and enter
LghorsN.jpg


but all the joints moved and the current after are the default.
Code:
sprintf(cbuf, "            SY      SP      EP      WP      WY      WR");
            skp->Text(hps->W / 3, hps->H / 10, cbuf, strlen(cbuf));
            sprintf(cbuf, "(current)%7.2f %7.2f %7.2f %7.2f %7.2f %7.2f", arm_sy, arm_sp,
                arm_ep, arm_wp,arm_wy, arm_wr);
            skp->Text(hps->W / 3, (hps->H / 10) + (hps->Markersize / 2), cbuf, strlen(cbuf));

            sprintf(cbuf, "TGT      %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f  ",     arm6_By, arm6_Bp, arm6_ep, arm6_Ap, arm6_Ay, arm6_Ar);
            skp->Text(hps->W / 3, (hps->H / 10) + (hps->Markersize), cbuf, strlen(cbuf));

            sprintf(cbuf, "ERR      %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f ", arm_sy - arm6_By, arm_sp - arm6_Bp,
                arm_ep - arm6_ep, arm_wp - arm6_Ap, arm_wy - arm6_Ay, arm_wr - arm6_Ar);
            skp->Text(hps->W / 3, (hps->H / 10) + (1.5*hps->Markersize), cbuf, strlen(cbuf));
Code:
void Atlantis::ARMSEQ()
{
    
    armM_Bp = arm6_Bp;
    armM_By = arm6_By;
    armM_ep = arm6_ep;
    armM_Ap = arm6_Ap;
    armM_Ay = arm6_Ay;
    armM_Ar = arm6_Ar;
    oapiOpenInputBox("ARM SEQ", Iteminput, 0, 20, (void*)this);

}
void Atlantis::PosSSRMS(int i)
{

    double dt = oapiGetSimStep();       // time step
    double da = ARM_OPERATING_SPEED*dt*rmsspeed;  // total rotation angle

    switch (armseq[i])
    {
        
    case 1://shoulder yaw 1
        if ((arm_sy != armM_By)) {    // shoulder yaw
            if (da >= fabs(arm_sy - armM_By)) // finished
                SetAnimationArm(anim_arm_sy, armM_By), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_sy, arm_sy + ((arm_sy > armM_By ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
    case 2://shoulder pitch 2
        if ((arm_sp != armM_Bp)) {    // shoulder pitch
            if (da >= fabs(arm_sp - armM_Bp)) // finished
                SetAnimationArm(anim_arm_sy, armM_Bp), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_sy, arm_sp + ((arm_sp > armM_Bp ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
    case 3://elbow pitch 3
        if ((arm_ep != armM_ep)) {    // elbow pitch
            if (da >= fabs(arm_ep - armM_ep)) // finished
                SetAnimationArm(anim_arm_ep, armM_ep), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_ep, arm_ep + ((arm_ep > armM_ep ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
    case 4://wrist oitch 4
        if ((arm_wp != armM_Ap)) {    // wrist pitch
            if (da >= fabs(arm_wp - armM_Ap)) // finished
                SetAnimationArm(anim_arm_wp, armM_Ap), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_wp, arm_wp + ((arm_wp > armM_Ap ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
    case 5://wrist yaw 5
        if ((arm_wy != armM_Ay)) {    // wrist yaw
            if (da >= fabs(arm_wy - armM_Ay)) // finished
                SetAnimationArm(anim_arm_wy, armM_Ay), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_wy, arm_wy + ((arm_wy > armM_Ay ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
    case 6://wrist roll 6
        if ((arm_wr != armM_Ar)) {    // wrist roll
            if (da >= fabs(arm_wr - armM_Ar)) // finished
                SetAnimationArm(anim_arm_wr, armM_Ar), Seqfinished = true;
            else
                SetAnimationArm(anim_arm_wr, arm_wr + ((arm_wr > armM_Ar ? -da : da)));
        }
        else{
            Seqfinished = true;
        }
        break;
        
    case 0:
        Seqfinished = true;
        break;
    }
}
void Atlantis::SeqSSRMS()
{
    if (Seqfinished == true){
        Seqfinished = false;
        armseq[Seqindex] = 0;
        Seqindex += 1;
    }
    if (Seqindex > 5) center_arm = false;
    if (center_arm) PosSSRMS(Seqindex);
}
so as I under stand it. you enter a seq say 1 then it moves joint 1 to the new position.

---------- Post added at 05:29 PM ---------- Previous post was at 06:12 AM ----------

So should the display be in degrees or animation state?
So for display if the Shoulder yaw is .5 it would be 0 but if 0 it would display -180 and 1 180 degrees?

Still haven't figured out the sequence.

I think it works like select the joint and if the animation state is different then move that joint to the target.

---------- Post added at 08:45 PM ---------- Previous post was at 05:29 PM ----------

So in sf on the display it is in degrees and not animation state.

So for Shoulder YAw range is 360 degrees -180 to 180. So (SY*360)-180?
So for Shoulder pitch range is 147 degrees -2 to 145. So (SP*147)-2?


But SY is .25 which shows as +90 and Sp is .1122 which shows as +14.3
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
So I am looking at the SSRMS code.

Code:
void SSRMS::ARMSEQ()
{
			armM_Br = arm6_Br;
			armM_Bp = arm6_Bp;
			armM_By = arm6_By;
			armM_ep = arm6_ep;
			armM_Ap = arm6_Ap;
			armM_Ay = arm6_Ay;
			armM_Ar = arm6_Ar;
			oapiOpenInputBox ("ARM SEQ", Iteminput, 0, 20, (void*)this);		

}

sets the tgt arm values

Code:
// ==============================================================
bool SSRMS::ItemChange (char *rstr)
{
	int ItemValue;
	sscanf (rstr, "%d", &ItemValue);
	DetermineArmSeq(ItemValue);
	center_arm = true;
	Seqindex = 0;
	Seqfinished = false;

	return true;
}
// ==============================================================
void SSRMS::DetermineArmSeq (int ItemValue)
{
	armseq[0] = int(ItemValue/1e6);
	ItemValue = ItemValue - (armseq[0]*1e6);
	armseq[1] = int(ItemValue/1e5);
	ItemValue = ItemValue - (armseq[1]*1e5);
	armseq[2] = int(ItemValue/1e4);
	ItemValue = ItemValue - (armseq[2]*1e4);
	armseq[3] = int(ItemValue/1e3);
	ItemValue = ItemValue - (armseq[3]*1e3);
	armseq[4] = int(ItemValue/1e2);
	ItemValue = ItemValue - (armseq[4]*1e2);
	armseq[5] = int(ItemValue/1e1);
	ItemValue = ItemValue - (armseq[5]*1e1);
	armseq[6] = int(ItemValue);
}
// ==============================================================
void SSRMS::SeqSSRMS()
{
	if (Seqfinished == true){
		Seqfinished = false;
		armseq[Seqindex] = 0;
		Seqindex +=1;
	}
	if (Seqindex > 6) center_arm = false;
	if (center_arm) PosSSRMS(Seqindex);
}
// ==============================================================
void SSRMS::PosSSRMS (int i)
{

	double dt = oapiGetSimStep();       // time step
	double da = JOINT_ROTATION_SPEED*dt*SpeedFactor;  // total rotation angle

	switch (armseq[i])
	{
	case 1:
		if ((joint_angle[0] != armM_Br)) {    // shoulder roll
			if (da >= fabs(joint_angle[0]-armM_Br)) // finished
				SetJointAngle(SHOULDER_ROLL, armM_Br), update_vectors=true, Seqfinished = true;
			else 
				SetJointAngle(SHOULDER_ROLL,joint_angle[0]+((joint_angle[0] > armM_Br ? -da: da))), update_vectors=true;
		}else{
			Seqfinished = true;
		}
		break;

h
Code:
int armseq[8];
	int Seqindex;

So I put a debug to show what the Seqindex was and it listed a lot of numbers it is set as an int.


In SF After playing for a while. I figured it out. That you change the target values either indivudally or in mass by recall.

Then you set the arm seq and hit exec motion and it does it.

In the ssrms code it looks like when you press enter do it. So once I get it going I may need to add that.
 

Donamy

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

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
Thanks.
But not sure why it isn't working for me.

This is the values I get the seq index and armseq0,armseq 5 and item value
y4mqPAR.jpg

Code:
void Atlantis::DetermineArmSeq(int ItemValue)
{
//	armseq[0] = int(	sprintf(oapiDebugString(), " armseq[0] %f armseq[5] %f Seqindex %f ", armseq[0], armseq[5], Seqindex);
// / 1e6);
//	ItemValue = ItemValue - (armseq[0] * 1e6);
	armseq[0] = int(ItemValue / 1e5);
	ItemValue = ItemValue - (armseq[0] * 1e5);
	armseq[1] = int(ItemValue / 1e4);
	ItemValue = ItemValue - (armseq[1] * 1e4);
	armseq[2] = int(ItemValue / 1e3);
	ItemValue = ItemValue - (armseq[2] * 1e3);
	armseq[3] = int(ItemValue / 1e2);
	ItemValue = ItemValue - (armseq[3] * 1e2);
	armseq[4] = int(ItemValue / 1e1);
	ItemValue = ItemValue - (armseq[4] * 1e1);
	armseq[5] = int(ItemValue);
	sprintf(oapiDebugString(), " armseq[0] %f armseq[5] %f Seqindex %d  itemvalue %f ", armseq[0], armseq[5], Seqindex, ItemValue);
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,745
Reaction score
2,726
Points
203
Location
Dallas, TX
So progress I was able to get it to do sequence arm movement. BUT now the stow doesn't work. It goes to .49 rather than .5 and stops
EBO6L9X.jpg

stow code
Code:
if (rmsexecute == 1) {
		if (center_arm)
		{
			double t1 = oapiGetSimTime();
			double dt1 = t1 - center_arm_time;        // time step
			double da1 = ARM_OPERATING_SPEED*dt1;  // total rotation angle
			
			// work from the wrist down to the shoulder
			if (da1 && (arm_wr != 0.5))
			{    // zero wrist roll
				if (da1 >= fabs(arm_wr - 0.5)) // finished
					arm_wr = 0.5, da1 -= fabs(arm_wr - 0.5);
				else
					arm_wr -= (arm_wr > 0.5 ? da1 : -da1), da1 = 0;
				SetAnimationArm(anim_arm_wr, arm_wr);
			}
			//sprintf(oapiDebugString(), "arm_wr  %2.2f  da1 %f dt1 %f t1 %f centert1 %f armspeeded %f", arm_wr, da1, dt1, t1, center_arm_time, ARM_OPERATING_SPEED);

			
			if (da1 && (arm_wy != 0.5)) {    // zero wrist yaw
			if (da1 >= fabs(arm_wy - 0.5)) // finished
			arm_wy = 0.5, da1 -= fabs(arm_wy - 0.5);
			else
			arm_wy -= (arm_wy > 0.5 ? da1 : -da1), da1 = 0;
			SetAnimationArm(anim_arm_wy, arm_wy);
			}
			sprintf(oapiDebugString(), "arm_wr  %2.2f arm_wy  %2.2f da1 %f dt1 %f t1 %f centert1 %f armspeeded %f", arm_wr, arm_wy, da1, dt1, t1, center_arm_time, ARM_OPERATING_SPEED);
			if (da1 && (arm_wp != 0.5)) {    // zero wrist pitch
			if (da1 >= fabs(arm_wp - 0.5)) // finished
			arm_wp = 0.5, da1 -= fabs(arm_wp - 0.5);
			else
			arm_wp -= (arm_wp > 0.5 ? da1 : -da1), da1 = 0;
			SetAnimationArm(anim_arm_wp, arm_wp);
			}
			if (da1 && arm_ep) {             // zero elbow pitch
			if (da1 >= arm_ep)           // finished
			arm_ep = 0.0, da1 -= arm_ep;
			else
			arm_ep -= da1, da1 = 0;
			SetAnimationArm(anim_arm_ep, arm_ep);
			}
			if (da1 && (arm_sy != 0.5)) {    // zero shoulder yaw
			if (da1 >= fabs(arm_sy - 0.5)) // finished
			arm_sy = 0.5, da1 -= fabs(arm_sy - 0.5);
			else
			arm_sy -= (arm_sy > 0.5 ? da1 : -da1), da1 = 0;
			SetAnimationArm(anim_arm_sy, arm_sy);
			}
			if (da1 && arm_sp) {             // zero shoulder pitch
			if (da1 >= arm_sp)           // finished
			arm_sp = 0.0, da1 -= arm_sp;
			else
			arm_sp -= da1, da1 = 0;
			SetAnimationArm(anim_arm_sp, arm_sp);
			}
			
			//sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da1 %2.2f dt %2.2f", arm_sy, arm_sp, da1, dt);
				center_arm_time = t1;
			if (da1) {
				
				center_arm = false; // finished stowing
				rmsexecute = 0;
				HWND hDlg = oapiFindDialog(g_Param.hDLL, IDD_RMS);
				if (hDlg) EnableWindow(GetDlgItem(hDlg, IDC_GRAPPLE), TRUE);
			}
		}
	}

Code:
void Atlantis::PosSSRMS(int i)
{
	double t0 = oapiGetSimTime();
	double dt = t0 - center_arm_t;       // time step
	double da = ARM_OPERATING_SPEED*dt;  // total rotation angle
	
	
	switch (armseq[i])
	{
	case 1:

	
	//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);
	
		if (da && (arm_sy != armM_By)) {    // zero wrist yitch
			if (da >= fabs(arm_sy - armM_By)) // finished
				arm_sy = armM_By, da -= fabs(arm_sy - armM_By);
			else
				arm_sy -= (arm_sy > armM_By ? da : -da), da = 0;
			SetAnimationArm(anim_arm_sy, arm_sy);
		}

		break;

	case 2:


		//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);

		if (da && (arm_sp != armM_Bp)) {    // zero wrist yitch
			if (da >= fabs(arm_sp - armM_Bp)) // finished
				arm_sp = armM_Bp, da -= fabs(arm_sp - armM_Bp);
			else
				arm_sp -= (arm_sp > armM_Bp ? da : -da), da = 0;
			SetAnimationArm(anim_arm_sp, arm_sp);
		}

		break;
	case 3:


		//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);

		if (da && (arm_ep != armM_ep)) {    // zero wrist yitch
			if (da >= fabs(arm_ep - armM_ep)) // finished
				arm_ep = armM_ep, da -= fabs(arm_ep - armM_ep);
			else
				arm_ep -= (arm_ep > armM_ep ? da : -da), da = 0;
			SetAnimationArm(anim_arm_sp, arm_sp);
		}

		break;

	case 4:


		//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);

		if (da && (arm_wp != armM_Ap)) {    // zero wrist yitch
			if (da >= fabs(arm_wp - armM_Ap)) // finished
				arm_wp = armM_Ap, da -= fabs(arm_wp - armM_Ap);
			else
				arm_wp -= (arm_wp > armM_Ap ? da : -da), da = 0;
			SetAnimationArm(anim_arm_wp, arm_wp);
		}

		break;

	case 5:


		//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);

		if (da && (arm_wy != armM_Ay)) {    // zero wrist yitch
			if (da >= fabs(arm_wy - armM_Ay)) // finished
				arm_wy = armM_Ay, da -= fabs(arm_wy - armM_Ay);
			else
				arm_wy -= (arm_wy > armM_Ay ? da : -da), da = 0;
			SetAnimationArm(anim_arm_wy, arm_wy);
		}

		break;

	case 6:


		//	sprintf(oapiDebugString(), "arm_sy  %2.2f armM_sy %2.2f da %2.2f", arm_sy, armM_By, da);

		if (da && (arm_wr != armM_Ar)) {    // zero wrist yitch
			if (da >= fabs(arm_wr - armM_Ar)) // finished
				arm_wr = armM_Ar, da -= fabs(arm_wr - armM_Ar);
			else
				arm_wr -= (arm_wr > armM_Ar ? da : -da), da = 0;
			SetAnimationArm(anim_arm_wr, arm_wr);
		}

		break;
	case 0:
			Seqfinished = true;
			break;
	


		}
		center_arm_t = t0;
		if (da) {
			Seqfinished = true; // finished stowing
			
	}
 

Gargantua2024

The Desktop Orbinaut
Joined
Oct 14, 2016
Messages
1,068
Reaction score
1,274
Points
128
Location
San Jose Del Monte, Bulacan
Gattis, thanks for recovering STS-Payloads v2.01 back! Recently, I've found out that based on the currently available Orbiter addons, about 118 out of 135 Shuttle missions can be simulated with historical accuracy! The 17 left that can't be simulated realistically were:

STS-61-C (Columbia)

STS-30 (Atlantis) = NOTE: Magellan addon very obsolete, and the STS-Payloads 2010
version has its IUS stage permanently attached

STS-39 (Discovery)

STS-41 (Discovery) = NOTE: Same problem with Magellan

STS-44 (Atlantis)

STS-48 (Discovery)

STS-49 (Endeavour)

STS-52 (Columbia)

STS-60 (Discovery)

STS-62 (Columbia)

STS-64 (Discovery)

STS-69 (Endeavour)

STS-72 (Endeavour)

STS-75 (Columbia)

STS-80 (Columbia)

STS-85 (Discovery)

STS-87 (Columbia)


As of today, I have created 102 launch audios out of those 119 missions ready to be released in the future, but I need first to fix the bugs found on the first batch I uploaded last March
 

Star Voyager

Space Shuttle Refugee
Joined
Oct 25, 2008
Messages
1,975
Reaction score
32
Points
48
61C needs a working Pam D2, standalone GAS bridge mesh, and an MSL mesh that can also be used for the USMP missions you listed (i.e. 52, 87, etc).
 
Top