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 11-23-2018, 08:17 PM   #196
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Weird. It looks like:
Mesh not found: .\Meshes\2016spaceshuttle\tank\slwt.msh but it is there?
gattispilot is offline   Reply With Quote
Old 11-23-2018, 08:21 PM   #197
Abdullah Radwan
Addon Developer
Default

No tank folder exists in Meshes\2016spaceshuttle.

Abdullah Radwan is offline   Reply With Quote
Old 11-23-2018, 08:28 PM   #198
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Sorry. I will update the zip but here is the tank
https://drive.google.com/open?id=1l_...cU6w6u73a8mET9
gattispilot is offline   Reply With Quote
Old 11-23-2018, 08:41 PM   #199
Abdullah Radwan
Addon Developer
Default

It works now! Thank you for help.



Only Discovery missing mesh error:
Code:
============================ ERROR: ===========================
Mesh not found: .\Meshes\2016SPACESHUTTLE\Discovery\DiscoveryORG2016f.msh
[MeshManager::LoadMesh | .\Mesh.cpp | 1238]
===============================================================


---------- Post added at 10:41 PM ---------- Previous post was at 10:37 PM ----------

Also guidance problem: MECO never occurred. Multistage2015 continues to burn until out of fuel.

Abdullah Radwan is offline   Reply With Quote
Thanked by:
Old 11-23-2018, 08:43 PM   #200
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Can you tell me which scn? I think the cfg need to be updated. Not sure about the guidance files.
gattispilot is offline   Reply With Quote
Old 11-23-2018, 08:55 PM   #201
Abdullah Radwan
Addon Developer
Default

It occurs on both Endeavour Launch and STS-2. A general revision on guidance files would be great. Note that you need also to auto jettison Shuttle after MECO.
Abdullah Radwan is offline   Reply With Quote
Old 11-23-2018, 09:03 PM   #202
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

This is what I have for Guidance for sts2
Code:
-30.000 =orbit(222,21,38.03,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,104.5,1.00)
30.0 =engine(104.5,72.00,5.00)
55.0 =engine(72.0,104.5,5.00)
120.0 =jettison()
121.0 =glimit(3.0)
200.0 =glimit(3.0)
225.0 =inverse()
300.0 =glimit(3.0)
400.0 =glimit(3.0)
500.0 =glimit(3.0)
Try change the orbit to:
-30.000 =orbit(222,231,38.03,-1)
gattispilot is offline   Reply With Quote
Old 11-23-2018, 11:14 PM   #203
fred18
Addon Developer

Default

Quote:
Originally Posted by gattispilot View Post
 This is what I have for Guidance for sts2
Code:
-30.000 =orbit(222,21,38.03,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,104.5,1.00)
30.0 =engine(104.5,72.00,5.00)
55.0 =engine(72.0,104.5,5.00)
120.0 =jettison()
121.0 =glimit(3.0)
200.0 =glimit(3.0)
225.0 =inverse()
300.0 =glimit(3.0)
400.0 =glimit(3.0)
500.0 =glimit(3.0)
Try change the orbit to:
-30.000 =orbit(222,231,38.03,-1)
You can't set the engines to 104.5% of power.

As far as I know the 104.5% arrived when the engines were given the ok to be "overclocked" a bit and in order not to rescale everything they simply made the calls up to 104. But in orbiter maximum is always 100% of course...
fred18 is offline   Reply With Quote
Old 11-25-2018, 11:55 AM   #204
gattispilot
Addon Developer
 
gattispilot's Avatar
Default


orbit for STS2

The other thing I am working on for this will be the launch of satellites. Looking at the SF sat launch. The ase and IUS were tilted using attachment 0,4. I can tilt back but for some reason I expect the IUS to fly away?

---------- Post added 11-24-18 at 05:18 AM ---------- Previous post was 11-23-18 at 05:37 PM ----------

