Class: SubmarineConstants

SubmarineConstants(emptyMass, maxMass, length, width, volume, rotorDiameter, maxRotorRPS, sternPlaneArea, rudderPlaneArea, fairwaterPlaneArea, dragCoefficient, thrustCoefficient, sternCoefficient, rudderCoefficient, fairwaterCoefficient, centerOfBuoyancy, surfaceArea, ballastTankCapacity)

Represents the constant parameters of the submarine.

Constructor

new SubmarineConstants(emptyMass, maxMass, length, width, volume, rotorDiameter, maxRotorRPS, sternPlaneArea, rudderPlaneArea, fairwaterPlaneArea, dragCoefficient, thrustCoefficient, sternCoefficient, rudderCoefficient, fairwaterCoefficient, centerOfBuoyancy, surfaceArea, ballastTankCapacity)

Creates an instance of SubmarineConstants.
Parameters:
Name Type Description
emptyMass number The empty mass of the submarine.
maxMass number The maximum mass of the submarine.
length number The length of the submarine.
width number The width of the submarine.
volume number The volume of the submarine.
rotorDiameter number The diameter of the rotor.
maxRotorRPS number The maximum rotor rounds per second.
sternPlaneArea number The area of the stern plane.
rudderPlaneArea number The area of the rudder plane.
fairwaterPlaneArea number The area of the fairwater plane.
dragCoefficient number The drag coefficient of the submarine.
thrustCoefficient number The thrust coefficient of the submarine.
sternCoefficient number The stern coefficient of the submarine.
rudderCoefficient number The rudder coefficient of the submarine.
fairwaterCoefficient number The fairwater coefficient of the submarine.
centerOfBuoyancy THREE.Vector3 The center of buoyancy of the submarine.
surfaceArea number The surface area of the submarine.
ballastTankCapacity number The ballast tank capacity of the submarine.
Source:

Methods

getBallastTankCapacity() → {number}

Gets the ballast tank capacity of the submarine.
Source:
Returns:
The ballast tank capacity.
Type
number

getCenterOfBuoyancy() → {THREE.Vector3}

Gets the center of buoyancy of the submarine.
Source:
Returns:
The center of buoyancy.
Type
THREE.Vector3

getDragCoefficient() → {number}

Gets the drag coefficient of the submarine.
Source:
Returns:
The drag coefficient.
Type
number

getEmptyMass() → {number}

Gets the empty mass of the submarine.
Source:
Returns:
The empty mass.
Type
number

getFairwaterCoefficient() → {number}

Gets the fairwater coefficient of the submarine.
Source:
Returns:
The fairwater coefficient.
Type
number

getFairwaterPlaneArea() → {number}

Gets the area of the fairwater plane.
Source:
Returns:
The fairwater plane area.
Type
number

getLength() → {number}

Gets the length of the submarine.
Source:
Returns:
The length.
Type
number

getMaxMass() → {number}

Gets the maximum mass of the submarine.
Source:
Returns:
The maximum mass.
Type
number

getMaxRotorRPS() → {number}

Gets the maximum rotor rounds per second (RPS).
Source:
Returns:
The maximum rotor RPS.
Type
number

getRadius() → {number}

Gets the radius of the submarine.
Source:
Returns:
The radius.
Type
number

getRotorDiameter() → {number}

Gets the diameter of the rotor.
Source:
Returns:
The rotor diameter.
Type
number

getRudderCoefficient() → {number}

Gets the rudder coefficient of the submarine.
Source:
Returns:
The rudder coefficient.
Type
number

getRudderPlaneArea() → {number}

Gets the area of the rudder plane.
Source:
Returns:
The rudder plane area.
Type
number

getSternCoefficient() → {number}

Gets the stern coefficient of the submarine.
Source:
Returns:
The stern coefficient.
Type
number

getSternPlaneArea() → {number}

Gets the area of the stern plane.
Source:
Returns:
The stern plane area.
Type
number

getSurfaceArea() → {number}

Gets the surface area of the submarine.
Source:
Returns:
The surface area.
Type
number

getThrustCoefficient() → {number}

Gets the thrust coefficient of the submarine.
Source:
Returns:
The thrust coefficient.
Type
number

getVolume() → {number}

Gets the volume of the submarine.
Source:
Returns:
The volume.
Type
number

getWidth() → {number}

Gets the width of the submarine.
Source:
Returns:
The width.
Type
number

setBallastTankCapacity(ballastTankCapacity)

Sets the ballast tank capacity of the submarine.
Parameters:
Name Type Description
ballastTankCapacity number The new ballast tank capacity.
Source:

setCenterOfBuoyancy(centerOfBuoyancy)

Sets the center of buoyancy of the submarine.
Parameters:
Name Type Description
centerOfBuoyancy THREE.Vector3 The new center of buoyancy.
Source:

setDragCoefficient(dragCoefficient)

Sets the drag coefficient of the submarine.
Parameters:
Name Type Description
dragCoefficient number The new drag coefficient.
Source:

setEmptyMass(emptyMass)

Sets the empty mass of the submarine.
Parameters:
Name Type Description
emptyMass number The new empty mass.
Source:

setFairwaterCoefficient(fairwaterCoefficient)

Sets the fairwater coefficient of the submarine.
Parameters:
Name Type Description
fairwaterCoefficient number The new fairwater coefficient.
Source:

setFairwaterPlaneArea(fairwaterPlaneArea)

Sets the area of the fairwater plane.
Parameters:
Name Type Description
fairwaterPlaneArea number The new fairwater plane area.
Source:

setLength(length)

Sets the length of the submarine.
Parameters:
Name Type Description
length number The new length.
Source:

setMaxMass(maxMass)

Sets the maximum mass of the submarine.
Parameters:
Name Type Description
maxMass number The new maximum mass.
Source:

setMaxRotorRPS(maxRotorRPS)

Sets the maximum rotor rounds per second (RPS).
Parameters:
Name Type Description
maxRotorRPS number The new maximum rotor RPS.
Source:

setRadius(radius)

Sets the radius of the submarine.
Parameters:
Name Type Description
radius number The new radius.
Source:

setRotorDiameter(rotorDiameter)

Sets the diameter of the rotor.
Parameters:
Name Type Description
rotorDiameter number The new rotor diameter.
Source:

setRudderCoefficient(rudderCoefficient)

Sets the rudder coefficient of the submarine.
Parameters:
Name Type Description
rudderCoefficient number The new rudder coefficient.
Source:

setRudderPlaneArea(rudderPlaneArea)

Sets the area of the rudder plane.
Parameters:
Name Type Description
rudderPlaneArea number The new rudder plane area.
Source:

setSternCoefficient(sternCoefficient)

Sets the stern coefficient of the submarine.
Parameters:
Name Type Description
sternCoefficient number The new stern coefficient.
Source:

setSternPlaneArea(sternPlaneArea)

Sets the area of the stern plane.
Parameters:
Name Type Description
sternPlaneArea number The new stern plane area.
Source:

setSurfaceArea(surfaceArea)

Sets the surface area of the submarine.
Parameters:
Name Type Description
surfaceArea number The new surface area.
Source:

setThrustCoefficient(thrustCoefficient)

Sets the thrust coefficient of the submarine.
Parameters:
Name Type Description
thrustCoefficient number The new thrust coefficient.
Source:

setVolume(volume)

Sets the volume of the submarine.
Parameters:
Name Type Description
volume number The new volume.
Source:

setWidth(width)

Sets the width of the submarine.
Parameters:
Name Type Description
width number The new width.
Source: