Projectgenericvessel - spacecraft3 and multistage2 replacement project

Face

Beta Tester
genericvessel and Orbiter beta

Some folks asked if there are plans to update genericvessel for Orbiter beta.

I've tried both SC3 and my last genericvessel development in the newest beta, and they work good enough. SC3 shows some problems with rendering and the jettison function, but genericvessel works like a charm without recompile.

I see no reason updating it just to get it working. I also have no plans to continue developing (or hosting) it in the foreseeable future.

fred18

Donator
Thanks! that's wonderful news!

Can someone help?

Fred

Face

Beta Tester

Can someone help?

I have stopped hosting all of my GPL'ed addons, so you won't be able to use the links here. If you did not download it before, you are out of luck. But of course you can always use Artlav's versions, which are still available as direct downloads AFAIK.

Donator

Face

Beta Tester

What do you mean with "current"? The latest version that was ever produced? This would be the V150310, but if nobody else is hosting it anymore, you can't download it.

fred18

Donator
What do you mean with "current"? The latest version that was ever produced? This would be the V150310, but if nobody else is hosting it anymore, you can't download it.

Yes and I think it's a pity because gv is a very important project for orbiter. Any confusion on this should be avoided: at least half of the addons use spacecraft3 and therefore potentially GV. now we have two threads, one version of the module of 2014 and one more updated version of 2015 that is not downloadable anymore. Why there is not a reference and updated download on OH? That should be the reference point in my opinion. SC3 and GV are made for non programming experts who want to develop orbiter addon but do not know coding, if it becomes difficult even to find and download the module which is supposed to help them, then the risk is to loose potential users and developers.

please do not take this words as bad, it's just an open mind thought.

Face

Beta Tester
Yes and I think it's a pity because gv is a very important project for orbiter. Any confusion on this should be avoided: at least half of the addons use spacecraft3 and therefore potentially GV. now we have two threads, one version of the module of 2014 and one more updated version of 2015 that is not downloadable anymore. Why there is not a reference and updated download on OH? That should be the reference point in my opinion. SC3 and GV are made for non programming experts who want to develop orbiter addon but do not know coding, if it becomes difficult even to find and download the module which is supposed to help them, then the risk is to loose potential users and developers.

please do not take this words as bad, it's just an open mind thought.

You are right, it is a pity. But let me get one thing clear: the genericvessel project was started because SC3 is closed-source and Vinka chose to leave the community. To avoid this middle-ware lock-in, I proposed to start this as open-source project with the GPL license. Especially this license is unfortunately under attack here, and you know it. Therefore I closed my hostings and stopped developing it, that's really all to it. I am just reacting to what others brought forward. Neither did I fork it due to design reasons - like Artlav did - nor did I dispute its license like many others did.

If you want to know why there is a second thread, go discuss it with Artlav. If you want to know why hosting it is a no-go for me anymore, go read the GPL thread.

The project's results never were uploaded to OHM, because it is not in a finished state, not even close. Although the intermediate beta releases were nice, not all of SC3 was ever covered, which was one of the designated goals of the project. In addition, with the recent discussion about default-licenses on OHM, I will certainly not upload a GPL'ed project to it.

As for your desire for one single place to get a version of genericvessel: please read Artlav's thread thoroughly, as there is also a discussion about the whole "don't-distribute-my-stuff" thing in there, and why the idea of a single blessed ivory-tower is a fallacy when talking about "real" open-source projects.

fred18

Donator
I'm sorry my friend, didn't want to piss off anybody...

just take it easy, it's not worth it to get angry for this...

cheers

Face

Beta Tester
I'm sorry my friend, didn't want to piss off anybody...

just take it easy, it's not worth it to get angry for this...

I know that you didn't want that, and I don't feel pissed off because of you. I just am already in this regards, so even if your words were bad, it wouldn't matter much.

As for taking it easy: I just don't do work for free if the result is that it gets me angry, that is all. I already have to do work that makes me angry, but at least this one pays the bills .

More details would be better said in private, as it doesn't belong to here.

Donamy

Donator
Beta Tester
I guess I'm done with Orbiter too. GV was the only thing keeping me interested in developing anymore addons. I had high hopes of updating the ISS AtoZ with the new options it provided, plus other things I was working on. I was so looking forward to this, but alas it is not to be. Too bad !!

4throck

Enthusiast !
We have Vessel Scripts. It's overlooked but Orbiter but it requires no code and does the same as sc3 (or even more).
I haven't tried it but I see the API commands there, so it's the way to go.
Above all, that's what Martins intended to be used.

From the manual:

The ScriptPB vessel class is an example for a scripted vessel definition. It can be found in Config\Vessels\ScriptPB.cfg.

Code:
--[[
; Example for a script-driven vessel class definition.
; For implementation code, see Orbitersdk/samples/ScriptVessel
; This file contains both the configuration and script parts.
; The config part is terminated by 'END_PARSE' to prevent the
; Orbiter parser from reading the script, and enclosed in Lua
; comment brackets to make it a comment for the script interpreter.

; A. Configuration section
; -------------------------------------------
ClassName = ScriptPB
Module = ScriptVessel
Script = ScriptPB.cfg
END_PARSE

; B. Script section
; -------------------------------------------
--]]

-- Vessel parameters

vprm = {                         -- general Parameters
emass = 500,                     -- empty mass [kg]
fuelmass = 750,                  -- propellant mass [kg]
size = 3.5,                      -- mean radius [m]
pmi = {x=2.28,y=2.31,z=0.79},    -- principal moments of inertia [m^2]
cs = {x=10.5,y=15.0,z=5.8},      -- cross sections [m^2]
rd = {x=0.1,y=0.1,z=0.05},       -- rotation drag coefficients
co = {x=0,y=0.8,z=0},            -- cockpit camera offset
td1 = {x=0,y=-1.5,z=2},          -- touchdown point: front
td2 = {x=-1,y=-1.5,z=-1.5},      -- touchdown point: left
td3 = {x=1,y=-1.5,z=-1.5}        -- touchdown point: right
}

afv = {                          -- parameters for vertical airfoil
cl = {-0.1,-0.5,-0.4,-0.1,0,0,0,0,0,0,0,0,0,0,-0.2,-0.6,-0.6,-0.4,0.2,0.5,0.9,0.8,0.2,0,0,0,0,0,0,0,0,0,0.1,0.4,0.5,0.3,-0.1,-0.5},
aoa_step = 10*RAD,                      -- step size for lift coeff samples
dp = 0.03,                              -- profile drag parameters
di = {A=2.5,e=0.5},                     -- induced drag parameters
dw = {M1=0.75,M2=1.0,M3=1.1,cmax=0.04}  -- wave drag parameters
}

afh = {                          -- parameters for horizontal airfoil
cl = {0,0.4,0,-0.4,0,0.4,0,-0.4,0,0.4}, -- lift coeffs in 45deg steps from -pi
aoa_step = 45*RAD,                      -- step size for lift coeff samples
dp = 0.03,                              -- profile drag parameters
di = {A=1.5,e=0.6},                     -- induced drag parameters
dw = {M1=0.75,M2=1.0,M3=1.1,cmax=0.04}  -- wave drag parameters
}

thmain_prm = {                   -- main thruster parameters
pos = {x=0,y=0,z=-4.35},         -- thrust attack point [m]
dir = {x=0,y=0,z=1},             -- thrust direction
maxth0 = 2e4,                    -- max. vacuum thrust [N]
isp0 = 5e4                       -- vacuum ISP value [m/s]
}
thhovr_prm = {                   -- hover thruster parameters
pos = {x=0,y=-1.5,z=0},          -- thrust attack point [m]
dir = {x=0,y=1,z=0},             -- thrust direction
maxth0 = 1.5e4,                  -- max. vacuum thrust [N]
isp0 = 5e4                       -- vacuum ISP value [m/s]
}
thrcs_prm = {                    -- RCS thruster parameters
maxth0 = 2e2,                    -- max. vaccum thrust [N]
isp0 = 5e4                       -- vacuum ISP value [m/s]
}

dprm = {                         -- docking port parameters
pos = {x=0,y=1.3,z=-1},          -- position
dir = {x=0,y=1,z=0},             -- approach direction
rot = {x=0,y=0,z=-1}             -- longitudinal alignment
}

