Difference between revisions of "Component database XML format"

From OpenRocket wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 36: Line 36:
 
:: <Material Type="BULK">{text} </Material>  [should this be validated against material types listed higher up?]
 
:: <Material Type="BULK">{text} </Material>  [should this be validated against material types listed higher up?]
 
:: <Mass Unit="kg">0.035892</Mass>
 
:: <Mass Unit="kg">0.035892</Mass>
 +
:: <Finish> </Finish>
 +
:: <CG> </CG>
 
: < /common to all components, inside each of those elements >
 
: < /common to all components, inside each of those elements >
  
Line 41: Line 43:
 
:: <InsideDiameter Unit="m">0.0657352</InsideDiameter>
 
:: <InsideDiameter Unit="m">0.0657352</InsideDiameter>
 
:: <OutsideDiameter Unit="m">0.06604</OutsideDiameter>
 
:: <OutsideDiameter Unit="m">0.06604</OutsideDiameter>
 +
:: <WallThickness Unit="m">0.06604</WallThickness>
 
:: <Length Unit="m">0.36195</Length>
 
:: <Length Unit="m">0.36195</Length>
 
: </BodyTube>
 
: </BodyTube>
 +
 +
: <BulkHead>
 +
:: <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>
 +
: </BulkHead>
 +
 +
: <CenteringRing>
 +
:: <InsideDiameter Unit="m">0.0187452</InsideDiameter>
 +
:: <OutsideDiameter Unit="m">0.0240792</OutsideDiameter>
 +
:: <Thickness Unit="m">0.003175</Thickness> 
 +
:: <Length Unit="m">0.00635</Length>
 +
: </CenteringRing>
  
 
: <EngineBlock>
 
: <EngineBlock>
 +
:: <InsideDiameter Unit="m">0.013131799999999999</InsideDiameter>
 +
:: <OutsideDiameter Unit="m">0.017983199999999998</OutsideDiameter>
 +
:: <Thickness Unit="m">0.003175</Thickness>
 +
:: <Length Unit="m">0.003175</Length>
 
: </EngineBlock>
 
: </EngineBlock>
  
Line 55: Line 75:
 
: <NoseCone>
 
: <NoseCone>
 
:: <Shape>ELLIPSOID</Shape>
 
:: <Shape>ELLIPSOID</Shape>
 +
:: <ShapeParameter>1.0</ShapeParameter> (???)
 +
:: <Filled>true</Filled>
 
:: <OutsideDiameter Unit="m">0.06604</OutsideDiameter>
 
:: <OutsideDiameter Unit="m">0.06604</OutsideDiameter>
 +
:: <BaseDiameter Unit="m">0.06604</BaseDiameter>
 
:: <ShoulderDiameter Unit="m">0.064922</ShoulderDiameter>
 
:: <ShoulderDiameter Unit="m">0.064922</ShoulderDiameter>
 
:: <ShoulderLength Unit="m">0.0381</ShoulderLength>
 
:: <ShoulderLength Unit="m">0.0381</ShoulderLength>
 +
:: <ShoulderThickness Unit="m">0.003175</ShoulderThickness>
 +
:: <EndCapped>true</EndCapped>
 
:: <Length Unit="m">0.1016</Length>
 
:: <Length Unit="m">0.1016</Length>
 
:: <Thickness Unit="m">0.003175</Thickness>
 
:: <Thickness Unit="m">0.003175</Thickness>
 
: </NoseCone>
 
: </NoseCone>
  
Parachute
+
: <Parachute>
Streamer
+
:: <Diameter Unit="m">0.6095999999999999</Diameter>
 +
:: <DragCoefficient>0.80</DragCoefficient>
 +
:: <Sides>8</Sides>
 +
:: <LineCount>8</LineCount>
 +
:: <LineLength Unit="m">0.7493</LineLength>
 +
:: <RadialDistance>1</RadialDistance>
 +
:: <RadialDirection>15</RadialDirection>
 +
: </Parachute>
 +
 
 +
: <ShockCord>
 +
:: <Length Unit="cm"> </Length>
 +
: </ShockCord>
 +
 
 +
: <Streamer>
 +
:: <DragCoefficient>0.80</DragCoefficient>
 +
:: <Length Unit="cm"> </Length>
 +
:: <Width Unit="cm'> </Width>
 +
:: <Area Unit="cm^2"> </Area>
 +
:: <AspectRatio > </AspectRatio>
 +
:: <RadialDistance>1</RadialDistance>
 +
:: <RadialDirection>15</RadialDirection>
 +
: <Streamer>
  
 
: <TubeCoupler>
 
: <TubeCoupler>
 
