Boat data structure |
Boat design sample |
Instrument panels |
Weapons
The instrument panels are used by all the boats in
Virtual Sailor, each boat configuration file specifies a
panel name and a position in which to place this panel.
The panel itself is made of
a panel frame and a collection of instruments which are
placed in this panel frame.
The
panels directory inside the Virtual Sailor directory contains the available panels, each panel is placed
inside a directory inside the Virtual
Sailor\panels
directory.
Inside
each panel directory are the following files:
The Panel.cfg file
This file contains the name and positions of all the instruments
in the panel, and a short description for it.
| The structure of
the panel.cfg file is as follows: |
8 [instruments]
speed_1 [name]
-3.2 [xpos]
0.0 [ypos]
0.0 [zpos]
1.0 [scale]
dgstrip_1 [name]
-2.0 [xpos]
0.0 [ypos]
0.0 [zpos]
0.8 [scale]
rpm_1 [name]
-0.35 [xpos]
0.0 [ypos]
0.0 [zpos]
1.0 [scale]
fuel_1 [name]
0.7 [xpos]
0.0 [ypos]
0.0 [zpos]
1.0 [scale]
throt_1 [name]
1.4 [xpos]
-0.1 [ypos]
0.0 [zpos]
1.5 [scale]
autop_1 [name]
-1.1 [xpos]
0.0 [ypos]
0.0 [zpos]
0.8 [scale]
dggps [name]
3.2 [xpos]
-0.3 [ypos]
-0.3 [zpos]
1.0 [scale]
-0.5 [alfa]
dgradar [name]
0.7 [xpos]
-3.0 [ypos]
-0.6 [zpos]
1.5 [scale]
-0.5 [alfa]
0.5 [beta]
-0.3 [gama]
@
Basic panel
|
Explanation:
|
This file is composed of two sections:
1.the panel data:
instruments - number of
instruments in the panel
instrument - name of instrument to be used (
repeated for each instrument )
xpos - the x position of the instrument (
repeated for each instrument )
ypos - the y position of the instrument (
repeated for each instrument )
zpos - the z position of the instrument (
repeated for each instrument )
scale - a scale factor for the instrument (
repeated for each instrument )
alfa - angle of pitch of the instrument in radians.
beta - angle of yaw of instrument in radians.
gama - angle of roll of instrument in radians.
2. The panel description :
this part is a simple text only
section that must begin with @ and ends at the
file end.
|
This
picture shows the above panel.

Panel.x
This is an optional model file for the panel
without the instruments.
This
is a simple one frame
hirarchy mesh file, it can be created by converting a 3DS file into an X file by using the command "conv3ds
-m [filename.3ds]" , conv3ds.exe is a
small freeware converter written by Microsoft.
Download source
files and conv3ds
The Instruments:
The instrument panels
configuration file contains names and positions of
instruments that are placed into them.
Each instrument is made of
an instrument frame and a collection of needles which are
placed in this instrument frame, instrument name must
contain the type of the instrument.
| Instruments can
only be of the following types: |
"dgmap"
// dialog instruments
"dggps"
"dgradar"
"dgecho"
"dgcomp"
// digital instruments
"dgspeed"
"dgrpm1"
"dgrpm2"
"dgrpm"
"dgfuel"
"dgdepth"
"dgclock"
"dghoriz"
"dgwind"
"dgsink"
"dgballast"
"dgflow"
"dgstrip"
"hcomp"
// analog instruments
"speed"
"rpm1"
"rpm2"
"rpm"
"fuel"
"depth"
"sink"
"ballast"
"flow"
"comp"
"clock"
"horiz"
"wind"
"throt1"
"throt2"
"throt"
"ball"
"sailb"
"sails"
"dive"
"autop"
"autos"
"lockb"
"locks"
"lockp"
"winchb"
"winchs"
"wheel"
"anchor"
"dock"
"rudder"
"thrust1"
"thrust2"
"hand"
"lights"
"bridge"
|
The
instruments directory inside the Virtual Sailor directory contains the available instruments, each instrument is
placed inside a directory inside the Virtual Sailor\instruments
directory.
Inside
each instrument directory are the following files:
The Instrument.cfg file
This file contains the name and positions of all the needles in
the instrument, and a short description for it.
| The structure of
the panel.cfg file is as follows: |
1 [needles]
0.0 [xpos]
-0.185 [ypos]
0.0 [zpos]
1.0 [scale]
5.555 [x0]
50.0 [x1]
1.998 [y0]
-1.963 [y1]
@
A simple air speed indicator
|
Explanation:
|
This file is composed of two sections:
1.the instrument data:
needles - the number of needles
in the instrument
xpos - the x position of the instrument back
ypos - the y position of the instrument back
zpos - the z position of the instrument back
scale - a scale factor for the instrument back
instruments - number of instruments in the panel
x0 - the minimal measured value (
repeated for each instrument )
x1 - the maximal measured value (
repeated for each instrument )
y0 - the minimal needle angle ( radian ) (
repeated for each instrument )
y1 - the maximal needle angle ( radian ) (
repeated for each instrument )
2. The instrument description :
this part is a simple text only
section that must begin with @ and endes at the
file end.
|
The Dial.x file
This is the main model file for the instrument without the
needles.

This
is a simple one frame
hirarchy mesh file, it can be created by converting a 3DS file into an X file by using the command "conv3ds
-m [filename.3ds]" , conv3ds.exe is a
small freeware converter written by Microsoft.
The Needle.x file
This is the 3D model file for one of the instrument needles, for
each needle a different model must be created and named
as needle0.x, needle1.x , needle2.x etc..

This
is a simple one frame
hirarchy mesh file, it can be created by converting a 3DS file into an X file by using the command "conv3ds
-m [filename.3ds]" , conv3ds.exe is a
small freeware converter written by Microsoft.
Download source
files and conv3ds
|