OHM Spacecraft3 to DLL&C++ converter 141006

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
COG shifting controls in Z axis would help converted spaceplanes to enter atmosphere in 40deg AOA and maintain it during whole reentry.

But as usual that's my own opinion/suggestion.
 

Pablo49

Member
Joined
Feb 24, 2010
Messages
753
Reaction score
0
Points
16
How about making Spacecraft4 with more config option?

Why would he do that? It's out of the scope of this project, opposite of it, really. If artlav wishes to add more features to spacecraft, they'd be added to this, instead of making a new spacecraft and a second converter.
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Well, that's something i contemplated.
Specifically, extending SC3 format.
Then, the converter becomes an ini compiler.

First, [UMMU] section
[UMMU]
crew_count=4
airlock_pos=(10,10,20)
airlock_port=1
airlock_size=(1,1,2)

Then, touchdown points:
touchdown_up, touchdown_down, touchdown_anim.
Last is the sequence that deploys the gears.

More VC components - buttons for MFD, knobs and buttons to toggle animations, etc.

Multiple mesh definition, for vessel merging.
Then, all animation components get a MESH= parameter.

No limits on amount of things defined (none already, but SC3 dictates a lot).



There is a definite advantage of having a contained DLL for vessel, rather than the shaky system of SC3 dll and no two instances of a vessel in scenario.

But SC3 allows for easy tweaking of the vessels.
So, would a DLL-to-ini converter be interesting (only converted DLLs, not any one)?

Just in case, i got a go-ahead for this converter from Vinka back in 2008 (the old Orbiter shipyard version), so i think he won't object to further improvements on this. Back then he said he wanted to keep improving it, but had a serious lack of time to do that.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,923
Reaction score
232
Points
138
Location
Cape
Could you post a detailed readme on the conversion? I can't quite figure it out.:shrug:
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,450
Reaction score
705
Points
203
Could you post a detailed readme on the conversion? I can't quite figure it out.:shrug:
  1. Load SC3gui.exe
  2. From the pulldown menu select the vessel you wish to convert
  3. Press the Translate button
  4. Repeat steps 1-3 until you're done, then just close the command line window
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
What DaveS said, which would produce a vessel_name.zip file containing the converted add-on in the base directory, and the C++ code in the sources/vessel_name directory.
Should be run from Orbiter directory.

Also, you can use the command line.
Format is: sc3conv.exe make inputfile.ini outputname crewcount
With the same effect.
 

Arthur Dent

Absolutely Mental
Donator
Joined
Feb 8, 2008
Messages
336
Reaction score
1
Points
18
Location
Dresden
Website
wasa.pottyland.de
Well, that's something i contemplated.
Specifically, extending SC3 format.
Then, the converter becomes an ini compiler.

First, [UMMU] section
[UMMU]
crew_count=4
airlock_pos=(10,10,20)
airlock_port=1
airlock_size=(1,1,2)

Then, touchdown points:
touchdown_up, touchdown_down, touchdown_anim.
Last is the sequence that deploys the gears.

More VC components - buttons for MFD, knobs and buttons to toggle animations, etc.

Multiple mesh definition, for vessel merging.
Then, all animation components get a MESH= parameter.

No limits on amount of things defined (none already, but SC3 dictates a lot).



There is a definite advantage of having a contained DLL for vessel, rather than the shaky system of SC3 dll and no two instances of a vessel in scenario.

This is exactly what I hopped you where going for! :thumbup:

If you could somehow combine that with the multistage.dll, you'd have the perfect tool.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,923
Reaction score
232
Points
138
Location
Cape
Could you possibly make it possible to switch the focus on the different attachment points, instead of the center of the mesh ?


Edit:

Also need a way to pause the animation. Some animations need to be stopped at some point.

And which keys opperate the robotic arm ? Here's the .ini

Code:
[CONFIG]
MESHNAME="EVAEMU1" 
EMPTY_MASS=250  
FUEL_MASS=60     
MAIN_THRUST=0
ATTITUDE_THRUST=10
ISP=500
SIZE=5
FOCUS=1
CAMERA=(0,1,0)
VISIBLE=1



[PARENT_ATTACH_0]      ;right hand
POS=(0.198,0.695,0.042)
DIR=(0.0,0.0,-1)
ROT=(0.0,-1,0.0)
LOOSE=0
RANGE=0.5

[PARENT_ATTACH_1]      ;tool
POS=(0.325,0.25,-0.20)
DIR=(-1,0,0)
ROT=(0,-0.5,0.5)
LOOSE=0
RANGE=0.5




[CHILD_ATTACH_0]	;to Foot Restraint
POS=(0.0,-0.89,-0.135)
DIR=(0,1,0)
ROT=(0,0,1)
LOOSE=0
ID="GS"

