Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Requests
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Requests If you have a request for a new addon or want to know where to find a specific addon, ask it here!

Reply
 
Thread Tools
Old 08-16-2018, 11:00 AM   #76
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. I guess I am using the default ISS.

---------- Post added 08-16-18 at 06:00 AM ---------- Previous post was 08-15-18 at 09:45 AM ----------

So got the ring to extend.


But haven't got the dock to follow animations yet.
Code:
	if (ODS == 1){//ODS is  present
		if (DOCKRING_status >= HATCH_RAISING) {
			double da = simdt * .1;
			if (DOCKRING_status == HATCH_RAISING) {
				if (DOCKRING_proc > 0.0) DOCKRING_proc = max(0.0, DOCKRING_proc - da);
				else DOCKRING_status = HATCH_UP;
			}
			else {
				if (DOCKRING_proc < 1.0) DOCKRING_proc = min(1.0, DOCKRING_proc + da);
				else DOCKRING_status = HATCH_DOWN;
			}
			SetAnimation(anim_DOCKRING, DOCKRING_proc);
			dockpos.y = dockpos.y + (DOCKRING_proc * .45);  //move dock post on y axis  to follow ring position  rign move up.45 when extended

			SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));

		}
	}
Also the ring animation seems to not work in d3d9?
gattispilot is online now   Reply With Quote
Old 08-16-2018, 03:45 PM   #77
Donamy
Beta Tester


Default

I don't think the SSU has the docking follow the animation either.
Donamy is offline   Reply With Quote
Thanked by:
Old 08-16-2018, 09:55 PM   #78
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So I guess the dock can not be moved with the animation

The dock pos moves as I can undock and the shuttle will dock at the ring extended point. But when I retract the ring the dock doesn't move?



Code:
hDockODS = CreateDock(ORBITER_DOCKPOS, _V(0, 1, 0), _V(0, 0, -1));  //dock for ods


Code:
void Atlantis::SetODSDock(void) {
	SetDockParams(hDockODS, dockpos, _V(0, 1, 0), _V(0, 0, -1));

}
Code:
if (ODS == 1){//ODS is  present
		//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
		if (DOCKRING_status >= HATCH_RAISING) {
			double da = simdt * .1;
			if (DOCKRING_status == HATCH_RAISING) {
				if (DOCKRING_proc > 0.0) DOCKRING_proc = max(0.0, DOCKRING_proc - da);
				else DOCKRING_status = HATCH_UP;
			}
			else {
				if (DOCKRING_proc < 1.0) DOCKRING_proc = min(1.0, DOCKRING_proc + da);
				else DOCKRING_status = HATCH_DOWN;
			}
			SetAnimation(anim_DOCKRING, DOCKRING_proc);
			dockpos.y = 2.40 + (DOCKRING_proc * .45);  //move dock post on y axis  to follow ring position  rign move up.45 when extended

			//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
				//sprintf(oapiDebugString(), "%0.4f ", dockpos.y);
			SetODSDock();
		}
	}

Last edited by gattispilot; 08-16-2018 at 10:07 PM.
gattispilot is online now   Reply With Quote
Old 08-16-2018, 10:54 PM   #79
Donamy
Beta Tester


Default

Probably have to have the docking ring a separate vessel.
Donamy is offline   Reply With Quote
Old 08-17-2018, 01:36 PM   #80
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Oh. Then. I guess attach the ring to shuttle. Then have the attachment move.

---------- Post added 08-17-18 at 08:36 AM ---------- Previous post was 08-16-18 at 07:07 PM ----------

So I made the ring a separate vessel with just a dock and attachment.
Code:
; === Configuration file for vessel class ===

ClassName = dockingring
MeshName = 2016SPACESHUTTLE\\Dockring


Mass = 1
Size = 2

BEGIN_DOCKLIST
 0 2.25 10.141    0 1 0   0 0 -1
END_DOCKLIST

BEGIN_ATTACHMENT
P 0  2.259  10.141   0 -1 0  0 0 1  Ring
END_ATTACHMENT
Made an attachment point that matches the ring. And it moves.
But it isn't docking correctly

Code:
Dockring:Dockingring
  STATUS Orbiting Earth
  RPOS 216496.775 -6499572.636 1795366.987
  RVEL -7541.7540 143.7407 1442.3599
  AROT -75.171 -11.705 -81.200
  VROT 0.3995 -0.0070 -0.0041
  ATTACHED 0:8,Constellation
  AFCMODE 7
  DOCKINFO 0:1,ISS
  NAVFREQ 0 0
END
gattispilot is online now   Reply With Quote
Old 08-17-2018, 01:54 PM   #81
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by Donamy View Post
 I don't think the SSU has the docking follow the animation either.
Its broken in SSU, but maybe solvable, the discussion about the same issues in Apollo is pretty fertile:

https://www.orbiter-forum.com/showth...048#post580048

The animations are "OK", if you remember that the ODS ring system is actually a hexapod and has 6 degrees of freedom. We simplified this a lot.
Urwumpe is online now   Reply With Quote
Thanked by:
Old 08-17-2018, 04:29 PM   #82
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So maybe delete the dock. Move the ring and new dock position. Then create a dock with new position.

---------- Post added at 11:29 AM ---------- Previous post was at 10:20 AM ----------

