How to Install/Promote a Model

 

Internal Document Only -- Watch Us Work

 

  1. Make the pfb file.
     
  2. Make directory structure (see below).
     
  3. Copy the pfb file to new directory.
    Copy modelname.xml file to new directory -- must be vrNav2 xml 5.4 or later format.
    If the model does not use the system default gamma, copy gamma directory and modelname.gamma file.

    cp -R oldpath/gamma .

    Optionally, copy modelname.rc file.
    Do not copy any existing path file -- it will not work.
     
  4. Modify xml file (see below).
     
  5. Test it with vrNav2new Version 5.8 uses real meters, not pseudometers.
  6. cd /demo/arch*/archives/modelname/modelname-2004-06-01
    vrNav2new modelname.xml

  7. Pieter links new directory to the name "production".

    cd /demo/arch*/archives/modelname
    ln -s modelname-2004-06-01 production

  8. Pieter links /demo/architecture_models/run_arch to /software/bin/modelname.

    cd /software/bin
    ln -sf /demo/architecture_models/run_arch modelname

  9. Then you can enter modelname at the shell prompt to start the new way. We can convert models one by one to production status; we don't have to convert them all before making any converted models production.

Following are the 3 detail sections: make directory structure, modify xml file, and example of xml file changes.

Make Directory Structure

Example


/demo/architecture_models/archives/
    port_royal/
        port_royal-2004-06-01/
            gamma/
                port_royal.gamma
            port_royal.pfb
            port_royal.rc
            port_royal.xml
        production -> port_royal-2004-06-01

Modify xml File

  1. Change <FilePath> to /demo/architecture_models/archives/modelname/modelname-2004-06-01/ which is the directory containing the pfb file.

    <FilePath>.:/demo/architecture_models/archives/port_royal/port_royal-2004-04-01</FilePath>
     

  2. Change <filename> to whatever.pfb file name.

    <filename>port_royal.pfb</filename>
     

  3. Conversion factor, from pseudometers to real meters.

    Use 3 or 4 <StartLocation> elements and convert values to real meters. The <StartLocation> values are the negative of the former <x> <y> <z> values.

    Do not use <x> <y> <z> elements in <Model> for starting location for a single architecture model.

    Do not use <xrot> <yrot> <zrot> in <Model> to rotate the model. Instead, use a 4th <StartLocation> element for heading (y rotation)

    See <!-- NEW WAY --> below for an example.

    You can use some calculator, like xcalc on maravillas:

    pseudometers * 3.8 * 0.3048 = realmeters
    pseudometers * 3.8 / 3.280839895 = realmeters

    Or, you can use the m2m script on maravillas:

    input: m2m 3200 400 800
    output:
    3200 3706.36800000
    400 463.29600000
    800 926.59200000

    Or you can figure out some other way to make the new start location numbers about 15.82% bigger than the old pseudometers.
     

  4. It would be very helpful if you appended a line like this to the xml file.

    <!-- moved to /demo/architecture_models/archives Jun 1, 2004 -->

Example of xml File Changes

<!-- START EXAMPLE -->

<!-- OLD WAY -->

    <StartLocation>0.0</StartLocation>     <!-- x -->
    <StartLocation>0.0</StartLocation>     <!-- y -->
    <StartLocation>0.0</StartLocation>     <!-- z -->

    <Model>
      <Model name="Models 0">
        <filename>port_royal.pfb</filename>
        <scale>1.0</scale>
        <x>-3200.0</x>
        <y>-400.0</y>
        <z>-800.0</z>
        <rotx>0.0</rotx>
        <roty>0.0</roty>
        <rotz>0.0</rotz>
        <!-- other stuff -->
      </Model>
    </Model>

<!-- NEW WAY -->

    <StartLocation>3706.3680</StartLocation> <!-- x negative of old value -->
    <StartLocation>463.2960</StartLocation>  <!-- y negative of old value -->
    <StartLocation>926.5920</StartLocation>  <!-- z negative of old value -->
    <StartLocation>0.0</StartLocation>       <!-- optional: y rotation -->

    <Model>
      <Model name="Models 0">
        <filename>port_royal.pfb</filename>
        <scale>1.0</scale>
        <x>0.0</x>
        <y>0.0</y>
        <z>0.0</z>
        <rotx>0.0</rotx>
        <roty>0.0</roty>
        <rotz>0.0</rotz>
        <!-- other stuff -->
      </Model>
    </Model>

<!-- moved to /demo/architecture_models/archives Jun 1, 2004 -->