[CHILD_ATTACH_1]	;to COG
POS=(0.0,0,0)
DIR=(0,1,0)
ROT=(0,0,1)
LOOSE=0
ID="GS"


; ankle bend POR 0,-0.81,-0.138
; knee bend POR 0,-0.382,-0.017


[ROBOTIC_ARM]
JOINT_0_NAME="left arm swing"
JOINT_0_SEQ=4
JOINT_0_RANGE=(-160,160)
JOINT_1_NAME="left arm raise"
JOINT_1_SEQ=5
JOINT_1_RANGE=(-60,60)
JOINT_2_NAME="left wrist roll"
JOINT_2_SEQ=6
JOINT_2_RANGE=(-160,160)
JOINT_3_NAME="left wrist pitch"
JOINT_3_SEQ=7
JOINT_3_RANGE=(-100,100)
JOINT_4_NAME=" right arm swing"
JOINT_4_SEQ=8
JOINT_4_RANGE=(-160,160)
JOINT_5_NAME=" right arm raise"
JOINT_5_SEQ=9
JOINT_5_RANGE=(-60,60)
JOINT_6_NAME="right wrist roll"
JOINT_6_SEQ=10
JOINT_6_RANGE=(-90,90)
JOINT_7_NAME="Right wrist pitch"
JOINT_7_SEQ=11
JOINT_7_RANGE=(-100,100)
GRAP_SEQ=10
GRAP_ATTACH=0

[ANIM_SEQ_0]	; ankle bend
key=1
INIT_POS=0.6
DURATION=6
PAUSE=1

[ANIM_SEQ_1]	; knee bend
key=2
INIT_POS=0.88
DURATION=6
PAUSE=1

[ANIM_SEQ_2]	; waste swivel
key=3
INIT_POS=0.5
DURATION=6
PAUSE=1

[ANIM_SEQ_3]	; waste bend
key=4
INIT_POS=0.77
DURATION=6
PAUSE=1

[ANIM_SEQ_4]	; left arm swing
INIT_POS=0.88
DURATION=6

[ANIM_SEQ_5]	; left Arm raise
INIT_POS=0.5
DURATION=6

[ANIM_SEQ_6]	; left wrist roll
INIT_POS=0.5
DURATION=4

[ANIM_SEQ_7]	; left wrist pitch
INIT_POS=0.5
DURATION=4

[ANIM_SEQ_8]	; right arm swing
INIT_POS=0.12
DURATION=6

[ANIM_SEQ_9]	; right Arm raise
INIT_POS=0.5
DURATION=6

[ANIM_SEQ_10]	;right wrist roll
INIT_POS=0.5
DURATION=4

[ANIM_SEQ_11]	;right wrist pitch
INIT_POS=0.5
DURATION=4

[ANIM_SEQ_12]	;hand grab
INIT_POS=0.5
DURATION=6

[ANIM_SEQ_13]  ;visor
KEY=7	
INIT_POS=1
DURATION=6

[ANIM_SEQ_14]  ;head turn
KEY=8	
INIT_POS=0.5
DURATION=3
PAUSE=1

[ANIM_SEQ_15]  ;stoop
KEY=5	
DURATION=3
PAUSE=1


[ANIM_COMP_0]  ; nul base
SEQ=0
GROUPS=0
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,-0.81,-0.138)
ROT_AXIS=(1,0,0)
ANGLE=0

[ANIM_COMP_1]  ; ankle bend
SEQ=0
GROUPS=1
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,-0.81,-0.138)
ROT_AXIS=(1,0,0)
ANGLE=45
PARENT=0

[ANIM_COMP_2]  ; knee bend
SEQ=1
GROUPS=2
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,-0.382,-0.017)
ROT_AXIS=(1,0,0)
ANGLE=120
PARENT=1

[ANIM_COMP_3]  ; waist swivel
SEQ=2
GROUPS=3
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.53,-0.04)
ROT_AXIS=(0,1,0)
ANGLE=90
PARENT=2


[ANIM_COMP_4]  ; waist bend
SEQ=3
GROUPS=4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,38,40,41
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.16,-0.07)
ROT_AXIS=(-1,0,0)
ANGLE=89
PARENT=3

[ANIM_COMP_5] 	;visor
SEQ=13
GROUPS=10
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.0,0.79,0.01)
ROT_AXIS=(1,0,0)
ANGLE=85
PARENT=4

[ANIM_COMP_6] 	;left arm swing
SEQ=4
GROUPS=22
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.5408655,-5.341899E-02)
ROT_AXIS=(1,0,0)
ANGLE=160
PARENT=4

[ANIM_COMP_7] 	;left arm raise
SEQ=5
GROUPS=23,24,25
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(-0.1752803,0.5959535,-5.341899E-02)
ROT_AXIS=(0,0,-1)
ANGLE=60
PARENT=6