So this moves the ring in/out and set the new dock y pos.
Code:
	if (ODS == 1){//ODS is  present
		//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
		if (DOCKRING_status >= HATCH_RAISING) {
			double da = simdt * .1;
			if (DOCKRING_status == HATCH_RAISING) {
				if (DOCKRING_proc > 0.0) DOCKRING_proc = max(0.0, DOCKRING_proc - da);
				else DOCKRING_status = HATCH_UP;
			}
			else {
				if (DOCKRING_proc < 1.0) DOCKRING_proc = min(1.0, DOCKRING_proc + da);
				else DOCKRING_status = HATCH_DOWN;
			}
			SetODSDock();
			SetAnimation(anim_DOCKRING, DOCKRING_proc);
			ringpos.y = 2.259 + (DOCKRING_proc * .45);  //move dock post on y axis  to follow ring position  rign move up.45 when extended
		//	SetAttachmentParams(Dockring, ringpos, _V(0, 1, 0), _V(0, 0, 1));

			//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
				//sprintf(oapiDebugString(), "%0.4f ", dockpos.y);
			//SetODSDock();
		}
	}
Code:
void Atlantis::SetODSDock(void) {
	DelDock(hDockODS);
	sprintf(oapiDebugString(), "%0.4f ", ringpos.y);
	hDockODS = CreateDock(ringpos, _V(0, 1, 0), _V(0, 0, -1));
	//SetDockParams(hDockODS, dockpos, _V(0, 1, 0), _V(0, 0, -1));

}
The dock jumps to place.
gattispilot is online now   Reply With Quote
Old 08-19-2018, 10:14 PM   #83
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Not sure why isn't working.

Code:
if (ODS == 1){//ODS is  present
		//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
		if (DOCKRING_status >= HATCH_RAISING) {
			double da = simdt * .1;
			if (DOCKRING_status == HATCH_RAISING) {
				if (DOCKRING_proc > 0.0) DOCKRING_proc = max(0.0, DOCKRING_proc - da);
				else DOCKRING_status = HATCH_UP;
			}
			else {
				if (DOCKRING_proc < 1.0) DOCKRING_proc = min(1.0, DOCKRING_proc + da);
				else DOCKRING_status = HATCH_DOWN;
			}
			if (olddockpos != ringpos.y){  // old pos is not the same as the new position so move the dock

				DelDock(hDockODS);  //del dock
				//ringpos.y = 2.259 + (DOCKRING_proc * .45);//change
				olddockpos = ringpos.y;  //set old to current ring pos
				ringpos.y = 2.259 + (DOCKRING_proc * 5);//change
				sprintf(oapiDebugString(), "ring  %2.2f oldring %2.2f", ringpos.y, olddockpos);
				hDockODS = CreateDock(_V(0, ringpos.y, 10.14), _V(0, 1, 0), _V(0, 0, -1));//make new dock at new current y pos
				

			}



		//	SetODSDock();
			SetAnimation(anim_DOCKRING, DOCKRING_proc);
			//ringpos.y = 2.259 + (DOCKRING_proc * .45); 
			
			
			
			
			
			
			//move dock post on y axis  to follow ring position  rign move up.45 when extended
		//	SetAttachmentParams(Dockring, ringpos, _V(0, 1, 0), _V(0, 0, 1));

			//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
				//sprintf(oapiDebugString(), "%0.4f ", dockpos.y);
			//SetODSDock();
		}
	}
If the y value are different delete the dock and make a new dock at the new y position. Keep doing it til animation proc =1.


I know there is a add-on to see dock position. But can't find it

Well I think is happening is the dock is deleted. then moved but the vessel is no longer docked. Not sure about that?

Went with new code:
Code:
if (ODS == 1){//ODS is  present
		//SetDockParams(dockpos, _V(0, 1, 0), _V(0, 0, -1));
		if (DOCKRING_status >= HATCH_RAISING) {
			double da = simdt * .1;
			if (DOCKRING_status == HATCH_RAISING) {
				if (DOCKRING_proc > 0.0) DOCKRING_proc = max(0.0, DOCKRING_proc - da);
				else DOCKRING_status = HATCH_UP;
			}
			else {
				if (DOCKRING_proc < 1.0) DOCKRING_proc = min(1.0, DOCKRING_proc + da);
				else DOCKRING_status = HATCH_DOWN;
			}
			if (olddockpos != ringpos.y){  // old pos is not the same as the new position so move the dock

				//DelDock(hDockODS);  //del dock
				//ringpos.y = 2.259 + (DOCKRING_proc * .45);//change
				olddockpos = ringpos.y;  //set old to current ring pos
				ringpos.y = 2.259 + (DOCKRING_proc * .45);//change
				//sprintf(oapiDebugString(), "ring  %2.2f oldring %2.2f", ringpos.y, olddockpos);
				//hDockODS = CreateDock(_V(0, ringpos.y, 10.14), _V(0, 1, 0), _V(0, 0, -1));//make new dock at new current y pos
				SetDockParams(_V(0, ringpos.y, 10.15), _V(0, 1, 0), _V(0, 0, -1));
				GetDockParams(hDockODS, dockpos1,  _V(0, 1, 0), _V(0, 0, -1));
				sprintf(oapiDebugString(), "ring  %2.2f oldring %2.2f  dock %2.2f", ringpos.y, olddockpos,dockpos1.y);

			}
same result. But the position moved just I expected the shuttle to move with the docking point.

---------- Post added at 05:14 PM ---------- Previous post was at 07:19 AM ----------

Well maybe it isn't possible. I will just stick to animation moving out. In someways that seems worthless as the dock doesn't move?

Last edited by gattispilot; 08-19-2018 at 01:02 PM.
gattispilot is online now   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Requests


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 01:40 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.