Component database XML format

From OpenRocket wiki
Revision as of 11:15, 9 June 2013 by Soupwizard (talk | contribs)
Jump to navigation Jump to search

Design of an XML format for component database.

A serialized database of components is created by reading one or more XML files that contain components.

<OpenRocketComponent> - base container element, surrounds everything

(Manufacturers is not implemented in version 0.1)

<Manufacturers> - list of manufacturers used in this database file

<Manufacturer id="mfgid"> - definition of a single manufacturer
(id must be unique within this file, does not need to be globally unique)
<DisplayName> - a short display/common name of the manufacturer
<FullName> - the full name of the manufacturer
<URL> - Manufacturer URL
<LogoURL> - Link to Manufacturer's logo, must be of size xx by yy pixels.
<Manufacturer>

<Manufacturers>

<Materials> - list of materials used in this database file

<Material UnitsOfMeasure="{text}">
<Name lang=""> {text} </Name>
<Density> {float} </Density>
<Type> {BULK | SURFACE | LINE} </Type>
</Material>

</Materials>

  • Are materials really needed? For most components the total mass should be known, and the best way to use it is to compute the component density from the mass. This allows the user to modify the component (e.g. shorten a body tube) and the mass changes correspondingly.


<Components>

< common to all components, inside each of those elements >
<Manufacturer>Estes</Manufacturer>
<PartNumber>PNC-80FB</PartNumber>
<Description>Estes PNC-80 Fat Boy profile cone</Description>
<Material Type="BULK">Polystyrene PS</Material>
<Mass Unit="kg">0.035892</Mass>
< /common to all components, inside each of those elements >

<BodyTube> EngineBlock LaunchLug

<NoseCone>

           <Shape>ELLIPSOID</Shape>
           <OutsideDiameter Unit="m">0.06604</OutsideDiameter>
           <ShoulderDiameter Unit="m">0.064922</ShoulderDiameter>
           <ShoulderLength Unit="m">0.0381</ShoulderLength>
           <Length Unit="m">0.1016</Length>
           <Thickness Unit="m">0.003175</Thickness>

</NoseCone?

Parachute Streamer TubeCoupler <Transition>

Common data:

<name> - short name of the part (? - is this necessary, or should it just be labeled by mfg and partno)
<partno> - Part number / ID
<description> - longer description of the part
<manufacturer ref="mfgid">
<url> - URL related to the component (? - is this useful)

<diameter>
<length>

</Components>