Difference between revisions of "Component database XML format"

From OpenRocket wiki
Jump to navigation Jump to search
Line 62: Line 62:
 
: </NoseCone>
 
: </NoseCone>
  
Parachute
+
: <Parachute>
Streamer
+
:: <Diameter Unit="m">0.6095999999999999</Diameter>
 +
:: <Sides>8</Sides>
 +
:: <LineCount>8</LineCount>
 +
:: <LineLength Unit="m">0.7493</LineLength>
 +
: </Parachute>
 +
 
 +
: <Streamer>
 +
:: <Length Unit="cm"> </Length>
 +
:: <Width Unit="cm'> </Width>
 +
: <Streamer>
  
 
: <TubeCoupler>
 
: <TubeCoupler>

Revision as of 11:27, 9 June 2013

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> {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>
< /common to all components, inside each of those elements >
<BodyTube>
<InsideDiameter Unit="m">0.0657352</InsideDiameter>
<OutsideDiameter Unit="m">0.06604</OutsideDiameter>
<Length Unit="m">0.36195</Length>
</BodyTube>
<EngineBlock>
</EngineBlock>
<LaunchLug>
<InsideDiameter Unit="m">0.0055626</InsideDiameter>
<OutsideDiameter Unit="m">0.006096</OutsideDiameter>
<Length Unit="m">0.0508</Length>
</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>
<Diameter Unit="m">0.6095999999999999</Diameter>
<Sides>8</Sides>
<LineCount>8</LineCount>
<LineLength Unit="m">0.7493</LineLength>
</Parachute>
<Streamer>
<Length Unit="cm"> </Length>
<Width Unit="cm'> </Width>
<Streamer>
<TubeCoupler>
<InsideDiameter Unit="m">0.0</InsideDiameter>
<OutsideDiameter Unit="m">0.017907</OutsideDiameter>
<Length Unit="m">0.019049999999999997</Length>
<TubeCoupler>
<Transition>
<Shape>OGIVE</Shape>
<ForeOutsideDiameter Unit="m">0.067056</ForeOutsideDiameter>
<ForeShoulderDiameter Unit="m">0.064973</ForeShoulderDiameter>
<ForeShoulderLength Unit="m">0.0254</ForeShoulderLength>
<AftOutsideDiameter Unit="m">0.03175</AftOutsideDiameter>
<AftShoulderDiameter Unit="m">0.0</AftShoulderDiameter>
<AftShoulderLength Unit="m">0.0</AftShoulderLength>
<Length Unit="m">0.1524</Length>
<Thickness Unit="m">0.003175</Thickness>
</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>