Skip to content

OSCAT BASIC Calculations

Matthias Mersch edited this page Apr 11, 2018 · 1 revision

22. Calculations

22.1. ASTRO

Type Function module
Input M: REAL (distance in meter)
AE: REAL (distance in astronomical units)
PC: REAL (distance in parsecs)
LJ: REAL (distance in light years)
Output YM: REAL (distance in meters)
YAE: REAL (distance in astronomical units)
YPC: REAL (distance in parsecs)
YLJ: REAL (distance in light years)
The module ASTRO converts various distance units commonly used in
astronomy. Normally, only the input to be converted is occupied and the
remaining inputs remain free. However, if several inputs loaded with
values, the values of all inputs are converted accordingly and then
summed.
1 AE = 149,597870 * 10 9 m
1 PC = 206265 AE
1 LJ = 9,460530 * 10 15 m = 63240 AE = 0,30659 PC

22.2. BFT_TO_MS

Type Function
Input BFT: INT (wind force on the Beaufort scale)
Output MS: REAL (Wind speed in meters / second)
BFT_TO_MS calculete wind speeds on the Beaufort scale in meters per se-
cond.
The calculation is done using the formula:
BFT_TO_MS = 0.836m/s * B^3/2

22.3. C_TO_F

Type Function: REAL
Input CELSIUS: REAL (temperature in ° C)
Output REAL (temperature in Fahrenheit)
C_TO_F converts a temperature reading from Celsius to Fahrenheit.

22.4. C_TO_K

Type Function: REAL
Input CELSIUS: REAL (temperature in ° C)
Output REAL (temperature in Kelvin)
C_TO_K converts a temperature reading from Celsius to Kelvin.

22.5. DEG_TO_DIR

Type Function: STRING(3)
Input DEG: INT (direction in degrees)
N: INT (Maximum length of string)
L: INT (language: see language defnition)
Output STRING(3) (compass readings)
DEG_TO_DIR calculates a direction (0 .360 degrees) into to compass rea-
dings. At the input DEG the direction in degrees is available (0 = North, 90
= East, 180 = South and 270 = West ). The output represents the directi-
on as String NNE. With the input N the maximum length of the direction in-
dication is limited. When N = 1, only in the 4 cardinal directions N, E, S, W
dissolved. If N = 2 between each another direction is inserted: NE, SE, SW,
NW. At N = 3 are also directions as NNO . are dissolved, with N = 3 a to-
tal of 16 directions are evaluated. The input L allows the switching of the
languages defned in the language setup. 0L = 0 means Default Langua-
ge, a number > 0 is one of the predefned languages. more info about the
pre-defned data types can be found at CONSTANTS_LANGUAGE.

22.6. DIR_TO_DEG

Type Function: INT
Input DIR: STRING(3) (direction in compass readings)
L: INT (language selection)
Output INT (direction in degrees)
DIR_TO_DEG converts a NNE direction in the form to degrees. It will be up
to 3 points evaluated, corresponding to a resolution of 22.5°. The output is
integer. The input must be in capital letters and East must be marked with
O or E. The string NO is converted to 45°. L specifes the used language,
for detailed information see data type CONSTANTS_LANGUAGE.
The cardinal points are: 0° = North, 90° = East, 180° = South, 270° =
West. The conversion is done according to the following table:
N 0° NNO, NNE 23° NO 45° ONO, ENE 68°
O 90° OSO, ESE 113° SO, SE 135° SSO, SSE 158°
S 180° SSW 203° SW 225° WSW 248°
W 270° WNW 293° NW 315° NNW 338°

22.7. ENERGY

Type Function module
Input J: REAL (Joule)
C: REAL (calorie)
WH: REAL (Watt hours)
Output YJ: REAL (Joule)
YC: REAL (calorie)
YWH: REAL (Watt hours)
The module converts ENERGY in diferent, in practice common units of
energy. Normally, only the input to be converted is occupied and the re-
maining inputs remain free. However, if several inputs loaded with values,
the values of all inputs are converted accordingly and then summed.
1 J = 1 Ws (Watt * Seconds) = 1 Nm (Newton * meters)
1 C = 4,1868 J = 1,163 * 10 -3 Wh (watt * hours)
1 Wh = 3,6 * 10 3 J = 860 C

22.8. F_TO_C

Type Function: REAL
Input FAHRENHEIT: REAL (temperature value in Fahrenheit)
Output REAL (temperature in °C)
F_TO_C converts a temperature reading from Fahrenheit in Celsius.

22.9. F_TO_OM

Type Function: REAL
Input F: REAL (frequency in Hz)
Output REAL (frequency in Hz)
F_TO_OM calculates the angular frequency omega of the frequency in Hz

22.10. F_TO_PT

Type Function: REAL
Input F : REAL (frequency)
Output TIME (period)
F_TO_PT converts a frequency value of Hz in the corresponding period.

22.11. GEO_TO_DEG

Type Function: REAL
Input D: INT (angle in degrees)
M: INT (arc minutes)
SEC: REAL (arc seconds)
Output REAL (angle specifed in decimal degrees)
GEO_TO_DEG calculates an angle expressed in degrees from the input
data level. Minutes, seconds.
GEO_TO_DEG (2,59,60.0) is 3.0 degrees

22.12. K_TO_C

