Idea Orbiter Community API

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,038
Reaction score
1,275
Points
188
Location
Dallas, TX
Orbiter has a fairly broad range of addons meant to assist in the development of other addons, such as Velcro and UMMU. The problem is that many of these addons can't be used together. For example, Velcro requires that a Velcro stage use the line "Module = Velcro" in its config file, giving no means that I'm aware of for adding Velcro functionality to a ship using a custom module. Meanwhile, UMMU requires that vessel using it use a custom module that links to the UMMU module. As a result, the two can't be used in the same vessel.

Therefore, I would like to propose the establishment of a set of standard modules, interoperable with one another, that implement important functionalities not provided by Orbiter itself, such as staging management (as currently provided by Velcro), cargo management (UCGO), and UMMU type functionality, as well as a means of allowing new functionality-providing addons to ensure interoperability with the aforementioned set of standard modules (such as by means of a wrapper module that functionality-providing modules, including the standard set, can link to). Together, these modules would expose an interface to be known as the "Orbiter Community API", or OCAPI.

Desirable features of OCAPI:

1) Complete interoperability: A custom module of a given type (vessel, planet, MFD, etc.) should be able to link to any OCAPI module, or any combination of OCAPI modules, appropriate for that type, and use the complete functionality of the module(s) it links to: For example, if a vessel module links to an OCAPI module providing cargo management functionality, it should be able to link to an OCAPI module providing staging functionality. Linking to and using the full functionality of either module should not restrict the functionality in the other module that the vessel can use, unless a combination of functionalities would be impossible in real life (such as some detail of staging restricting what kinds of cargoes a vessel could realistically carry).

2) Accessibility to config-only addons: As much as possible of an OCAPI module's functionality should be made available through config files, probably with the help of wrapper modules (vessels using OCAPI features might use "Module = OCAPIVessel", for instance, and then have a "OCAPIModules = X,Y,Z" line to specify needed OCAPI modules).

3) Use of existing code as much as possible: Where a set of functionality is implemented by an existing addon that is already seen as more or less a standard, that addon should be incorporated into OCAPI if the source is publicly available or if the author is willing to spend the time himself to modify it to be part of OCAPI, otherwise, if technical and licensing considerations allow, it should be wrapped by OCAPI. A new module should be written to reimplement existing functionality only as a last resort if no other means of providing that functionality in a manner that interoperates with OCAPI exists.

There may, however, be a few situations where it is desirable to break this rule: For example, there are MFDs that provide means of transferring fuel between vessels, but it would probably good to have a vessel-oriented, rather than MFD-oriented means of doing fuel transfers, so that vessels can specify what fuel types they carry for different tanks, what (if any) fueling adapters they have on different docking ports, what transfer rates they can provide or accept fuel at, etc. It might still be good to have an MFD that provides an interface to this functionality, but the "standard" fuel transfer MFD should simply be a front-end to the vessel-based fuel transfer API, rather than transferring fuel itself.

4)Source code and licensing: It is generally desirable that OCAPI modules be open source, to increase the [ame="http://en.wikipedia.org/wiki/Bus_factor"]bus factor[/ame] of OCAPI so that a single developer disappearing, followed by a new Orbiter version breaking an OCAPI module he maintained, does not cause that modules functionality to become unavailable. It is also desirable that modules not carry any GPL-style linking restrictions, so that addon developers aren't constrained in their choice of license by the license on an OCAPI module they want to use (which is to say, LGPL or BSD would be preferable to the GPL). It may also be good for the licensing terms for OCAPI modules to allow Martin to incorporate those modules into Orbiter if he wishes.

5)A standard distribution: Any developer should be able to make a functionality providing addon that interoperates with OCAPI and distribute it as they wish, but it is desirable for there to be a core set of OCAPI modules that have been vetted for quality and verified to interoperate that are distributed together. All OCAPI modules in the standard distribution should adhere to the above 4 points as much as possible, with certain exceptions: e.g, for modules that already exist to be incorporated into the standard OCAPI distribution, (4) might have to be relaxed, as I'm not sure how willing the developers of those modules would be to relicense their modules for incorporation into OCAPI, and I don't really desire to push them very hard to do so. For modules written specifically for OCAPI, on the other hand, it would probably be good to say they have to adhere to (4) to be included in the standard distribution.

6) List of desirable functionalities: Below I'll list some functionalities that might benefit from a standardized implementation through OCAPI, with existing modules (if any) that provide that functionality in parentheses. I'll edit this post to include other functionalities as I think of them. Feel free to list other functionalities that you think would be good to standardize in OCAPI:

Fuel transfer / fuel types
Crew and EVA management (UMMU)
Cargo management (UCGO)
Staging (Velcro*)
A means of specifying ephemerides/orbital perturbations in planetary config files
Intermodule communication (Enjo's new ModuleMessaging SDK)

*The Velcro documentation says that the standard staging implementation for Orbiter is Multistage, but as far as I understand, Vinka is MIA and Sputnik is not, which means that the bus factor for multistage is 0, while Velcro still has a non-zero bus factor (AFAIK, the Velcro bus factor is 1). Therefore, Velcro is a preferable standard to Multistage.

7) An [ame="http://en.wikipedia.org/wiki/Okapi"]okapi[/ame] for a mascot?