trans_Laileron = {               -- transformation for left aileron animation
type = 'rotation',                -- transformation type
mesh = 0,                         -- mesh index
grp = 2,                          -- group indices
ref = {x=-1.3,y=-0.725,z=-1.5},   -- reference point
axis = {x=-0.9619,y=-0.2735,z=0}, -- rotation axis
angle = 20*RAD                    -- rotation angle
}
trans_Raileron = {               -- transformation for right aileron animation
type = 'rotation',                -- transformation type
mesh = 0,                         -- mesh index
grp = 3,                          -- group indices
ref = {x=1.3,y=-0.725,z=-1.5},    -- reference point
axis = {x=0.9619,y=-0.2735,z=0},  -- rotation axis
angle = 20*RAD                    -- rotation angle
}
trans_Lelevator = {              -- transformation for left elevator animation
type = 'rotation',                -- transformation type
mesh = 0,                         -- mesh index
grp = 2,                          -- group indices
ref = {x=-1.3,y=-0.725,z=-1.5},   -- reference point
axis = {x=-0.9619,y=-0.2735,z=0}, -- rotation axis
angle = -30*RAD                   -- rotation angle
}
trans_Relevator = {              -- transformation for right elevator animation
type = 'rotation',                -- transformation type
mesh = 0,                         -- mesh index
grp = 3,                          -- group indices
ref = {x=1.3,y=-0.725,z=-1.5},    -- reference point
axis = {x=0.9619,y=-0.2735,z=0},  -- rotation axis
angle =  30*RAD                   -- rotation angle
}

-- SetClassCaps implementation

function clbk_setclasscaps(cfg)

-- physical vessel parameters
vi:set_size(vprm.size)
vi:set_emptymass(vprm.emass)
vi:set_pmi(vprm.pmi)
vi:set_crosssections(vprm.cs)
vi:set_rotdrag(vprm.rd)
vi:set_touchdownpoints(vprm.td1,vprm.td2,vprm.td3)

-- docking port definitions
hDock = vi:set_dockparams(dprm.pos,dprm.dir,dprm.rot)

-- airfoil definitions
vi:create_airfoil(LIFT.VERTICAL,{x=0,y=0,z=-0.1},'vlift',2,2,2.5)
vi:create_airfoil(LIFT.HORIZONTAL,{x=0,y=0,z=-0.1},'hlift',2,1.5,2)

-- control surface animations
animcomp_Laileron = oapi.create_animationcomponent(trans_Laileron)
animcomp_Raileron = oapi.create_animationcomponent(trans_Raileron)
animcomp_Lelevator = oapi.create_animationcomponent(trans_Lelevator)
animcomp_Relevator = oapi.create_animationcomponent(trans_Relevator)
anim_Laileron = vi:create_animation(0.5)
anim_Raileron = vi:create_animation(0.5)
anim_elevator = vi:create_animation(0.5)

-- aerodynamic control surface definitions
vi:create_controlsurface(AIRCTRL.ELEVATOR, 1.5, 0.5, {x=0,y=0,z=-2.5}, AIRCTRL_AXIS.XPOS, 1.0, anim_elevator);
vi:create_controlsurface(AIRCTRL.AILERON, 1.5, 0.25, {x=1,y=0,z=-2.5}, AIRCTRL_AXIS.XPOS, 1.0, anim_Laileron);
vi:create_controlsurface(AIRCTRL.AILERON, 1.5, 0.25, {x=-1,y=0,z=-2.5}, AIRCTRL_AXIS.XNEG, 1.0, anim_Raileron);

-- propellant resources
hProp = vi:create_propellantresource(vprm.fuelmass)

-- main engine
thmain_prm.hprop = hProp
thmain = vi:create_thruster(thmain_prm)
thgmain = vi:create_thrustergroup({thmain},THGROUP.MAIN)

-- hover engine
thhovr_prm.hprop = hProp
thhovr = vi:create_thruster(thhovr_prm)
thghovr = vi:create_thrustergroup({thhovr},THGROUP.HOVER)