Type Function: REAL
Input KELVIN: REAL (temperature value in Kelvin)
Output REAL (temperature in °C)
K_TO_C converts a temperature reading from Kelvin in Celsius.

22.13. KMH_TO_MS

Type Function : REAL
Input KMH: REAL (speed in m/s)
Output TIME (speed in km/h)
KMH_TO_MS converts value to a speed of kilomter per Hour in meters per
second. KMH_TO_MS := KMH / 3.6

22.14. LENGTH

Type Function module
Input M : REAL (Meter)
P: REAL (Typographic point)
IN : REAL (Inch)
FT : REAL (Foot)
YD : REAL (Yard)
MILE : REAL (Mile)
SM: REAL (International nautical mile)
FM : REAL (Fathom)
Output YM : REAL (Meter)
YP: REAL (Typographic point)
YIN : REAL (Inch)
YFT: REAL ( Foot )
YYD : REAL (Yard)
YMILE : REAL (Mile)
YSM: REAL (International nautical mile)
YFM : REAL (Fathom)
The module LENGTH converts diferent in common used units for units of
length. Normally, only the input to be converted is occupied and the re-
maining inputs remain free. However, if several inputs loaded with values,
the values of all inputs are converted accordingly and then summed.
1 P = 0.376065 mm (unit from the printing industry)
1 IN = 25,4 mm
1 FT = 0,3048 m
1 YD = 0,9144 m
1 MILE = 1609,344 m
1 SM = 1852 m
1 FM = 1,829 m

22.15. MS_TO_BFT

Type Function
Input MS: INT (force on the Beaufort scale)
Output MS: REAL (Wind speed in meters / second)
MS_TO_BFT converts wind speeds of meters per second in the Beaufort
scale.
The calculation is done using the formula:
MS_TO_BFT = (MS * 1.196172)^2/3

22.16. MS_TO_KMH

Type Function: REAL
Input MS: REAL (speed in km/h)
Output REAL (speed in m/s)
MS_TO_KMH calculates a speed value of meters/second to kilometers/hour
to.
MS_TO_KMH := MS * 3.6

22.17. OM_TO_F

Type Function: REAL
Input OM: REAL (angular frequency omega)
Output REAL (frequency in Hz)
OM_TO_F calculates the frequency in Hz of the angular frequency Omega.

22.18. PRESSURE

Type Function module
Input MWS: REAL (water column in meters)
TORR: REAL (Torr respectively mercury column in mm)
ATT: REAL (technical atmosphere)
ATM: REAL (atmospheric physics)
PA: REAL (Pascal)
BAR: REAL (Bar)
Output YMWS: REAL (water column in meters)
YTORR : REAL (Torr respectively mercury column in mm)
Yatt: REAL (technical atmosphere)
Yatm: REAL (atmospheric physics)
YPA: REAL (Pascal)
Ybars: REAL (Bar)
The module PRESSURE converts diferent, in practice common units, for
pressure. Normally, only the input to be converted is occupied and the re-
maining inputs remain free. However, if several inputs loaded with values,
the values of all inputs are converted accordingly and then summed.
1 MWS = 1 meter of water = 0.0980665 Bar
1 Torr = 1 mm Hg = 0.133322 bar = 101325/760 Pa
1 ATT = 1 kp / cm ² = 0.980665 bar
1 ATM = 1.01325 Bar
1 PA = 1 N / m²
1 BAR = 10 5 Pa

22.19. PT_TO_F

Type Function: REAL
Input PT: TIME (period in seconds)
Output REAL (frequency in Hz)
PT_TO_F expects a period of seconds in the appropriate frequency to fre-
quency in Hz.

22.20. SPEED

Type Function module
Input MS: REAL (meters / second)
KMH: REAL (kilometers / hour)
CN: REAL (knots = miles / hour)
MH: REAL (miles / hour)
Output YMS: REAL (meters / second)
YKMH : REAL (Kilometers / hour)
YKN: REAL (knots = miles / hour)
YMH: REAL (miles / hour)
The module SPEED converts various common units in the units for speed.
Normally, only the input to be converted is occupied and the remaining in-
puts remain free. However, if several inputs loaded with values, the values
of all inputs are converted accordingly and then summed.
1 ms = meters / second = 3.6 km / h
1 kmh = kilometers / hour = 1 / 3, 6 m / s
1 knot = knot = 1 nautical mile / hour = 0.5144 m / s
Mh = 1 mile per hour = 0.44704 m / s

22.21. TEMPERATURE

Type Function module
Input K: REAL ( Kelvin temperature scale for )
C: REAL ( Temperature scale to Celsius )
F: REAL (Fahrenheit temperature scale)
RE: REAL (after Reaumur temperature scale)
RA: Real (after Rankine temperature scale)
Output YK: REAL (according to Kelvin temperature scale)
YC: REAL ( Temperature scale to Celsius )
YF: REAL (Fahrenheit temperature scale)
YRE: REAL (after Reaumur temperature scale)
YRA: Real (after Rankine temperature scale)
The module TEMP converts diferent, in practice common used units for
temperature. Normally, only the input to be converted is occupied and the
remaining inputs remain free. However, if several inputs loaded with va-
lues, the values of all inputs are converted accordingly and then summed.
1 K = 273.15 °C
1 °C = 273.15 K
1 °F = °C * 1.8 + 32
1 Re = °C * 0.8
1 Ra = K * 1.8
Clone this wiki locally