So working on tilting attachment points and saving/loading them.
I have the change the points in the scn and save them. But the tilt ones are not getting loaded.
Code:
//tilt of ase/IUS
if (tilt == 1)		ANGULAR_VEL = ANGULAR_VEL+.0001;//move up
if (tilt == 2)		ANGULAR_VEL = ANGULAR_VEL - .0001;//move down
if ((tilt == 1) && (phi > tiltvalue))tilt = 0;  //reaches limit so stop
if ((tilt == 2) && (phi < tiltvalue))tilt = 0;  //reaches limit so stop
if (phi < 0)phi = 0;
xp1 = arm1_tip[1] - arm1_tip[0]; normalise(xp1);
xr1 = arm1_tip[2] - arm1_tip[0]; normalise(xr1);
if ((tilt == 1) || (tilt == 2))phi = ANGULAR_VEL * simt;
DIR = _V(0, sin(phi), cos(phi));
//SetAttachmentParams(sat_attach4, pl4_ofs, DIR, pl4_rot);//ase
//SetAttachmentParams(sat_attach1, pl1_ofs, DIR, pl1_rot);//ius
//sets new attachment rotation values for saving
pl1_dir.x = DIR.x;
pl4_dir.x = DIR.x;
pl1_dir.y = DIR.y;
pl4_dir.y = DIR.y;
pl1_dir.z = DIR.z;
pl4_dir.z = DIR.z;
;
keys just set the end tilt value:
Code:
if (key == OAPI_KEY_4){
		if (tiltvalue ==0){
			tilt = 1;
			tiltvalue=.5;
			
		}
		
		else if (tiltvalue == .5){
			tilt = 1;
			tiltvalue = .9;
		}
		return 1;
	}
	if (key == OAPI_KEY_5){
		
			tilt = 2;
			tiltvalue = 0;
		
		return 1;
	}
	if (key == OAPI_KEY_6){

		DetachChild(sat_attach1, 5.0);

		return 1;
	}
scn: rot values are saved:
Code:
PL1_OFS 0.0000 -0.5000 -7.5000
  PL1_DIR 1.0000 0.0000 0.0000
  PL1_ROT 0.0000 0.4963 0.8681
  PL2_OFS -0.0500 -0.2000 -3.6000
  PL2_DIR 0.0000 1.0000 0.0000
  PL2_ROT 0.0000 0.0000 1.0000
  PL3_OFS 0.0000 0.0000 -5.5000
  PL3_DIR 0.0000 0.0000 1.0000
  PL3_ROT 1.0000 0.0000 0.0000
  PL4_OFS 0.0000 0.5000 -7.5000
  PL4_DIR 1.0000 0.0000 0.0000
  PL4_ROT 0.0000 0.4963 0.8681



arm1_tip is set to saved attachment values.
Code:
arm1_tip[0] = pl4_ofs;
	arm1_tip[1] = pl4_dir;
	arm1_tip[2] = pl4_rot;

SetAttachmentParams(sat_attach1, pl1_ofs, pl1_dir, pl1_rot);//0
SetAttachmentParams(sat_attach2, pl2_ofs, pl2_dir, pl2_rot);//1
SetAttachmentParams(sat_attach3, pl3_ofs, pl3_dir, pl3_rot);//2
SetAttachmentParams(sat_attach4, pl4_ofs, pl4_dir, pl4_rot);//3
But the ase/ius is not tilted when loaded?
the IUS is attached at the sat_attach1 attachment point when I press 6 to detach the child nothing happens


If I comment out the set attachment it loads the saved value but I can't move it

---------- Post added at 01:10 PM ---------- Previous post was at 05:18 AM ----------

Attachments created:
Code:
sat_attach1 = CreateAttachment(false, pl1_ofs, pl1_dir, pl1_rot, "X");//0
	sat_attach2 = CreateAttachment(false, pl2_ofs, pl2_dir, pl2_rot, "0");//1
	sat_attach3 = CreateAttachment(false, pl3_ofs, pl3_dir, pl3_rot, "X");//2
	sat_attach4 = CreateAttachment(false, pl4_ofs, pl4_dir, pl4_rot, "C");//3
	sat_attach5 = CreateAttachment(false, pl5_ofs, pl5_dir, pl5_rot, "D");//4
	sat_attach6 = CreateAttachment(false, pl6_ofs, pl6_dir, pl6_rot, "E");//5
	sat_attach7 = CreateAttachment(false, pl7_ofs, pl7_dir, pl7_rot, "F");//6

I got the attachment to rotate and save.
Code:
	if (tilt == 1)tiltvalue = .5;
	if (tilt == 3)tiltvalue = 1.2;
	if (tilt == 4)		ANGULAR_VEL = ANGULAR_VEL + .0001;//move up