[ANIM_COMP_8] 	;left wrist roll
SEQ=6
GROUPS=26
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(-0.43,0.11,-0.08)
ROT_AXIS=(0,1,0)
ANGLE=160
PARENT=7

[ANIM_COMP_9] 	;left wrist pitch
SEQ=7
GROUPS=27,28,29
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.,0.05,-0.08)
ROT_AXIS=(1,0,0)
ANGLE=100
PARENT=8

[ANIM_COMP_10] 	;Right arm swing
SEQ=8
GROUPS=30
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.5408655,-5.341899E-02)
ROT_AXIS=(-1,0,0)
ANGLE=160
PARENT=4

[ANIM_COMP_11] 	;right arm raise
SEQ=9
GROUPS=31,32,33
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.1752803,0.5959535,-5.341899E-02)
ROT_AXIS=(0,0,1)
ANGLE=60
PARENT=10

[ANIM_COMP_12] 	;right wrist roll
SEQ=10
GROUPS=34
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.43,0.11,-0.08)
ROT_AXIS=(0,-1,0)
ANGLE=180
PARENT=11

[ANIM_COMP_13] 	;right wrist pitch
SEQ=11
GROUPS=35,36,37
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.,0.05,-0.08)
ROT_AXIS=(1,0,0)
ANGLE=60
PARENT=12

[ANIM_COMP_14] 	;head turn
SEQ=14
GROUPS=39
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0.,0.638,0)
ROT_AXIS=(0,1,0)
ANGLE=60
PARENT=4

[ANIM_COMP_15] 	;hand grab
SEQ=12
TIP_1=(0.198,0.695,0.042)
TIP_2=(0.198,1.695,0.042)
TIP_3=(0.198,0.695,1.042)
PARENT=4

;   stoop animation

[ANIM_COMP_16]  ; ankle bend
SEQ=15
GROUPS=1
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,-0.81,-0.138)
ROT_AXIS=(1,0,0)
ANGLE=15
PARENT=0


[ANIM_COMP_17]  ; knee bend
SEQ=15
GROUPS=2,3
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,-0.382,-0.017)
ROT_AXIS=(1,0,0)
ANGLE=-45
PARENT=16

[ANIM_COMP_18]  ; waist bend
SEQ=15
GROUPS=4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,38,39,40,41
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.16,-0.07)
ROT_AXIS=(-1,0,0)
ANGLE=-35
PARENT=17


[ANIM_COMP_19] 	;left arm swing
SEQ=15
GROUPS=22,23,24,25,26,27,28,29
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.5408655,-5.341899E-02)
ROT_AXIS=(1,0,0)
ANGLE=-90
PARENT=18

[ANIM_COMP_20] 	;Right arm swing
SEQ=15
GROUPS=30,31,32,33,34,35,36,37
RANGE(0,1)
TYPE=ROTATE
ROT_PNT=(0,0.5408655,-5.341899E-02)
ROT_AXIS=(1,0,0)
ANGLE=-90
PARENT=18
 

Attachments

  • EVAEMU1.zip
    1.1 MB · Views: 1
Last edited:

80mileshigh

Addon Developer
Addon Developer
Donator
Joined
Feb 18, 2008
Messages
365
Reaction score
258
Points
63
Location
Melbourne
Website
eightymileshigh.wordpress.com
Anything else worth adding? :)

Hi Artlav, I have tried the converter on my Deepstar addon:

[ame="http://www.orbithangar.com/searchid.php?ID=3251"]Deepstar 2.0[/ame]

The results are great, but the the RCS exhaust on the lander is incorrect. I know you said you were working on RCS earlier in the thread but I just wanted to mention it would be useful to me.

Translating the sound entries from SC3 would be great too. Mars 1994 for example uses a set of custom ambient noises.

Thanks for all your work with this! :cheers:
 

PeterRoss

Warranty man
Joined
Oct 8, 2009
Messages
1,985
Reaction score
127
Points
63
Location
Khabarovsk
Website
vk.com
Thanks for the great tool, Artlav! I've been using it for some time and I suggest to add NoseWheelSteering function for aircraft-type vessels with wheels like Swift by Greg Burch (maybe it should be user-defined with checkbox in GUI if this function is needed for the vessel). The other thing I've also had to change in generated .cpp for Swift is making ISP at sea level bigger than ISP in vacuum to make it airplane instead of underpowered spaceship, like Greg Burch wanted it to be natively; but I don't know if there is too many spacecraft3 airplanes to add the 'atmospheric engine' function to your converter.

---------- Post added at 04:40 PM ---------- Previous post was at 04:30 PM ----------

