Request Prometheus (Ship)

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
The only thing I can think of is to cut the thruster to 0 as the beam moves, set the thrust angle correctly and then turn the thrust back on.

Do you mean the exhaust or thrust? It seems the exhaust is right but the animation is off. I think it might be when the engines rotate. As you said when you switch to flight mode it corrects itself.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
Do you mean the exhaust or thrust? It seems the exhaust is right but the animation is off. I think it might be when the engines rotate. As you said when you switch to flight mode it corrects itself.
Both because the exhaust is in pointed in thrust direction.

It doesn't matter anyway because I don't have time to mess with it so I'm going to shelve it for the time being. Maybe I'll just put the whole works up at the Rag Tag Fleet and anyone that wants to have at it can. I just want to see the code if they get it working. Otherwise I don't care about it.
 
Joined
Mar 23, 2008
Messages
165
Reaction score
0
Points
16
Stupid question from a non-programmer but don't the auxiliary thrusters on the ShuttleA do a similar thing?
 

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53
Yes, but they only rotate on one Axis. The engines on Prometheus rotate on their mounting, which are mounted on a bar which also rotates.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
Because there seems to be some confusion about this whole thing and what happens, I'll tell you what I'm going to do.

I'm going to release it as unfinished and I'll include the source. Then anyone that wants to download it can see for themselves what is going on.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Would be one option. I think the problem is simply remaining torque-free during the transition. The engines would have to move at different rotation speeds relative to their position change. Possible that it is just a matter of a single function:

[math]\vec{r_a} \times \vec{F_a} = \vec{r_b} \times \vec{F_b}[/math]
Reduce it into 2D (since force vectors and position vectors would be in the YZ plane), and you would get one equation with only two unknown angles for a thrust force pair.

To get a function to solve this numerically, add a second equation: the direction of the resulting thrust force as sum of the two individual thrust forces (eg, 0° = forward thrust, 90° = hover thrust, 190° = retro thrust).

I can't imagine it to be extremely tough, if I have a weekend spare, I can give it a try.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
I have no time to mess with this but I'll throw it out there for others to play with. The model is unfinished and the code is messy with beacons in the wrong locations, landing points, pilot position not defind etc. Basically I cloned the Firefly code and striped out what I didn't want and got a basic model created so I could work on the code. Right now I have a single thruster as the main and the engines are just FX. I found that using the engines as the real thrust made the ship just spin out of control. It will take a lot more coding to enable the ship to fly using the depicted engines as the thrust points. The original rotation code was derived form the ShuttleA. Which like the Firefly has only two engines with the thrust points at x,0,0 and no additional rotation of the engine mounts which makes it a whole lot easier. Anyone that wants it to finish up and release as an add-on can have it. The only thing I'm asking is to send me the code or display it here so it can be leveraged for future projects. I'll try to upload it later tonight when I get home. I live in the Boston area in the US so we are talking Eastern time tonight.

---------- Post added 06-30-12 at 07:51 AM ---------- Previous post was 06-29-12 at 09:15 AM ----------

It has been uploaded.
Good luck to anyone trying to get it working.
If you do feel free to release it as yours but don't forget the model was never really finished. All I ask for is the code so I can learn how it was done.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
How big was she? I have working with a mesh from. He has her at 747Meters long.

I guess if you have you just have the exhaust from the 4 engines as effects and not real. Although to land you would have to straighten the beam and align the engines down.


promethussize1a.jpg
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
Ok I saw where the ship was about 120 meters x 100 meters wide.

weird issues. I wonder why the difference on the Z values. both the SC# and dll use the same mesh.
This is what I get for the exhaust/thrusters on a dll version

promethuRST3.jpg


but

on a SC# version I get this. Same mesh but different values?
promethuRST2.jpg



Dll thruster info.
Code:
SetMeshVisibilityMode (AddMesh (oapiLoadMeshGlobal ("newPROM")),  MESHVIS_ALWAYS | MESHVIS_EXTPASS); //Main ship mesh  | MESHVIS_EXTPASS
// ************************* propellant specs **********************************
	ph_main    = CreatePropellantResource (MAX_MAIN_FUEL);    // main tank
	// *********************** thruster definitions ********************************
// Call clbkSetClassCaps_UMMU and select a member
	SelectedUmmuMember=0;
	clbkSetClassCaps_UMMu();

	th_main[0] = CreateThruster (_V(-35.5, -13, 15), _V(0,0,1), SYSTEMS_THRUST, ph_main, MAIN_ISP);
	th_main[1] = CreateThruster (_V(35.5, -13, 15), _V(0,0,1), SYSTEMS_THRUST, ph_main, MAIN_ISP);

    th_main[2] = CreateThruster (_V(-35.5, 13, -44), _V(0,0,1), SYSTEMS_THRUST, ph_main, MAIN_ISP);
	th_main[3] = CreateThruster (_V(35.5, 13, -44), _V(0,0,1), SYSTEMS_THRUST, ph_main, MAIN_ISP);

sc3:
Code:
[CONFIG]
MESHNAME="NEWPROM"


[EX_MAIN_0]
OFF=(35,-13,-3)
DIR=(0,0,1)
LENGTH=60
WIDTH=3

[EX_MAIN_1]
OFF=(-35,-13,-3)
DIR=(0,0,1)
LENGTH=60
WIDTH=3

[EX_MAIN_2]
OFF=(35,13.5,-60)
DIR=(0,0,1)
LENGTH=60
WIDTH=3