if (tilt == 1)		ANGULAR_VEL = ANGULAR_VEL+.0001;//move up
if (tilt == 2)		ANGULAR_VEL = ANGULAR_VEL - .0001;//move down
if ((tilt == 1) && (phi > tiltvalue))tilt = 3;  //reaches limit so stop
if ((tilt == 4) && (phi > tiltvalue))tilt = 0;  //reaches limit so stop
if ((tilt == 2) && (phi < 0))tilt = 0;  //reaches limit so stop
if (phi < 0)phi = 0;
xp1 = arm1_tip[1] - arm1_tip[0]; normalise(xp1);
xr1 = arm1_tip[2] - arm1_tip[0]; normalise(xr1);
if ((tilt == 1) || (tilt == 2) || (tilt == 4))phi = ANGULAR_VEL * simt;
DIR = _V(0, sin(phi), cos(phi));

SetAttachmentParams(sat_attach4, pl4_ofs, DIR, pl4_rot);//ase
SetAttachmentParams(sat_attach1, pl1_ofs, DIR, pl1_rot);//ius
//sets new attachment rotation values for saving
pl1_dir.x = DIR.x;
pl4_dir.x = DIR.x;
pl1_dir.y = DIR.y;
pl4_dir.y = DIR.y;
pl1_dir.z = DIR.z;
pl4_dir.z = DIR.z;
But can not detach from the point.
Code:
if (key == OAPI_KEY_6){

		DetachChild(sat_attach4, 5.0);
		DetachChild(sat_attach2, 5.0);
		DetachChild(sat_attach1, 5.0);
		DetachChild(sat_attach3, 5.0);
		DetachChild(sat_attach5, 5.0);
		DetachChild(sat_attach6, 5.0);
		return 1;
	}


---------- Post added 11-25-18 at 05:55 AM ---------- Previous post was 11-24-18 at 01:10 PM ----------

So I am able to tilt the 2 attachments points. in SF attachment 4 was for the ASE and 0 for the IUS.

Code:
PL1_OFS 0.000000 0.150000 -1.400000
  PL1_DIR 0.000000 0.000000 1.000000
  PL1_ROT 1.000000 0.000000 0.000000
PL4_OFS 0.000000 0.700000 -1.400000
PL4_DIR 0.000000 0.000000 1.000000
  PL4_ROT 1.000000 0.000000 0.000000
notice the difference in ofs of 0 and 4 What that does it set the IUS better into the ase. But when full tilted the IUS moves back and up.



So One mine I am setting them both so when tilted back it should remain the same.

So the issue becomes the IUS attachment points.
Code:
P 0 0 0  0 0 -1  0 1 0 XS
and the ASE/shuttle
Code:
 PL1_OFS 0.0000 0.50000 -7.500
  PL1_DIR 0.0000 0.0000 1.0000
  PL1_ROT 1.0000 0.0000 0.0000
So what should the attachment be in the IUS?
The bigger issue is the launch/detach of the IUS. I have dettach child for all attachments and nothing is happening


So the IUS attachment need to be like this:
P -.1 .75 -3.4 0 0 -1 1 0 0 XS

Last edited by gattispilot; 11-25-2018 at 12:50 PM.
gattispilot is offline   Reply With Quote
Thanked by:
Old 12-01-2018, 09:59 PM   #205
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So working on a spintable.

I can get the attachment to spin but when I detach the child it jumps high.
Code:
	if (SPIN1 == 1){
		

		
		if ((spintable == 1)&& (rotchange <=.30))rotchange = rotchange + .001;//OPERATE SPINTABLE
			ANGULAR_VEL = 2 * PI * (rotchange);
		
		

		sprintf(oapiDebugString(), " phi %d tilt %f spintable %f", spintable, ANGULAR_VEL, rotchange);
		if (phi < 0)phi = 0;
		//if (phi >1.2)phi = 1.2;
		xp1 = arm1_tip[1] - arm1_tip[0]; normalise(xp1);
		xr1 = arm1_tip[2] - arm1_tip[0]; normalise(xr1);
		if (spintable == 1) phi = ANGULAR_VEL *simt;  //move ase attachment and ius
		ROT = _V(sin(phi),0, cos(phi));

		//SetAttachmentParams(sat_attach4, pl4_ofs, DIR, pl4_rot);//ase
		SetAttachmentParams(sat_attach1, pl1_ofs, pl1_dir, ROT);//ius
		//sets new attachment rotation values for saving
		pl1_rot.x = ROT.x;
		//pl4_dir.x = DIR.x;
		pl1_rot.y = ROT.y;
		//pl4_dir.y = DIR.y;
		pl1_rot.z = ROT.z;
		//pl4_dir.z = DIR.z;
		if ((spintable == 2) && (rotchange >= .30))DetachChild(sat_attach1, 0);
	}