Oh, I've forgot to mention that latest Ummu patcher finds your generated DLLs to be using obsolete Ummu code and advises to fix it. Of course the patcher fixes it without any problem, but maybe you'll want to fix it in your convertor?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Could you possibly make it possible to switch the focus on the different attachment points, instead of the center of the mesh ?
Clarifications would be nice. COG is also a logical zero for all coordinates defined. What do you expect to see?

Also need a way to pause the animation. Some animations need to be stopped at some point.
Um, with the keys that are defined in the ini?
Or something does not work?

And which keys opperate the robotic arm ? Here's the .ini
Exactly the same as in the SC3. Do you have spacecraft.pdf manual? It's all in there.
Or, once again, does something refuse to work as expected?

combine that with the multistage.dll
That is planned.

I think you need to check trim option...look like does not work.
No wonder, it's not being defined. To be fixed.

the the RCS exhaust on the lander is incorrect
...
Translating the sound entries from SC3 would be great too.
Still can't make heads or tails on how the RCS are defined in the first place, internally.
On the list, sounds too.

add NoseWheelSteering function
Which should do what? Just a boolean to make it so?
Then, to the extension.

The other thing I've also had to change in generated .cpp for Swift is making ISP at sea level bigger than ISP in vacuum to make it airplane instead of underpowered spaceship, like Greg Burch wanted it to be natively; but I don't know if there is too many spacecraft3 airplanes to add the 'atmospheric engine' function to your converter.
Some clarifications needed - there is only one ISP parameter in the ini, what should be different?


latest Ummu patcher finds your generated DLLs to be using obsolete Ummu code and advises to fix it.
I'm using UMMUSDK from 2007. There was an update since then?
 

liber

Member
Joined
Aug 15, 2008
Messages
950
Reaction score
2
Points
18
Location
Room
Website
www.bw.org
Donamy did great job with EVAEMU1,animating and so...
SC3 allowe to stop animation,reverse it or continue...
It's control with key LeftShift and Ctrl and must be define in ini file as PAUSE=1...

Poor dude...

poordude.jpg
 

Fabri91

Donator
Donator
Joined
Jun 2, 2008
Messages
2,179
Reaction score
234
Points
78
Location
Valmorea
Website
www.fabri91.eu
Yes, UMMU 2.0 came out one, one and a half years ago if that is what you mean, together with UCGO. I suppose stuff in the sdk got changed too, sorry if this isn't what you meant. :)
 

PeterRoss

Warranty man
Joined
Oct 8, 2009
Messages
1,985
Reaction score
127
Points
63
Location
Khabarovsk
Website
vk.com
Some clarifications needed - there is only one ISP parameter in the ini, what should be different?

Well, in fact there is some improvising needed for airbreathing engines. The ISP parameter we reading from .ini is purely ISP in vacuum, and spacecraft3 don't support dependancy of ISP from atmospheric pressure. And Orbiter itself sees it in the way that ISP should be highest in vacuum and lowest at sea level. What we need here is directly opposite.

Code:
th_h[0]=CreateThruster(_V(0,0,0),_V(0,0,1),10000,ph_h[0],50000,0,101400)
When you create main thruster in your resulting .cpp you define ISP in vacuum with the number taken from .ini ISP parameter (50000) and the ISP at sea level as zero (compiler recognizes zero as default ISP). I've changed ISP in vacuum to 1 and ISP at sea level to 50000. I also had to change max thrust (10000) to 0.6 since Orbiter recognizes it as max thrust in vacuum and it's changing together with ISP; and when your ISP becomes 50000 times more than it was in vacuum your thrust rises respectively. (One moment you're standing still at the airstrip on the Earth surface, then you touch thrust control and - you're in the galaxy far, far away...)
Of course it makes BurnTimeCalculator MFD show weird numbers. I would be happy if anyone would suggest some better method. I'm quite new to all that C++ stuff, you know...

I'm using UMMUSDK from 2007. There was an update since then?

Well, yes, it was:)
 

Nemoricus

Addon Developer
Addon Developer
Joined
Jul 7, 2009
Messages
286
Reaction score
0
Points
0
The robotic arm animations seemed to be bugged. You have to press the Num-7 or Num-1 keys simultaneously with the Num-8/Num-2 and LShift keys, then release Num-1/Num-7 before it will move the robotic arm.

Replication:

1. Unzip Greg Burch's SSBB41, then unzip SC3 to DLL converter into that folder.

2. Run sc3gui.exe. Translate BArm1.

3. Unzip the converted files into the Orbiter directory and run the BArm1 orbital scenario.

4. Switch to BArm1 and go to the exterior view. Hit Space to activate the robotic arm controls. Attempting to press LShift+Num8/Num2 does nothing. However, pressing those two keys simultaneously with Num-1/Num-7, then releasing Num-1/Num-7 will activate the controls.

I hope this helps.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,923
Reaction score
232
Points
138
Location
Cape
So that's why I can't get it to work. How did you figure that one out ?
 
Top