Difference between revisions of "Mass.dat"

From Silent Wings Wiki
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
The mass.dat file defines the mass properties of the aircraft. Several masses, water ballast and fuel tanks can be defined. At least one mass '''must''' be defined for the simulation to work.  
+
[[Category:Aircraft Physics]]
 +
 
 +
The mass.dat file defines the mass properties of the aircraft. Several masses, water ballast and fuel tanks can be defined. At least one mass '''must''' be defined for the simulation to work. The mass configuration file must be referenced in [[aircraft.cfg]] like this:
 +
 
 +
mass_file      = mass.dat
  
  
Line 29: Line 33:
 
With that defined, the mass of the pilot can be defined:
 
With that defined, the mass of the pilot can be defined:
  
  # Pilot's mass, assume no inertia (wrong)
+
  # Pilot's mass, assume no inertia
 
  seat {
 
  seat {
 
     name          = pilot
 
     name          = pilot
Line 120: Line 124:
 
  }
 
  }
  
 +
Most entries are self explaining. The y_inner and y_outer defines the spanvise position of the inner and outer end of the tank.
  
 
== Fuel tank ==
 
== Fuel tank ==
  
 +
You can add as many fuel tanks as you like. As with the water ballast, these are mirrored unless you use the mirror = false entry. Then tank_number variable defines the number that you would find on the fuel tank selector in the cockpit, and can be used to group the tanks. For example, you could have 4 tanks in group number 1, and 6 in group number 2. In the cockpit you can then select "all" tanks, or just tank (group) 1 or 2.
  
Aargh.
+
fuel {
 
+
    name          = fueltank
[[Category:Aircraft Physics]]
+
    position      = [   0.0    0.0    0.0 ]
 +
    capacity      = 60.0
 +
    y_inner        = 3.5
 +
    y_outer        = 8.8
 +
 +
    default_level  = 60.0
 +
    tank_number    = 1
 +
}

Latest revision as of 19:14, 7 March 2007


The mass.dat file defines the mass properties of the aircraft. Several masses, water ballast and fuel tanks can be defined. At least one mass must be defined for the simulation to work. The mass configuration file must be referenced in aircraft.cfg like this:

mass_file      = mass.dat


General options

mtow = <float>

Defines the maximum allowed takeoff weight. This is used by the GUI and will flash up all red when something's too heavy.

cg_limits = [ <front limit> <rear limit> ]


Mass

An aircraft mass would be defined like this:

# Mass of aircraft minus pilot and motor
mass {
   name           = fuselage_wings
   mass           = 440.0
   inertia        = [ 3000.0  1200.0 3300.0 ]
   position       = [ -0.450  0.0 0.0 ]
}

The parameters are supposed to be self-explaining. The inertia and positions are in x - y - z, with x pointing forwards, y to the right and z down.

With that defined, the mass of the pilot can be defined:

# Pilot's mass, assume no inertia
seat {
   name           = pilot
   mass           = 85.0
   min_mass       = 60.0
   max_mass       = 125.0
   inertia        = [   0.0    0.0    0.0 ]
   position       = [   0.5    0.0    0.0 ]
}

Notice that the name of the part is called "seat" instead of "mass". This is so that the GUI can figure out that this is a pilot's seat and that the pilot weight can be adjusted. The inertia of the pilot is normally not very important so you can set it to zero if you don't know it. mass defines the default mass, and the limits are set with min_mass and max_mass.

Even more masses can be defined. This shows the use of a movable mass defining the electric motor in the Antares 20E model:

# Motor mass, will move with motor
mass {
   name           = motor
   mass           = 35.0
   inertia        = [    0.0    0.0    0.0 ]
   position       = [    1.5    0.0    0.0 ]

   delta_position = [    1.0    0.0    0.0 ]
   pylon_mix      = [    1.0    0.0    0.0 ]
}

Notice the delta_position and pylon_mix entries. These define that the position will shift 1.0 meters forwards when the pylon is extended. This can also be used to define a movable mass controlled by the aircraft stick, to control a hangglider! For example, this is the mass.dat file from a hangglider model:

mass {
   name           = wing
   mass           = 35.9
   inertia        = [  100.0   10.0  100.0 ]
   position       = [   -1.0    0.0    0.0 ]
}

seat {
   name           = pilot
   mass           = 75
   min_mass       = 60.0
   max_mass       = 125.0
   inertia        = [   10.0  100.0  100.0 ]
   position       = [   -1.3    0.0    1.5 ]
   delta_position = [    0.45   1.0    0.0 ]

   aileron_mix    = [    0.0   -1.0    0.0 ]
   elevator_mix   = [    1.0    0.0    0.0 ]
   rudder_mix     = [    0.0    0.0    0.0 ]
   pylon_mix      = [    0.0    0.0    0.0 ]
}

This will move the position of the pilot 0.45 meters forwards using the elevator control, and 1.0 meter sideways using the aileron control.


Water ballast

A water ballast tank is mirrored so only one side will have to be defined. The Capacity and default level indicates the sum of both (left+right). When mirrored the y coordinate of the tank is forced to zero. Use "mirror = false" to disable and define each wing individually.

The following is the water ballast tanks as defined on the Antares model. The Antares has two individual tanks in each wing that can be opened either with only the outer tank (number 1) or both (1+2). This is defined by using the valve_number entry.

# water ballast inner wing
water {
   name           = inner
   position       = [    0.0    0.0    0.0 ]
   capacity       = 60.0
   valve_size     = 0.13
   y_inner        = 3.5
   y_outer        = 8.8

   default_level  = 60.0
 
   valve_number   = 2
   valve_position = [ 0.0 -3.5 -0.0 ]
   valve_max_flow = 25.0
}

# water ballast outer wing
water {
   name           = outer
   position       = [    0.0    0.0    0.0 ]
   capacity       = 40.0
   valve_size     = 0.13
   y_inner        = 3.5
   y_outer        = 8.8
 
   default_level  = 40.0
 
   valve_number   = 1
   valve_position = [ 0.0 -6.0 -0.1 ]
   valve_max_flow = 25.0
}

Most entries are self explaining. The y_inner and y_outer defines the spanvise position of the inner and outer end of the tank.

Fuel tank

You can add as many fuel tanks as you like. As with the water ballast, these are mirrored unless you use the mirror = false entry. Then tank_number variable defines the number that you would find on the fuel tank selector in the cockpit, and can be used to group the tanks. For example, you could have 4 tanks in group number 1, and 6 in group number 2. In the cockpit you can then select "all" tanks, or just tank (group) 1 or 2.

fuel {
   name           = fueltank
   position       = [    0.0    0.0    0.0 ]
   capacity       = 60.0
   y_inner        = 3.5
   y_outer        = 8.8

   default_level  = 60.0
   tank_number    = 1
}