---------- Post added at 03:59 PM ---------- Previous post was at 10:20 AM ----------

It now detaches good. But not sure how to get the Satellite that was attached to spin once released
gattispilot is offline   Reply With Quote
Old 12-01-2018, 11:48 PM   #206
fred18
Addon Developer

Default

Quote:
Originally Posted by gattispilot View Post
 It now detaches good. But not sure how to get the Satellite that was attached to spin once released
You need to play with the vesselstatus2 vrot.

Now, I can't say for sure if it's enough, but it seems to me that if you just add your desidred velocity to vrot.z you'll get what you need. Again, it may be that you have to rotate it with the rotation matrix against the ecliptic frame, I can't remember now by hand, but it seems to me that for this it was not needed, you just add your velocity and that's it.
fred18 is offline   Reply With Quote
Old 12-02-2018, 09:07 PM   #207
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. But that would be needed to change to the PAM right? PAM is the vessel attached to the point.

Code:
PAM-1:STS_PAYLOADS\PAM
  STATUS Orbiting Earth
  RPOS 2877820.567 5685925.276 -2166428.191
  RVEL 6813.8991 -3571.2389 -321.0302
  AROT -172.857 -80.136 -157.610
  ATTACHED 0:0,VENTURESTAR
  AFCMODE 7
  PRPLEVEL 0:1.000000
  NAVFREQ 0 0
END
STAR-48B1:STS_PAYLOADS\EQUIP
  STATUS Orbiting Earth
  RPOS 2877820.567 5685925.276 -2166428.191
  RVEL 6813.8991 -3571.2389 -321.0302
  AROT -172.857 -80.136 -157.610
  ATTACHED 0:0,PAM-1
  AFCMODE 7
END
And it has no mesh
Code:
; === Configuration file for vessel class STS-PAM ===
ClassName = PAM
Mass = 236 ;124KG EMPTY STAR-48B SHORT: MASS 102KG EQUIPMENT MASS
PropellantResource1 = 2000 ;STS LOAD FUEL
Size = 10
MaxAttitudeThrust = 0
ISP = 2802
MaxMainThrust = 67170
TouchdownPoints = 0 -0.882 -2.027 -.882 .882 -2.027 .882 .882 -2.027
CrossSections = 1.77 1.80 1.37
Inertia = 0.22 0.22 0.22
MEngineRef1 = 0 0 -1.5
CameraOffset = 0 1.2 -0.15





; === Attachment specs ===
BEGIN_ATTACHMENT
C 0 0 0  0 0 1  0 1 0 XS ;TO STAR-48B
P 0 0 0  0 0 -1  0 1 0 XS ;TO SPIN TABLE
END_ATTACHMENT
Code:
; === Configuration file for vessel class Satellite ===
ClassName = EQUIP
MeshName = sts_payloads\pam-d
Mass = 1124
Size = 10
PropellantResource1 = 10
MaxAttitudeThrust = 1
MaxMainThrust = 1
AttRefZ00 =  0.65 0 -0.2
AttRefZ01 =  -0.65 0 -0.2
ISP = 10000
EnableFocus = FALSE



; === Attachment specs ===
BEGIN_ATTACHMENT
P 0 0 0  0 0 -1  0 1 0 XS ; TO PAM-D
C 0 0 0  0 0 1  0 1 0 XS  ; TO SATELLITE
END_ATTACHMENT

Once this rot gets to 50 rpm it stops increasing. Not sure to figure the 50 rpm?

---------- Post added at 03:07 PM ---------- Previous post was at 04:41 AM ----------

So not sure how to tell when 50 rpm occurs?