[EX_MAIN_3]
OFF=(-35,13.5,-60)
DIR=(0,0,1)
LENGTH=60
WIDTH=3

On the moving of thrusters not sure where the rotation point should be?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
I am not sure about this array.
Code:
	left_back_eng_trak_point[0] =   _V(35.5, 13, -44);//exhaust position




 static UINT PodBackGrp[5] = {6,7,8,11,12};
      static MGROUP_ROTATE PodBack (0, PodBackGrp, 5, _V(-3.8, 13.15729, -34.35565), _V(1,0,0), (float)(360*RAD));

	  anim_back = CreateAnimation (0);
	  p2 = AddAnimationComponent (anim_back, 0, 1, &PodBack, parent);


	  static MGROUP_ROTATE backengineL (LOCALVERTEXLIST, MAKEGROUPARRAY(left_back_eng_trak_point), 2, _V(-25.3, 13, -44.35565), _V(1,0,0), (float)(-360 * RAD));
      anim_trk_backL = CreateAnimation (0);
     hAC_arm3 =  AddAnimationComponent (anim_trk_backL, 0, 1, &backengineL, p2);

So as the animation moves the array number should change, right? So the array is where the exhaust should be. On start it is correct but if the engine are rotated forward or .5 in the anim_state the thruster doesn't move correctly.
You can see at o state it is good but at .5 it isn't.
 
Last edited:

ZCochrane

New member
Joined
Mar 25, 2008
Messages
8
Reaction score
0
Points
0
Just a throwaway idea, and feel free to laugh at my ineptitude... but what happens when you change the actual position of the "single engine" point (presently at (0,0,0, right?) to something ridiculous like (0,0,250), or (0,0,-250)? This would keep the thrust vector aligned in the x & y planes, but would - maybe - change how the thrust is affected when vectored from a different "fulcrum point". The thrusters' visual appearance could always be changed if this is actually of any help, but I think my math is fuzzy. From beer, of course.

Warmly,
ZCochrane
:cheers:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
Thanks. It is trying to get the exhaust to match the animation. I think if you have a single non exhausted thruster that matched the angled vector.
 

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
There were 234 downloads of my unfinished ship and not a single solution to this problem has come forth. You are having the same problem I had and changing to a more accurate representation of the ship doesn't help the original problem of the thrust going out of sync with the engine when the engine is moved in the Y and Z axis.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
yes. I guess it is not do able or no one wants to have this ship
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Its definitly doable - I just had 2 hours For coding in 9 days of holidays. :-\ it isn't Even magic just some simple planning how to reduce the degrees of freedom to 6
 

ZCochrane

New member
Joined
Mar 25, 2008
Messages
8
Reaction score
0
Points
0
Hello, all:

I apologize ~ wasn't thinking clearly the other night, and I kept mixing up real-world physics with an imaginary Orbiter-World situation of having a thrust source at the center of a vessel - but imitating 4 thrust sources on different planes, and both lowering and louvering/levering down.

I am still looking for a math/code-able solution, but if there is none -- what would happen if, when tilting the thrust source down 90 deg. when landing, you instead tilted the thrust source an additional, say, 20 degrees (I'm eyeballing it), tilting it a total of 110 degrees down, and only when landing mode ("g") is enabled/engaged, since the other functions of reverse/vectored flight seem fine without the landing sequence? If this helps (and I have no idea whether or not it would), I wouldn't exactly be able to tell you why.

Warmly,
ZCochrane
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Correct me, if I am wrong, but we have 5 degrees of freedom, that have to be mapped on 5 animation angles.

Inputs:
Main/Retro Thrust
Hover Thrust
Pitch Acceleration
Yaw Acceleration
Roll Acceleration

Outputs:
Engine angle 1,2,3,4
Engine bar angle

As you can see, this is something that has to have a trivial solution.

Especially, if the two engine bars have their rotation axis in the center of gravity of the spacecraft. Sadly, this is not the case here. There is a change in torque.

EDIT: Just measured again... the torque by the engine bar motion should be minimal.

---------- Post added at 05:32 PM ---------- Previous post was at 04:29 PM ----------

@Ragtag: One small error that I discovered in the sources in a systematic way:

You mistake animation coordinates (0...1) with angle (in radians, 0... [math]2 \pi[/math]). That is why your thruster direction is behaving pretty strange, the engine pods rotate by 90° but the thrust vector only by 57° (1.0 in radians).
 
Last edited:

Ragtag

New member
Joined
Aug 7, 2008
Messages
156
Reaction score
0
Points
0
Location
House
[/COLOR]@Ragtag: One small error that I discovered in the sources in a systematic way:

You mistake animation coordinates (0...1) with angle (in radians, 0... [math]2 \pi[/math]). That is why your thruster direction is behaving pretty strange, the engine pods rotate by 90° but the thrust vector only by 57° (1.0 in radians).

If I remember correctly that is only in the code I up loaded and is left over from another failed attempt to sync the rotations. In any case I've abandoned the whole idea because even if I get the sync right the ship is darn near impossible to fly with the engines configured that way. It would require a lot more coding to get some sort of stabilization because trying to do it manually just doesn't work well. I was flipping end over end and just couldn't compensate quick enough.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I was flipping end over end and just couldn't compensate quick enough.

Working on it, I just finished reading through the uploaded source code and marking the spots that I have to change with a X.

Had similar troubles to fix with the Black Dart, it is just torque.
 

Thrawn

New member
Joined
Oct 5, 2012
Messages
1
Reaction score
0
Points
0
Is there any link to download the current file? I would like to help with the thrusters.
 
Top