Component database XML format

From OpenRocket wiki
Revision as of 10:53, 9 June 2013 by Soupwizard (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.


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

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


  • 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.


< common to all components, inside each of those elements >
<Manufacturer> {text} </Manufacturer>
<PartNumber> {text} </PartNumber>
<Description> {text} </Description>
<Material Type="BULK">{text} </Material> [should this be validated against material types listed higher up?]
<Mass Unit="kg">0.035892</Mass>
<Finish> </Finish>
<CG> </CG>
< /common to all components, inside each of those elements >
<InsideDiameter Unit="m">0.0657352</InsideDiameter>
<OutsideDiameter Unit="m">0.06604</OutsideDiameter>
<WallThickness Unit="m">0.06604</WallThickness>
<Length Unit="m">0.36195</Length>
<Filled>true</Filled> ?? nonfilled for baffle? or separate item for baffles? hollow plastic bulkheads?
<OutsideDiameter Unit="m">0.028701999999999995</OutsideDiameter>
<Length Unit="m">0.038099999999999995</Length>
<InsideDiameter Unit="m">0.0187452</InsideDiameter>
<OutsideDiameter Unit="m">0.0240792</OutsideDiameter>
<Thickness Unit="m">0.003175</Thickness>
<Length Unit="m">0.00635</Length>
<InsideDiameter Unit="m">0.013131799999999999</InsideDiameter>
<OutsideDiameter Unit="m">0.017983199999999998</OutsideDiameter>
<Thickness Unit="m">0.003175</Thickness>
<Length Unit="m">0.003175</Length>
<InsideDiameter Unit="m">0.0055626</InsideDiameter>
<OutsideDiameter Unit="m">0.006096</OutsideDiameter>
<Length Unit="m">0.0508</Length>
<ShapeParameter>1.0</ShapeParameter> (???)
<OutsideDiameter Unit="m">0.06604</OutsideDiameter>
<BaseDiameter Unit="m">0.06604</BaseDiameter>
<ShoulderDiameter Unit="m">0.064922</ShoulderDiameter>
<ShoulderLength Unit="m">0.0381</ShoulderLength>
<ShoulderThickness Unit="m">0.003175</ShoulderThickness>
<Length Unit="m">0.1016</Length>
<Thickness Unit="m">0.003175</Thickness>
<Diameter Unit="m">0.6095999999999999</Diameter>
<LineLength Unit="m">0.7493</LineLength>
<Length Unit="cm"> </Length>
<Length Unit="cm"> </Length>
<Width Unit="cm'> </Width>
<Area Unit="cm^2"> </Area>
<AspectRatio > </AspectRatio>
<InsideDiameter Unit="m">0.0</InsideDiameter>
<OutsideDiameter Unit="m">0.017907</OutsideDiameter>
<Thickness Unit="m">0.003175</Thickness> (wall thickness???)
<Length Unit="m">0.019049999999999997</Length>
<ForeOutsideDiameter Unit="m">0.067056</ForeOutsideDiameter>
<ForeShoulderDiameter Unit="m">0.064973</ForeShoulderDiameter>
<ForeShoulderLength Unit="m">0.0254</ForeShoulderLength>
<ForeShoulderThickness Unit="m">0.003175</ForeShoulderThickness>
<AftOutsideDiameter Unit="m">0.03175</AftOutsideDiameter>
<AftShoulderDiameter Unit="m">0.0</AftShoulderDiameter>
<AftShoulderLength Unit="m">0.0</AftShoulderLength>
<AftShoulderThickness Unit="m">0.003175</AftShoulderThickness>
does EndCapped make sense here? or ForeCapped?
<Length Unit="m">0.1524</Length>
<Thickness Unit="m">0.003175</Thickness> (wall thickness???)


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)