But on the add force to attached vessel? Not sure about that?
I suspect something like get the handle of attachment and then add force to such ship?
gattispilot is offline   Reply With Quote
Old 12-04-2018, 01:24 AM   #208
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So on the IUS. I know it should rotate to 29 and 58 degrees.
So I increase this value
Code:
if (tilt == 1)		ANGULAR_VEL = ANGULAR_VEL + .001;//move up
Then times simt rate:
Code:
phi = ANGULAR_VEL *simt
So then set the direction vector for attachment:
Code:
DIR = _V(0, sin(phi), cos(phi));

But shouldn't phi be like degrees?

---------- Post added at 07:24 PM ---------- Previous post was at 03:13 PM ----------

So spintable
Code:
if (SPIN1 == 1){
		

		
		if ((spintable == 1)  && (rotchange <= .30))rotchange = rotchange + .001;//OPERATE SPINTABLE
			ANGULAR_VEL = 2 * PI * (rotchange);
		
		

		//sprintf(oapiDebugString(), " phi %d tilt %f spintable %f", spintable, ANGULAR_VEL, rotchange);
		if (phi < 0)phi = 0;
		//if (phi >1.2)phi = 1.2;
		xp1 = arm1_tip[1] - arm1_tip[0]; normalise(xp1);
		xr1 = arm1_tip[2] - arm1_tip[0]; normalise(xr1);
		if ((spintable == 1) || (spintable==3)) phi = ANGULAR_VEL *simt;  //move ase attachment and ius
		ROT = _V(sin(phi),0, cos(phi));
		if ((spintable == 1) && (rotchange >= .30)) spintable = 3;
		//SetAttachmentParams(sat_attach4, pl4_ofs, DIR, pl4_rot);//ase
		SetAttachmentParams(sat_attach1, pl1_ofs, pl1_dir, ROT);//ius
		//sets new attachment rotation values for saving
		pl1_rot.x = ROT.x;
		//pl4_dir.x = DIR.x;
		pl1_rot.y = ROT.y;
		//pl4_dir.y = DIR.y;
		pl1_rot.z = ROT.z;
		//pl4_dir.z = DIR.z;
		
	}
it does spin. But once released the vessel doesn't spin.

And mot sure if the stop of .3 is equal to 50 rpm?
gattispilot is offline   Reply With Quote
Old 12-07-2018, 10:18 AM   #209
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So I am needing to add rotation to an attached vessel
Code:
	{  
		hVessel = GetAttachmentHandle(true, 1);
		VESSEL *v = oapiGetVesselInterface(hVessel);
		VESSELSTATUS2 vs;
		memset(&vs, 0, sizeof(vs));
		vs.version = 2;
		v->GetStatusEx(&vs);
		//   v->vs.vrot.z = PI / 2 + vs.vrot.z;
		v->SetAngularVel(_V(0, 0, 1.7));
		v->DefSetStateEx(&vs);
	}
I get a CTD now
Code:
PAM-1:STS_PAYLOADS\PAM
  STATUS Orbiting Earth
  RPOS 2877820.567 5685925.276 -2166428.191
  RVEL 6813.8991 -3571.2389 -321.0302
  AROT -172.857 -80.136 -157.610
  ATTACHED 0:0,VENTURESTAR
  AFCMODE 7
  PRPLEVEL 0:1.000000
  NAVFREQ 0 0
END
gattispilot is offline   Reply With Quote
Old 12-09-2018, 12:27 PM   #210
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So looking at the sdk

17.57.3.90 ATTACHMENTHANDLE VESSEL::GetAttachmentHandle ( bool toparent, DWORD i ) const
Return the handle of an attachment point identified by its list index.
Parameters
toparent If true, return a handle for an attachment point to a parent. Otherwise, return a handle for an
attachment point to a child.
i attachment index (>= 0)


Code:
hVessel = GetAttachmentHandle(true, 1);
So this should return the handle of the vessel attached to the parent of attachment #1, right


no ctd but if I add this
VESSEL *v = oapiGetVesselInterface(hVessel);

I get a CTD

---------- Post added 12-09-18 at 06:27 AM ---------- Previous post was 12-08-18 at 07:08 AM ----------

So not sure why I get a CTD:
Code:
		hVessel = GetAttachmentHandle(true, 1);
		VESSEL *v = oapiGetVesselInterface(hVessel);
Maybe hVessel is bad:
Code:
OBJHANDLE hVessel;

Last edited by gattispilot; 12-08-2018 at 01:12 PM.
gattispilot is offline   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 12:56 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.