:: <InsideDiameter Unit="m">0.0</InsideDiameter>
 
:: <InsideDiameter Unit="m">0.0</InsideDiameter>
 
:: <OutsideDiameter Unit="m">0.017907</OutsideDiameter>
 
:: <OutsideDiameter Unit="m">0.017907</OutsideDiameter>
 +
:: <Thickness Unit="m">0.003175</Thickness>  (wall thickness???)
 
:: <Length Unit="m">0.019049999999999997</Length>
 
:: <Length Unit="m">0.019049999999999997</Length>
 
: <TubeCoupler>
 
: <TubeCoupler>
Line 73: Line 120:
 
: <Transition>
 
: <Transition>
 
:: <Shape>OGIVE</Shape>
 
:: <Shape>OGIVE</Shape>
 +
:: <Filled>true</Filled>
 
:: <ForeOutsideDiameter Unit="m">0.067056</ForeOutsideDiameter>
 
:: <ForeOutsideDiameter Unit="m">0.067056</ForeOutsideDiameter>
 
:: <ForeShoulderDiameter Unit="m">0.064973</ForeShoulderDiameter>
 
:: <ForeShoulderDiameter Unit="m">0.064973</ForeShoulderDiameter>
 
:: <ForeShoulderLength Unit="m">0.0254</ForeShoulderLength>
 
:: <ForeShoulderLength Unit="m">0.0254</ForeShoulderLength>
 +
:: <ForeShoulderThickness Unit="m">0.003175</ForeShoulderThickness> 
 
:: <AftOutsideDiameter Unit="m">0.03175</AftOutsideDiameter>
 
:: <AftOutsideDiameter Unit="m">0.03175</AftOutsideDiameter>
 
:: <AftShoulderDiameter Unit="m">0.0</AftShoulderDiameter>
 
:: <AftShoulderDiameter Unit="m">0.0</AftShoulderDiameter>
 
:: <AftShoulderLength Unit="m">0.0</AftShoulderLength>
 
:: <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>
 
:: <Length Unit="m">0.1524</Length>
:: <Thickness Unit="m">0.003175</Thickness>
+
:: <Thickness Unit="m">0.003175</Thickness> (wall thickness???)
 
: </Transition>
 
: </Transition>
  
 
+
</Components>
  
 
Common data:
 
Common data:

Latest revision as of 11:53, 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>
<Finish> </Finish>
<CG> </CG>
< /common to all components, inside each of those elements >
<BodyTube>
<InsideDiameter Unit="m">0.0657352</InsideDiameter>
<OutsideDiameter Unit="m">0.06604</OutsideDiameter>
<WallThickness Unit="m">0.06604</WallThickness>
<Length Unit="m">0.36195</Length>
</BodyTube>
<BulkHead>
<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>
</BulkHead>
<CenteringRing>
<InsideDiameter Unit="m">0.0187452</InsideDiameter>
<OutsideDiameter Unit="m">0.0240792</OutsideDiameter>
<Thickness Unit="m">0.003175</Thickness>
<Length Unit="m">0.00635</Length>
</CenteringRing>
<EngineBlock>
<InsideDiameter Unit="m">0.013131799999999999</InsideDiameter>
<OutsideDiameter Unit="m">0.017983199999999998</OutsideDiameter>
<Thickness Unit="m">0.003175</Thickness>
<Length Unit="m">0.003175</Length>
</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>
<ShapeParameter>1.0</ShapeParameter> (???)
<Filled>true</Filled>
<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>
<EndCapped>true</EndCapped>
<Length Unit="m">0.1016</Length>
<Thickness Unit="m">0.003175</Thickness>
</NoseCone>
<Parachute>
<Diameter Unit="m">0.6095999999999999</Diameter>
<DragCoefficient>0.80</DragCoefficient>
<Sides>8</Sides>
<LineCount>8</LineCount>
<LineLength Unit="m">0.7493</LineLength>
<RadialDistance>1</RadialDistance>
<RadialDirection>15</RadialDirection>
</Parachute>
<ShockCord>
<Length Unit="cm"> </Length>
</ShockCord>
<Streamer>
<DragCoefficient>0.80</DragCoefficient>
<Length Unit="cm"> </Length>
<Width Unit="cm'> </Width>
<Area Unit="cm^2"> </Area>
<AspectRatio > </AspectRatio>
<RadialDistance>1</RadialDistance>
<RadialDirection>15</RadialDirection>
<Streamer>
<TubeCoupler>
<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>
<TubeCoupler>
<Transition>
<Shape>OGIVE</Shape>
<Filled>true</Filled>
<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???)
</Transition>

</Components>

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>