Basic Vehicle Design
Adding more vehicles
Adding vehicles can be very simple, all vehicles made for Virtual Sailor, Micro Flight or Virtual Sailor can be added quickly and without trouble to Virtual Sailor.
To install add-on vehicles use the following procedure:
-
- Download the vehicles of your choice from these websites:
https://www.hangsim.com/virtual-sailor/boats.php
http://library.hangsim.com/library.php - Put the add-on file inside your Virtual Sailor directory which is typically
C:\Virtual Sailor
- Download the vehicles of your choice from these websites:
- Run the add-on file there and let it extract itself.
- Run the program and let it complete the import of the new vehicle.
See this page for more information about installing add-ons:https://www.hangsim.com/virtual-sailor/scenery-howto.php
Organizing the Vehicle Files:
Unlike Virtual Sailor and Micro Flight, Virtual Sailor can have vehicles organized completely inside a single directory, so for advanced users it is recommended to organize the vehicle so that its panels, instruments and weapons are all inside the vehicle directory.
Description of the Vehicle Structure :
The following section gives basic reference and description of the vehicles of Virtual Sailor.
Detailed description of vehicle making can be found onhttps://www.hangsim.com/virtual-sailor/boats.php
Each vehicle exists inside its own directory under the vehicles directory of the program, inside this directory there are several files that define the structure of the vehicle.
The vehicle configuration file – vehicle.cfg
This file contains the properties of the vehicle, this file can be edited using the properties dialog inside the program, or using a text editor, the file can contain one or more of the vehicle parameters in any order you wish to have, the full list of parameters allowed in this file is given in the table below:
[type] – type of vehicle
hang_glider – hang glider
para_glider – para glider
ultra_light – ultra light ( light plane )
glider – glider ( plane without engine )
airplane – airplane ( fixed wing airplanes )
trike – microlight ( powered hang glider mounted on wheels )
paraplane – paraplane ( powered paraglider mounted on wheels )
autogyro – auto gyro ( free rotatiing rotor with after propeller )
helicopter – helicopter ( powered main rotor with tail rotor )
automobile – car or land vehicle
boat – boat ( powered boat without sails )
submarine – submarine ( submersible without sails )
balloon – hot air balloons and dirigibles
[mass] – mass of vehicle (kg)
[crew_mass] – mass of boat crew (kg ) moves with point of view and effects boats weight and balance.
[has_catamaran] – boat is catamaran or not ( 1 or 0 )
[pilot_name] – name of animated pilot to use
[eject_name] – name of ejection parachute to use
[wing_sur] – wing area (m^2)
[wing_span] – wing span (m)
[wing_dihedral] – wing dihedral angle (rd)
[wing_height] – wing height above cg (m) – [hang glider, trike]
[wing_al0] – wing install angle (rd)
[wing_alm] – wing stall angle (rd)
[wing_cla] – wing lift line slope (cl/rd)
[wing_cd0] – wing zero incidence drag coefficient
[wing_cdi] – wing induced drag coefficient
[cd_flaps] – added drag coefficient with flaps fully extended
[al_flaps] – added AOA with flaps fully extended
[cd_spoilers] – added drag coefficient with spoilers fully extended
[al_spoilers] – added AOA with spoilers fully extended
[cd_gear] – added drag coefficient with gear fully extended
[body_area] – body cross section area (m^2) – [gyro, helicopter, car, boat]
[body_cd] – body drag coefficient – [gyro, helicopter, car, boat]
[cockpit_size] – size of shadow area around cockpit (m)
[scale_factor] – scale factor – use 0.3048 to convert model from ft to m
[auto_pilot_gain] – auto pilot gain factor of control ( 0 to 1 ) to reduce turn rates use smaller values.
[boat_length] – boat waterline length (m)
[boat_alt] – boat draft, height of waterline above keel, (m)
[boat_cgy] – height of boat CG above waterline (m)
[hydro_cruise] – cruise speed of boat with hydrofoils (kt) use 0 for boats without hydrofoils.
[hydro_angle] – angle of pitch for boat with hydrofoils (rd ) use 0 for flat planning.
[hydro_alt] – height of waterline above keel for boat at cruise speed (m)
[clmax_sailb] – maximum lift coefficient allowed for main sail of boat ( 0 – 5 ) for square rigger use small values.
[clmax_sails] – maximum lift coefficient allowed for jib sail of boat ( 0 – 5 ) for square rigger use small values.
[has_sails] – boat has sails or not (1 or 0)
[sur_sailb] – area of main sail of boat (m^2)
[sur_sails] – area of jib sail of boat (m^2)
[sur_spin] – area of spinnaker of boat (m^2)
[pilot_x] – pilot x position on body (m)
[pilot_y] – pilot y position on body (m)
[pilot_z] – pilot z position on body (m)
[main_gear_x] – main gear x position on body (m)
[main_gear_y] – main gear y position on body (m)
[main_gear_z] – main gear z position on body (m)
[nose_gear_y] – nose gear y position on body (m)
[nose_gear_z] – nose gear z position on body (m)
[gear_min_kf] – minimal gear friction coefficient
[gear_max_kf] – maximal gear friction coefficient
[has_skids] – vehicle has skids instead of wheels (0 or 1)
[has_floats] – vehicle has floats instead of wheels (0 or 1)
[camera_x] – camera x position on pilot [ hang glider, paraglider ] or on body (m)
[camera_y] – camera y position on pilot [ hang glider, paraglider ] or on body (m)
[camera_z] – camera z position on pilot [ hang glider, paraglider ] or on body (m)
[wing_x] – wing x position on body (m) – [ paraglider ]
[wing_y] – wing y position on body (m) – [ paraglider ]
[wing_z] – wing z position on body (m) – [ paraglider ]
[cable_x] – cable attachment point x position on body (m)
[cable_y] – cable attachment point y position on body (m)
[cable_z] – cable attachment point z position on body (m)
[hook_x] – hook attachment point x position on body (m)
[hook_y] – hook attachment point y position on body (m)
[hook_z] – hook attachment point z position on body (m)
[vario_climb] – variometer climb threshold (m/s)
[vario_sink] – variometer sink threshold (m/s)
[sink_max] – maximum sink rate (m/s)
[max_tilt] – maximum heel allowed for boat (rd)
[max_g] – maximum g load (g)
[min_g] – minimum g load (g)
[has_engine] – vehicle has engine ( 0 or 1 )
[engine_type] – type of engine
prop – constant pitch propeller
vpitch – variable pitch propeller
jet – turbo jet
jetab – turbo jet with after burner
rocket – rocket engine
car – car engine
boat – boat engine
amphib – amphibian engine
[fuel_time] – fuel time at max_rpm (sec)
[rpm_max] – maximal rpm at full throttle (rpm)
[rpm_min] – minimal rpm at idle (rpm)
[motor_hp] – engine effective power (hp) – per engine
[prop_diam] – propeller diameter (m) – per engine
[max_thrust] – maximum thrust (newton) – per engine
[max_altitude] – altitude limit for air breating engine (m)
[num_props] – number of engines [hang glider, trike, paraglider, paraplane, plane, gyro]
[ccw_left] – left propellers rotate counter clockwise ( 0 or 1 )
[ccw_right] – right propellers rotate counter clockwise ( 0 or 1 )
[has_gear] – vehicle has landing gear [ also when loading gear.x ]
[has_flaps] – vehicle has flaps [ also when found in model ]
[has_brakes] – vehicle has spoilers [ also when found in model ]
[has_rcs] – vehicle has reaction control system [ plane out of atmosphere ]
[has_vector] – vehicle motor has thrust vectoring ( 0 or 1 )
[panel_name] – name of panel
[panel_x] – panel x position on body (m)
[panel_y] – panel y position on body (m)
[panel_z] – panel z position on body (m)
[panel_scale] – panel scale
[panel_alfa] – panel pitch angle
[panel_beta] – panel yaw angle
[panel_gama] – panel roll angle
[num_blades] – main rotor blades count [autogyro, helicopter ]
[rotor_radius] – main rotor radius (m) [autogyro, helicopter ]
[rotor_chord] – main rotor chord (m) [autogyro, helicopter ]
[rotor_height] – main rotor height above cg (m) [autogyro, helicopter ]
[rotor_tilt] – main rotor control tilt angle (rd) [autogyro, helicopter ]
[rotor_mass] – main rotor mass (kg) [autogyro, helicopter ]
[spool_rpm] – main rotor spool rpm [ autogyro ]
[rotor_cla] – main rotor lift line slope (cl/rd) [autogyro, helicopter ]
[rotor_cd0] – main rotor zero incidence drag coefficient [autogyro, helicopter ]
[rotor_cdi] – main rotor induced drag coefficient [autogyro, helicopter ]
[rotor_al0] – main rotor install angle (rd) [autogyro, helicopter ]
[rotor_alm] – main rotor stall angle (rd) [autogyro, helicopter ]
[has_deck] – vehicle has deck ( landable by other vehicles ) [ boat ]
[deck_alt] – deck height above cg (m) [ boat ]
[hide_water] – hide water in cabin [boat] at [deck_alt] level
[is_hot_air] – type of balloon ( 1 – hot air 0 – dirigible )
[input_rate] – heating rate (kelvin/sec) or fill rate (m^3/sec)
[output_rate] – cooling rate (kelvin/sec) or drain rate (m^3/sec)
[volume] – volume of gas (m^3)
[doors_angle] – angle of swing doors rotation (rd)
[doors_move] – range of sliding doors movement (m)
[sweeps_angle] – angle of swepts wings rotation (rd)
[thrust_angle] – angle of thrust vectoring for boats with outboard engines ( attach_props = 1)
[steer_angle] – angle of steering for nose wheels and fronts wheels of cars (rd)
The vehicle mesh file – vehicle.x
This file contains the 3D model of the vehicle itself, including its moving parts, any moving part you wish to have, should be named according to the following list of tags, the parts should have their axes defined according to actual rotation axis for this part.
The program seeks also other names of files for compatibility, possible names areplane.x, boats.x, body.x.
The program supports also one optionalLODfile which is used when the vehicle is far from the observer, this file is calledsimple.x.
The program supports also one optionalDAMAGEfile which is used when the vehicle is broken, this file is calledbroken.x.
The program supports also one optionalLIGHTSfile which is used for glowing parts at night, this file is calledlights.x.
The program supports also one optionalANIMATEDfile which is used for animated parts, this file is calledanim.x.
The program supports also one optionalGEARfile which is used for landing gear, this file is calledgear.x.
For paragliders only the program loads also ananimated meshfile calledwing.x.
The vehicle mesh files are searched for moving parts, part names are identified accoring to name tags, each name is asscociated with a moving part and a specific function, the following table shows the possible name tags and their functions.
elevatorl – left elevator
elevatorr – right elevator
elevatorm – middle elevator
elevatort – rear elevator
rudderl – left rudder
rudderr – right rudder
rudderm – middle rudder
ruddert – rear rudder
aileronl – left aileron
aileronr – right aileron
ailerontl – left aileron
ailerontr – right aileron
elevonl – left elevon
elevonr – right elevon
stickl – left stick
stickr – right stick
wheell – left control wheel
wheelr – right control wheel
stwheel – left boat steering wheel
stwheer – right boat steering wheel
spropl – left prop
spropr – right prop
fpropl – fast left prop
fpropr – fast right prop
srotorl – left main rotor
frotorl – fast left rotor
strotorl – left tail rotor
ftrotorl – fast left tail rotor
srotor – main rotor
frotor – fast main rotor
srotorr – right main rotor
frotorr – fast right rotor
strotor – tail rotor
ftrotor – fast tail rotor
strotorr – right tail rotor
ftrotorr – fast right tail rotor
strotorl – left tail rotor
ftrotorl – fast left tail rotor
pedalr – right pedal
pedall – left pedal
pedaltr – right pedal
pedaltl – left pedal
thrott – trottle handle
throt1 – trottle handle
throt2 – trottle handle
pthrot – throttle push handle
flexwing – a hang glider type wing
parawing – a paraglider type wing
handlel – left paraplane handle
handler – right paraplane handle
brakel – left airbrake
braker – right airbrake
brakeh – brake handle
cableh – cable release handle
pcable – cable release pull handle
flapl – left flap
flapr – right flap
flaptl – right flap
flaptr – left flap
spoill – left spoiler
spoilr – right spoiler
spoiltl – left spoiler
spoiltr – right spoiler
string – yaw string
radarl – rotating radar
radarr – rotating radar
sproptl – tip left prop
fproptl – fast tip left prop
sproptr – tip right prop
fproptr – fast tip right prop
vtaill – left V tail
vtailr – right V tail
collect – collective handle
flamel – left burner or jet flame
flamer – right burner or jet flame
flamem – middle burner or jet flame
flameu – upper flame
flamed – lower flame
burnerh – gas burner handle
canopyh – canopy gas release value
flapsh – flaps extraction handle
gearh – gear extraction handle
trimh – trim adjustment handle
pitch – propeller pitch handle
ppitch – propeller pitch push handle
mixt – fuel mixture handle
pmixt – fuel mixture push handle
steer – plane wheel steering
steer1 – car wheel steering
steer2 – car wheel steering
steer3 – car wheel steering
wheel1 – plane or car wheel
wheel2 – plane or car wheel
wheel3 – plane or car wheel
wheel4 – plane or car wheel
wheel5 – plane or car wheel
wheel6 – plane or car wheel
wheel7 – plane or car wheel
wheel8 – plane or car wheel
sailb – main sail
sailbl – mail sail on the left
sailbr – main sail on the right
sailbf – main sail folded
sailb2 – main sail
sailbl2 – mail sail on the left
sailbr2 – main sail on the right
sailbf2 – main sail folded
sailb3 – main sail
sailbl3 – mail sail on the left
sailbr3 – main sail on the right
sailbf3 – main sail folded
sails – jib sail
sailsl – jib sail on the left
sailsr – jib sail on the right
sailsf – jib sail folded
sails2 – jib sail
sailsl2 – jib sail on the left
sailsr2 – jib sail on the right
sailsf2 – jib sail folded
sails3 – jib sail
sailsl3 – jib sail on the left
sailsr3 – jib sail on the right
sailsf3 – jib sail folded
spin – skinnaker sail
doorl – left swinging door
pdoorl – left sliding door
doorr – right swinging door
pdoorr – right sliding door
sweepl – left swept wing
sweepr – right swept wing
Additional files inside the vehicle directory are optional and include the following files:
effects.cfg– this file defines effects applied on parts inside the vehicle mesh and attached weapons, even line contains a partial name to be searched in the mesh, and reflection and bump scale to be applied on this part.
lights.cfg– this file defines the position and type of lights attached to the vehicle, these include the navigation lights, landing lights and other types you wish to have.
smokes.cfg– this file defines the position, size and color of smoke source attached to the vehicle, these smoke sources emit smoke according to throttle settings.
views.cfg- this file defines the positions of camera views inside the vehicle, these views can be selected, defined and saved using the views dialog inside the program.
elements.cfg- this file defines the positions and properties of simulation elements that compose the vehicle, when this file exists its properties override the properties found in the vehicle configuration file, the elements file can be created, edited and saved using the elements dialog inside the program.
components.cfg- this file defines the positions and properties of components that compose the vehicle, when this file exists its properties override the properties found in the vehicle configuration file and those found in the elements file, the components file can be created, edited and saved using the components dialog inside the program.
smokes.cfg- this file defines the position, color and size of smoke sources emitted from the vehicle.
trails.cfg- this file defines the position and size of smoke trails emitted from the vehicle when flying in foggy areas.
Editing vehicle properties
Any vehicle not havingelementsorcomponentsexposes its properties for editing, to edit vehicle properties select the vehicle, and then press theDesign tabin the vehicle dialog, the following dialog will appear on the right side of the screen.
Simulation Elements:
Any vehicle is composed of elements, these include:
- body – body with mass and speed
- point – point of contact and friction
- wheel – wheel of directional friction
- bumper – point of contact for collision
- wing – wing with lift and drag
- drag – surface with drag
- motor – engine of selected type ( propller, jet, rocket, etc… )
- prop – simple propeller
- cable – tow cable
- anchor – anchor point
- rotor – rotor with engine
- balloon – balloon with gas
- mass – any mass or load attached
These elements are created by default for any type of vehicle, but are not exposed or editable until you save them for the first time from the elements dialog.
Editing vehicle elements
Any vehicle withoutcomponentsdefined can have editableelements, elements can be created using the elements dialog and pressingSave Elements.
Press theElements tabto edit elements, the following dialog will appear on the right side of the screen.
Editing the body element
Vehicle Components:
Simulation elements are responsible for the forces acting upon the vehicle, and for control inputs upon it, but they do not have physical appearance because they are defined in addition to an existing vehicle shape.
The most intuitive concept in vehicle design is vehiclecomponents, these are physical mesh parts with elements attached, these are defined inside the components directory of the program and consist of three files for each component name:
- The component mesh file
- The component element file
- The component picture
Vehicle with components does not load the default vehicle mesh file, it requires only vehicle configuration and components file to define the vehicle type and shape.
Press theComponents tabto edit components, the following dialog will appear on the right side of the screen.
On the left side of the dialog you can see the list of existing vehicle components, and a preview picture of each one you select.
It is recommended to add the body component first as the other components are attached to it, but in case you need to replace the body this component can be deleted and added again.
The body component includes also the panel, camera and pilot data typical for this body, selecting this body will select also its panel and pilot and position your default point of view.
To add a new component select the component type then the actual component and pressAdd Component.
To delete a component select the component and pressDelete Component.
Components can be added, deleted and changed in flight to see their effect on the vehicle behavior.
To change the position of components select the component from the top list, select the x,y,z position and move the slider to move the component in that direction.
To save your work pressSave Vehicle.
New components can be made and put inside the components directory, allowing the user to create his own vehicles using interesting combinations of existing parts.
Creating a new Vehicle :
The most impressive feature of Virtual Sailor is its ability to create a prototype vehicle, this is made possible using vehicle components and the design mode built into the program, allowing the components to be quickly assembled and edited on the fly.
You can change the compoenents position, and and remove components and see the effect it has on vehicle daynamics, this makes the program an unparalleled educational and engineering tool.
To create a new vehicle, make sure no vehicle is selected, if you have a vehicle selected remove it from scene before you proceed.
Select the vehicle dialog using Change – Vehicle or press V, then press on the Design tab to show the vehicle design dialog.
On this dialog, you select first the type of vehicle to create and select its body first, for example let’s create a flying car.
Selecting “Automobile” as the type, and then “Car_body” as the body type, then press next.
Now we see the new vehicle from the outside, and also the components editing dialog.
Selecting the wing type, we add airplane wings and press Add Comp, this will add the wings components, and we can change the position of this component using the x, y, z sliders on the left side of this dialog.
After adding also an airplane engine, and a glider tail, we press “Save Vehicle” to save our completed creation, the new vehicle is always saved under the name “new_vehicle”, if we are happy with this vehicle we can raname this directory later to any name we want, for example rename the “new_vehicle” to “flying_porche.
note: Legal vehicle name must not include space inside it, use undescore instead, “new_vehicle” is ok “new vehicle” is not.
Now we are ready for the flight testing, press Escape to close this dialog, and press E to start the engine, B to release brakes, then set full throttle and let the car take off, pulling slightly on the control column.
Our Vehicle is can be accessed and edited using the “New_vehicle” from the vehicle selection dialog.
Multiple combinations can be created and tested, with great joy of experimentation, for example selecting our vehicle we can press the design tab, and get directly to the components editing dialog.
Then we can remove the engine, wings and tail, and add helicopter rotors instead, or a boat engine and and surfaces, and whatever our imagination can create, after each change, do not forget to save the vehicle or the last changes will not be saved.