-- RCS engines
th = thrcs_prm.maxth0
isp = thrcs_prm.isp0
thrcs0  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs1  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs2  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs3  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs4  = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs5  = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs6  = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs7  = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs8  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=-1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs9  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs10 = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=-1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs11 = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
thrcs12 = vi:create_thruster({pos={x=0,y=0,z=-3},dir={x=0,y=0,z=1},maxth0=th,isp0=isp,hprop=hProp})
thrcs13 = vi:create_thruster({pos={x=0,y=0,z=3},dir={x=0,y=0,z=-1},maxth0=th,isp0=isp,hprop=hProp})
vi:create_thrustergroup({thrcs0,thrcs2,thrcs5,thrcs7},THGROUP.ATT_PITCHUP)
vi:create_thrustergroup({thrcs1,thrcs3,thrcs4,thrcs6},THGROUP.ATT_PITCHDOWN)
vi:create_thrustergroup({thrcs0,thrcs4,thrcs3,thrcs7},THGROUP.ATT_BANKLEFT)
vi:create_thrustergroup({thrcs1,thrcs5,thrcs2,thrcs6},THGROUP.ATT_BANKRIGHT)
vi:create_thrustergroup({thrcs0,thrcs4,thrcs2,thrcs6},THGROUP.ATT_UP)
vi:create_thrustergroup({thrcs1,thrcs5,thrcs3,thrcs7},THGROUP.ATT_DOWN)
vi:create_thrustergroup({thrcs8,thrcs11},THGROUP.ATT_YAWLEFT)
vi:create_thrustergroup({thrcs9,thrcs10},THGROUP.ATT_YAWRIGHT)
vi:create_thrustergroup({thrcs8,thrcs10},THGROUP.ATT_LEFT)
vi:create_thrustergroup({thrcs9,thrcs11},THGROUP.ATT_RIGHT)
vi:create_thrustergroup({thrcs12},THGROUP.ATT_FORWARD)
vi:create_thrustergroup({thrcs13},THGROUP.ATT_BACK)

-- engine exhaust definitions

-- exhaust particle stream definitions
contrail_main = {
srcsize = 5.0,
srcrate = 16,
v0 = 200,
growthrate = 5,
atmslowdown = 3.0,
ltype = PARTICLE.DIFFUSE,
levelmap = PARTICLE.LVL_PSQRT,
lmin = 0,
lmax = 2,
atmsmap = PARTICLE.ATM_PLOG,
amin = 1e-4,
amax = 1
}
exhaust_main = {
srcsize = 2.0,
srcrate = 20,
v0 = 200,
growthrate = 8,
atmslowdown = 1.0,
ltype = PARTICLE.EMISSIVE,
levelmap = PARTICLE.LVL_SQRT,
atmsmap = PARTICLE.ATM_PLOG,
amin = 1e-5,
amax = 0.1
}

contrail_hovr = {
srcsize = 5.0,
srcrate = 8,
v0 = 200,
growthrate = 5,
atmslowdown = 3.0,
ltype = PARTICLE.DIFFUSE,
levelmap = PARTICLE.LVL_PSQRT,
lmin = 0,
lmax = 2,
atmsmap = PARTICLE.ATM_PLOG,
amin = 1e-4,
amax = 1
}
exhaust_hovr = {
srcsize = 2.0,
srcrate = 10,
v0 = 200,
growthrate = 8,
atmslowdown = 1.0,
ltype = PARTICLE.EMISSIVE,
levelmap = PARTICLE.LVL_SQRT,
atmsmap = PARTICLE.ATM_PLOG,
amin = 1e-5,
amax = 0.1
}

-- camera parameters
vi:set_cameraoffset(vprm.co)

-- associate a mesh for the visual
end

-- vertical airfoil definition

function vlift(hVessel,aoa,M,Re)
idx = math.floor((aoa+PI)/afv.aoa_step)
a = (aoa+PI-idx*afv.aoa_step)/afv.aoa_step
cl = afv.cl[idx+1]*(1-a) + afv.cl[idx+2]*a  -- lift coefficient (linear interpolation)
-- cl = cl*0.5
cm = -0.03*math.sin(aoa-0.1)         -- moment coefficient
saoa = math.sin(aoa)
cdp = afv.dp + 0.4*saoa*saoa             -- profile drag
cdi = oapi.get_induceddrag(cl,afv.di.A,afv.di.e)   -- induced drag
cdw = oapi.get_wavedrag(M,afv.dw.M1,afv.dw.M2,afv.dw.M3,afv.dw.cmax)
-- wave drag
cd = cdp + cdi + cdw                   -- drag coefficient
return cl,cm,cd
end

-- horizontal airfoil definition

function hlift(hVessel,aoa,M,Re)
idx = math.floor((aoa+PI)/afh.aoa_step)
a = (aoa+PI-idx*afh.aoa_step)/afh.aoa_step
cl = afh.cl[idx+1]*(1-a) + afh.cl[idx+2]*a
cdp = afh.dp
cdi = oapi.get_induceddrag(cl,afh.di.A,afh.di.e)
cdw = oapi.get_wavedrag(M,afh.dw.M1,afh.dw.M2,afh.dw.M3,afh.dw.cmax)
cd = cdp + cdi + cdw;
return cl,0,cd
end

Last edited:

jedidia

shoemaker without legs
It's overlooked but Orbiter but it requires no code

Calling LuaScript "not code" is like calling Javascript "not code"... :shifty: (though LUA script has a much smoother synthax)

fred18

Donator
Guys i keep getting lost in this... i read almost all the license thread, i understand the issue but GV is still there isn't it? Actually to avoid any issue just make it close source for now in case but keep it for the non coders! It's a module built for them, otherwise people would code instead of using gv. If I read correctly artlav's thread only engine texture, particle streams and sound is missing... nothing substantial in my opinion. This is working and working fine as far as I can see, so why saying that is not there anymore etc?

Last edited:

Face

Beta Tester
Guys i keep getting lost in this... i read almost all the license thread, i understand the issue but GV is still there isn't it? Actually to avoid any issue just make it close source for now in case but keep it for the non coders! It's a module built for them, otherwise people would code instead of using gv. If I read correctly artlav's thread only engine texture, particle streams and sound is missing... nothing substantial in my opinion. This is working and working fine as far as I can see, so why saying that is not there anymore etc?

Again: the whole reason to start it was to make it open-source. If you want closed-source middle-ware, use SC3. It still works, you know. It has all of the SC3 features, in contrast to even my latest version.

I am not saying that it is not there anymore, just that I personally stopped hosting and developing it. Again: take one of Artlav's versions - which are still available for download - and you will see that it is still there. You can change the code to your liking and even start hosting it yourself (or upload to OHM), because the license grants you that right.

4throck

Enthusiast !
Calling LuaScript "not code" is like calling Javascript "not code"... :shifty: (though LUA script has a much smoother synthax)

I was commenting on the example I posted. You dont need to know code in order to use it. Just replace the numbers No cicles or conditions

Face

Beta Tester
Good news for everybody hoping on genericvessel to replace SC3: no need to do so anymore, vinka returned to Dan's place and announced a brand new SC4 .

In light of the license problems and the obvious unnecessary competition a parallel framework would create, I'd say we can safely announce genericvessel to be dead now.

I'd like to thank every contributor to the project for the valuable input and hope the ideas and concepts will find a new home in SC4 (or 5,6,7...).

Happy orbiting!

Artlav

Aperiodic traveller
Beta Tester
Well, it's not like we just flush it down the toilet. The project is still useful, i.e. as an education example on how an add-on like sc3/4 works. Also, it's a compact vessel class that uses most of the Orbiter's features at once - plenty of example material.

Might be a good idea to cut it up into a set of vessel templates, for use as starting points for the devs.
That what i usually do - when i make code with some hint of generality, i usually save a cleaned version of it into a library of templates, so next time i need to do something similar i can hit the ground running instead of wasting time (and letting whatever idea i had go stale) setting up and working out the low level trivia.

Face

Beta Tester
Well, it's not like we just flush it down the toilet. The project is still useful, i.e. as an education example on how an add-on like sc3/4 works. Also, it's a compact vessel class that uses most of the Orbiter's features at once - plenty of example material.

Given the huge data-holding record structure that is used to interact with the Pascal parser, I don't think many will use this as a starting point. Too much clutter.

However, I've emailed Vinka with a request for the source code with the rational to implement some of the better points demonstrated here: multi-instance, multi-arm, beta compatibility. Let's see if he answers this time. Perhaps we can migrate some of it to his framework, so it will not feel like flushing it down the toilet .

Might be a good idea to cut it up into a set of vessel templates, for use as starting points for the devs.

Sure. Feel free to do so. However, it would have to be GPL if it is derived from the project's code, and we know that this is not well received here.

Your work might well end up just like so many of your other projects: well thought out, nicely demonstrating potential ground-breaking new approaches, but eventually being neglected and unmaintained for years up to a point where you'll practically have to abandon them.