This is only a proposal, and OCAPI doesn't have to look exactly as I've portrayed it here (nor does it necessarily have to be called OCAPI, and if interest is low enough, it doesn't have to exist, though I think it would be massively helpful). Therefore, feedback would be much appreciated.

If you're a general addon developer, would you like to see something like OCAPI? Do you have an addon I did not list above that you think might be a good candidate for inclusion in OCAPI?

If you're a developer for one of the modules I've listed here as a candidate for incorporation into OCAPI, are you interested in participating? Do you anticipate licensing issues?

Comments? Questions? Snide remarks?
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,924
Reaction score
232
Points
138
Location
Cape
Are you saying SC3 should be obsolite ?
 

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
It could be great, but...
standards.png


And it's a lot of work.
My initial idea for Simulator Abstraction Layer was along the same lines - http://www.orbiter-forum.com/showthread.php?t=32138 , and ended up with SC3.

So, it might be a good idea to base this off SC3/Genericvessel - it's more user-friendly than programming, it's already here and is widely used, it can be extended arbitrarily.

Also, the "bus factor" is anything - if any of the UMMU/Velcro/ModuleMessaging/etc pull an existence failure, then we can adapt the open-source module to use a different SDK for the task, without altering or affecting the actual add-ons.
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,038
Reaction score
1,275
Points
188
Location
Dallas, TX
Are you saying SC3 should be obsolite ?

According to the forum member list, Vinka hasn't logged on since 2012. There's no guarantee that future Orbiter versions won't break SC3, and multistage *was* broken by 2010, necessitating a third party fix. Whether it *should* be obsolete or not, a project that's not being maintained quickly becomes obsolete.

If SC3 and Multistage were being actively developed, they'd probably be prime candidates for inclusion in OCAPI, if Vinka wanted to participate. But unless Vinka returns and restarts their development, it's probably good to standardize on something else.
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
For the Cargo Standard, I would use the XRCargo. It is much more flexible and easier to use.

My upcoming Cargo Ops will use the XR standard.
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,038
Reaction score
1,275
Points
188
Location
Dallas, TX
It could be great, but...
standards.png

OCAPI is not meant to compete with existing standards. Existing standards, should, as much as possible, be incorporated into OCAPI. Ideally, the only new modules in OCAPI should be ones that implement functionality that does not yet exist.

And it's a lot of work.
My initial idea for Simulator Abstraction Layer was along the same lines - http://www.orbiter-forum.com/showthread.php?t=32138 , and ended up with SC3.

The idea here isn't really to abstract things away from Orbiter anymore than existing modules like Velcro and UMMU do: the idea is to put together a standard for writing Orbiter modules that don't get in each other's way, and then to put together a set of modules that use that standard to avoid interfering with each other, hopefully rewrites of existing standard modules in cases where a standard already exists (and hopefully with as little modification to the existing code of existing modules as possible), but using new modules if necessary.

So, it might be a good idea to base this off SC3/Genericvessel - it's more user-friendly than programming, it's already here and is widely used, it can be extended arbitrarily.

It might well be a good idea for Genericvessel to be a component of OCAPI.
 

Loru

Retired Staff Member
Retired Staff
Addon Developer
Donator
Joined
Sep 30, 2008
Messages
3,731
Reaction score
6
Points
36
Location
Warsaw
It might well be a good idea for Genericvessel to be a component of OCAPI.

IMO it would be better if genericvessel after reaching full sc3/multistage backward compatibility (to save existing add-ons) could expand to include such things like fuel crossfeeding, UMMU and Cargo support etc. It is already reaching that stage.
just my :2cents:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,657
Reaction score
2,379
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
OCAPI is not meant to compete with existing standards. Existing standards, should, as much as possible, be incorporated into OCAPI. Ideally, the only new modules in OCAPI should be ones that implement functionality that does not yet exist.

Doesn't change anything at all regarding standards.

Also, you can't please them all. Keep the modules small and maybe specialize a lot.

And damn me, but I don't want to have UMMu style EVAs and crew transfers between vessels that are not supposed to do this. Go to Kerbal Space Program, if you want to play Lego at all costs.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
One thing that would be useful is a visual script syntax / dependencies schecker. Something that validated your code and checked to see if all meshes and config files existed. Also calculated the total masses of the complete stack and so forth. Useful for "cascading" sc3/velcro/multistage implementations with many payloads and attachments.
I think that any interpreter will do this internally, so we only need some sort of interface.

So I'd suggest focusing on a tool that helped to develop using the existing "languages", and then add new functions to genericvessel.
Having UMMU/UCGO integrated with SC3 attachments would be great ( I have that limitation with the Skylab B EVA and jetpack). Also support for local lights would be good.

At least I'd use it a lot and I think we'd see many old add-ons updated.


Please don't make the mistake of having add-ons distribute the modules.
I have lot's of trouble with old add-ons that overwrite the current stage.dll / spacecraft3.dll.

:2cents:
 

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
If SC3 and Multistage were being actively developed
They are, in shape of Genericvessel.
With permission from Vinka, no less.

And not just backwards compatibility, but extension of it.
UMMU is already supported, for example.

All it would take is a push to get it up to full SC3 compatibility, and there you have it.
I'm about to post an updated version with all the fixes ported back from SW, so it's not even all that far-fetched.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
UMMU is already supported, for example.

All it would take is a push to get it up to full SC3 compatibility, and there you have it.

More than welcome for that!
I'd like to use genericvessel only, but until we have full SC3 support that's not doable. UMMU is great, but UCGO is also needed to make the EVAs fun:thumbup:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,657
Reaction score
2,379
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
phhh, kids these days... when I was a wee lad... :lol:

...we had been happy if we had been allowed to open the hatches for standing up in the cardboard box they called spacecraft back then...
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
...we had been happy if we had been allowed to open the hatches for standing up in the cardboard box they called spacecraft back then...

And the traverses were uphill, both ways! With significantly higher casualties!!!
 

tomthenose

Addon Developer
Addon Developer
Joined
Jan 27, 2011
Messages
96
Reaction score
0
Points
0
Location
aberdeen, scotland
I'd definitely like something like this, there are some large gaps in what you can do as a non-programming addon maker, proper virtual cockpits and payload management would be top of my list (xr or payload manager). i think some or all of this might be possible with Genericvessel.

to be fair most of the programming required to add UCGO, Payload manager, etc is pretty straight forwards and well documented, i'd just rather invest as much time as possible into making better models and have the whole config side be as quick and easy as possible. And that, your honour, is the lazy truth!
 

Linguofreak

Well-known member
Joined
May 10, 2008
Messages
5,038
Reaction score
1,275
Points
188
Location
Dallas, TX
Doesn't change anything at all regarding standards.

Also, you can't please them all. Keep the modules small and maybe specialize a lot.

There's no reason that OCAPI modules can't be small and specialized. OCAPI would basically be three things:

1) A standard, and possibly a set of wrapper modules, for writing modules interoperably.

