next up previous contents
Next: 4 FSML Document Type Up: 3 Examples Previous: 3.6 How to Process   Contents


3.7 Putting It All Together: Describing a Legacy Application Input File

As pictured in Figure 1 in Section 1.2, each input and output file for a legacy application has a corresponding FSML file that describes its contents. This section shows a typical legacy input file and the FSML file that describes it.

Legacy Input File

! Data file for lethality evaluator
1.22  , TNT Equivalence Factor
! *******************************************
! Fuzing option
! 0 - contact detonation
! 1 - standoff detonation
  0
! *******************************************
! if  fuzing option = 0, specify:
0.3, Torpedo Diameter (m)
1700    , Warhead density (kg/m3)
3       , number of noselength data points
! noselength data
! Diameter(m)   Nose Length(m)
  .1524         .254
  .3048         .3048
  .5334         .4572
! else specify standoff distance in m
! 12.5
 4       , Number of Pkill data points
! Pkill Data
! sqrt(TNT eq(kg))/(detonation distance(m))  Pkill
  0                                          0
  8.522                                      .1
  9.882                                      .5
  11.172                                     .9

Corresponding FSML File

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FileTypeSpecification SYSTEM
"file:/F:/ONR/UWDO/Codes/letheval/fsml/FSMLv2.7.dtd">
<FileTypeSpecification lineCommentStart="!" ignoreBlankLines="false">
  <FileData>
    <Float name="TNT_Equivalence_Factor"/>
    <Integer name="Fuzing_Option"/>
    <Float name="Torpedo_Diameter"/>
    <Integer name="Warhead_Density"/>
    <Integer name="NoseLength_Data_Points"/>
    <Array name="Diameter" ndims="1" dims="10" baseType="Float"/>
    <Array name="NoseLength" ndims="1" dims="10" baseType="Float"/>
    <Integer name="Pkill_Data_Points"/>
    <Array name="TNT_EQ-Detonation_Dist" ndims="1" dims="10"
           baseType="Float"/>
    <Array name="Pkill" ndims="1" dims="10" baseType="Float"/>
  </FileData>
  <FileStructure>
    <StaticText>! Data file for lethality evaluator</StaticText>
 
    <Record ignoreOnRead="false">
      <SetValue target="TNT_Equivalence_Factor"/>
    </Record>
 
    <StaticText>! *******************************************</StaticText>
    <StaticText>! Fuzing option</StaticText>
    <StaticText>! 0 - contact detonation</StaticText>
    <StaticText>! 1 - standoff detonation</StaticText>
 
    <Record ignoreOnRead="false">
      <SetValue target="Fuzing_Option"/>
    </Record>
 
    <StaticText>! *******************************************</StaticText>
    <StaticText>! if fuzing option = 0, specify:</StaticText>
 
    <Record ignoreOnRead="false">
      <SetValue target="Torpedo_Diameter"/>
    </Record>
 
    <Record ignoreOnRead="false">
      <SetValue target="Warhead_Density"/>
    </Record>
 
    <Record ignoreOnRead="false">
      <SetValue target="NoseLength_Data_Points"/>
    </Record>
 
    <StaticText>! noselength data</StaticText>
    <StaticText>! Diameter(m)   Nose Length(m)</StaticText>
 
    <Loop loopVariable="i" start="0" end="2" incr="1" doOnce="true">
      <Record ignoreOnRead="true">
        <AddValue target="Diameter"/>
        <AddValue target="NoseLength"/>
      </Record>
    </Loop>
 
    <StaticText>! else specify standoff distance in m</StaticText>
    <StaticText>! 12.5</StaticText>
 
    <Record ignoreOnRead="false">
      <SetValue target="Pkill_Data_Points"/>
    </Record>
 
    <StaticText>! Pkill Data</StaticText>
    <StaticText>! sqrt(TNT eq(kg))/(detonation distance(m))</StaticText>
 
    <Loop loopVariable="i" start="0" end="3" incr="1" doOnce="true">
      <Record ignoreOnRead="true">
        <AddValue target="TNT_EQ-Detonation_Dist"/>
        <AddValue target="Pkill"/>
      </Record>
    </Loop>
 
  </FileStructure>
</FileTypeSpecification>


next up previous contents
Next: 4 FSML Document Type Up: 3 Examples Previous: 3.6 How to Process   Contents

SAIC Ship Technology Division, Annapolis, Maryland, USA
2004-10-26