2) A set of modules using (1) to ensure that each module can be used in combination with any of the others. This will hopefully include most or all of today's standard modules, and the size and degree of specialization of any individual module will ideally not be much different than things are now. It's just that, if everything goes well, a vessel will be able to be both a Velcro stage (or whatever the eventual staging standard is) and a UMMU vessel if the addon developer needs both sets of functionality, which is not, AFAIK, currently the case.

3) The set of interfaces provided by (1) and (2).

And damn me, but I don't want to have UMMu style EVAs and crew transfers between vessels that are not supposed to do this. Go to Kerbal Space Program, if you want to play Lego at all costs.

Nothing about OCAPI says that every vessel that uses OCAPI has to use UMMU (or whatever the eventual crew/EVA standard is). The idea is to make sure that standard modules are never mutually exclusive (as UMMU and Velcro, among others, are now), so that a developer developing an addon that needs the functionality provided by two standard modules doesn't have to choose one and then reimplement the functionality of the other from scratch specifically for his addon.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
"Just" add the parameter OCAPI_UMMUattach=1 or OCAPI_UCGOattach=1 to sc3 attachment ports in your sc3 rocket.cfg :)

The suggestion is to have "OCAPI_" commands on the existing text configs (velcro, multistage, sc3, etc). The normal parsers will just ignore them, but OCAPI will use them.

Simple and would work with no need for extra files.
 
Last edited:

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,657
Reaction score
2,379
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Aha. Sorry, I don't like the idea at all, it sounds like the fastest passage into development hell.

I already have enough test effort making sure that the interfaces inside my own add-ons work. No need to make this more complex by introducing new error sources.

If you think you do yourself a favor with your plan, develop it. All I see there is another pseudo-standard for making idiots bug developers with requests to make an add-on support their favorite pseudo-standard.

Like requiring UMMU for Velcro.... HELLO? :facepalm:
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Mind your language my friend.
Idiot is offensive on my book, regardless of being directed at me or not.

And yes, UMMU for velcro makes sense. Have you ever used Velcro Saturns? There's a Velcro LEM....

Code:
STAGE ApolloSM Velcro/ApolloSM Velcro/ApolloSM 0 0 16.25 24523.0 0.0 1.0
  STAGE ApolloLMDS Velcro/ApolloLMDSFolded Velcro/ApolloLMDS 0 0 21.25 10149.0 0.0 1.0

Perhaps Velcro is indeed an idiotic script language... :p
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Like requiring UMMU for Velcro.... HELLO? :facepalm:

When has this ever happened?

Quite frankly I think the idea is fine, although it will be a lot of work. Projects like these tend to work better when done in small individual packets, like UCGO, UMMU, Orbitersound, and Camshake. If one component can work effectively on its own, no work will be wasted if one feature ends up being a dead end.
 
Top