Project
Loading...
Searching...
No Matches
SI::formula Namespace Reference

Functions

FUNC length hypotenuse_of_triangle (const length a, const length b)
 Calculates the hypotenuse in a right triangle, based on Pythagorean equation: a² + b² = c²
FUNC angle angle1_in_triangle (const length o, const length h)
 Calculates the angle in a right triangle from opposite (o) and hypotenuse (h).
FUNC angle angle2_in_triangle (const length a, const length h)
 Calculates the angle in a right triangle from adjacent (a) and hypotenuse (h).
FUNC angle angle3_in_triangle (const length a, const length o)
 Calculates the angle in a right triangle from adjacent (a) and opposite (o).
FUNC area area_of_triangle (const length b, const length h)
 Calculates the area of a triangle from base (b) and height (h).
FUNC length perimeter_of_rectangle (const length l, const length b)
 Calculates the perimeter of a rectangle from length (l) and base (b).
FUNC area area_of_rectangle (const length l, const length b)
 Calculates the area of a rectangle from length (l) and base (b).
FUNC length perimeter_of_square (const length a)
 Calculates the perimeter of a square from length (a).
FUNC area area_of_square (const length a)
 Calculates the area of a square from length (a).
FUNC area area_of_trapezoid (const length b1, const length b2, const length h)
 Calculates the area of a trapezoid from base 1 (b1), base 2 (b2) and height (h).
FUNC length circumference_of_circle (const length r)
 Calculates the circumference of a circle from radius (r).
FUNC length radius_of_circumference (const length c)
 Calculates the radius of a circle from circumference (c).
FUNC area area_of_circle (const length r)
 Calculates the area of a circle from radius (r).
FUNC length perimeter_of_ellipse (const length a, const length b)
 Calculates approximately(!) the perimeter of an ellipse from length of semi-major axis (a) and length of semi-minor axis (b).
FUNC area area_of_ellipse (const length a, const length b)
 Calculates the area of an ellipse from radius (a) and (b).
FUNC dimensionless eccentricity_of_ellipse (const length a, const length b)
 Calculates the eccentricity of an ellipse from radius (a) and (b).
FUNC length latus_rectum_of_ellipse (const length a, const length b)
 Calculates the latus rectum of an ellipse from radius (a) and (b).
FUNC length distance (const length x1, const length y1, const length x2, const length y2)
 Calculates the shortest distance between two points in 2D.
FUNC area area_of_cube (const length a)
 Calculates the area of a cube from length (a).
FUNC volume volume_of_cube (const length a)
 Calculates the volume of a cube from length (a).
FUNC area area_of_cylinder (const length r, const length h)
 Calculates the area of a cylinder from radius (r) and height (h).
FUNC volume volume_of_cylinder (const length r, const length h)
 Calculates the volume of a cylinder based on radius (r) and height (h).
FUNC area area_of_cone (const length r, const length h)
 Calculates the area of a cone from radius (r) and height (h).
FUNC volume volume_of_cone (const length r, const length h)
 Calculates the volume of a cone from radius (r) and height (h).
FUNC area area_of_sphere (const length r)
 Calculates the area of a sphere from radius (r).
FUNC volume volume_of_sphere (const length r)
 Calculates the volume of a sphere from radius (r).
FUNC volume volume_of_prism (const area A, const length h)
 Calculates the volume of a prism from base area (A) and height (h).
FUNC velocity average_speed (const length distance, const time duration)
 Calculates the average speed from distance and duration.
FUNC energy kinetic_energy (const mass m, const velocity v)
 Calculates the kinetic energy of a non-rotating object of mass (m) traveling at velocity (v).
FUNC time time_of_free_fall (const length height, const acceleration gravity)
 Calculates the free fall time from the given height.
FUNC length braking_distance (const velocity v0, const velocity v1, const acceleration deceleration)
 Calculates the braking distance to brake from v0 to v1 with the given deceleration.
FUNC acceleration acceleration_for_distance (const velocity v0, const velocity v1, const length distance)
 Calculates the acceleration necessary to accelerate from v0 to v1 within the given distance.
FUNC velocity final_velocity (const velocity i, const acceleration a, const SI::time t)
 Calculates the final velocity based on initial velocity (i) with acceleration (a) for time (t).
FUNC acceleration acceleration_of (const velocity delta_v, const SI::time delta_t)
 Calculates the acceleration from change in velocity (delta_v) and time interval (delta_t).
FUNC dimensionless wheel_rpm (const velocity v, const length r)
 Calculates the revolutions per minute (RPM) from velocity (v) and wheel radius (r).
FUNC velocity wheel_speed (const length r, const dimensionless RPM)
 Calculates the wheel speed from wheel radius (r) and revolutions per minute (RPM).
FUNC length turning_radius_of_vehicle (const length wheelbase, const angle steering_angle, const length tire_width)
 Calculates the turning radius of wheeled vehicles.
FUNC dimensionless g_force_of_acceleration (const velocity v0, const velocity v1, const time t)
 Calculates the G-force when accelerating from v0 to v1 within the given time.
FUNC velocity true_airspeed (const force lift_force, const dimensionless lift_coefficient, const area wing_surface, const density air_density)
 Calculates the true airspeed (TAS).
FUNC force lift_force_of_wing (const dimensionless lift_coefficient, const area wing_surface, const density air_density, const velocity true_air_speed)
 Calculates the lift force of an aircraft wing.
FUNC dimensionless Mach_number (const velocity v, const velocity speed_of_sound)
 Calculates the Mach number from velocity (v) of moving aircraft at altitude's speed of sound.
FUNC angle glide_path (const length h, const length v)
 Calculates the glide path from horizontal distance (h) and vertical change (v).
FUNC dimensionless glide_ratio (const length h, const length a)
 Calculates the glide ratio from horizontal distance (h) and altitude lost (a).
FUNC length vertical_height (const angle glide_path, const length horizontal_distance)
 Calculates the vertical height for the given glide path and horizontal distance.
FUNC velocity climb_rate (const velocity ground_speed, const angle climb_angle)
 Calculates the climb rate for the given speed and climb angle.
FUNC length turn_radius (const velocity ground_speed, const angle bank_angle)
 Calculates the turn radius at the given speed and bank angle.
FUNC energy gravitational_potential_energy (const mass m, const length h, const acceleration gravity)
 Calculates the gravitational potential energy of a mass (m) at height (h) based on gravity (e.g. on Earth).
FUNC force gravitational_attractive_force (const mass m1, const mass m2, const length d)
 Calculates the attractive force between two bodies of masses (m1) and (m2) with distance (d) between their centres of mass.
FUNC velocity gravitational_escape_velocity (const mass M, const length r)
 Calculates the escape velocity from a Mass (M) of body (e.g. a planet) with radius of body (r).
FUNC dimensionless flattening_factor (const length Re, const length Rp)
 Calculates the flattening factor (f) of an astronomical object from radius to equator (Re) and radius to pole (Rp).
FUNC acceleration local_gravity (const angle lat, const length h)
 Calculates the theoretical local gravity at latitude (lat) and height above MSL (h).
FUNC length Schwarzschild_radius (const mass M)
 Calculates the Schwarzschild radius of a black hole from it's mass (M).
FUNC length wavelength (const velocity v, const frequency f)
 Calculates the wavelength from velocity (v) and frequency (f).
FUNC electric_potential sine_wave (const electric_potential V0, const frequency f, const SI::time t)
 Calculates V(t) from peak voltage (V0), frequency (f), and time (t).
FUNC velocity speed_of_sound_in_air (const temperature T)
 Calculates the speed of sound in air based on temperature (T).
FUNC force drag_in_fluid (const density p, const velocity u, const dimensionless cd, const area A)
 Calculates the drag force based on mass density of the fluid (p), flow velocity (u), drag coefficient (cd) and reference area (A).
FUNC frequency frequency_of_chromatic_note (const int note, const int reference_note, const frequency reference_frequency)
 Calculates the frequency of a chromatic music note.
FUNC auto Newtons_motion (const length s0, const velocity v0, const acceleration a, const time t)
FUNC auto Lorentz_force (const double q, const velocity v, const double B)
 Calculates the Lorentz force.
FUNC temperature windchill_temperature (const temperature air_temperature, const velocity wind_speed)
 Calculates the windchill temperature.
FUNC temperature temperature_gradient (const length altitude)
 Returns the temperature gradient per kilometer for the given geopotential altitude.
FUNC density density_of_dry_air (const pressure air_pressure, const temperature air_temperature)
 Calculates the density of dry air.
FUNC density density_of (const mass m, const volume V)
 Calculates the density from mass (m) and volume (V).
FUNC mass mass_of (const density p, const volume V)
 Calculates the mass from density (p) and volume (V).
FUNC volume volume_of (const mass m, const density p)
 Calculates the volume from mass (m) and density (p).
FUNC dimensionless BMI (const mass w, const length h)
 Calculates the human body-mass index (BMI) from weight (w) and height (h).
FUNC auto consumed_electrical_power (const electric_current I, const electric_potential U)
 Calculates the consumed electrical power of a current (I) and potential (U).
FUNC auto sound_intensity (const power power_of_sound_source, const length distance_from_sound_source)
 Calculates the sound intensity of a sound source from a distance.
FUNC length ballistic_max_height (const velocity v0, const length h, const angle a, const acceleration g)
 Calculates the max height of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).
FUNC length ballistic_max_range (const velocity v0, const length h, const angle a, const acceleration g)
 Calculates the max range of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).
FUNC time ballistic_travel_time (const velocity v0, const length h, const angle a, const acceleration g)
 Calculates the flight time of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).
FUNC specific_energy absorbed_dose (const energy E, const mass m)
 Calculates the amount of energy absorbed (E) from a source of radiation by some material per mass (m).
FUNC velocity min_of_array (velocity arr[], int n)
 Returns the minimum velocity in the given array.
FUNC velocity max_of_array (velocity arr[], int n)
 Returns the maximum velocity in the given array.
FUNC velocity avg_of_array (velocity arr[], int n)
 Returns the average velocity in the given array.
FUNC velocity sum_of_array (velocity arr[], int n)
 Returns the sum of all velocities in the given array.
FUNC length distance_on_Earth (angle lat1, angle long1, angle lat2, angle long2)
 Calculates the distance between two lat/long coordinates on Earth (haversine formula).

Function Documentation

◆ absorbed_dose()

FUNC specific_energy SI::formula::absorbed_dose ( const energy E,
const mass m )

Calculates the amount of energy absorbed (E) from a source of radiation by some material per mass (m).

◆ acceleration_for_distance()

FUNC acceleration SI::formula::acceleration_for_distance ( const velocity v0,
const velocity v1,
const length distance )

Calculates the acceleration necessary to accelerate from v0 to v1 within the given distance.

◆ acceleration_of()

FUNC acceleration SI::formula::acceleration_of ( const velocity delta_v,
const SI::time delta_t )

Calculates the acceleration from change in velocity (delta_v) and time interval (delta_t).

◆ angle1_in_triangle()

FUNC angle SI::formula::angle1_in_triangle ( const length o,
const length h )

Calculates the angle in a right triangle from opposite (o) and hypotenuse (h).

◆ angle2_in_triangle()

FUNC angle SI::formula::angle2_in_triangle ( const length a,
const length h )

Calculates the angle in a right triangle from adjacent (a) and hypotenuse (h).

◆ angle3_in_triangle()

FUNC angle SI::formula::angle3_in_triangle ( const length a,
const length o )

Calculates the angle in a right triangle from adjacent (a) and opposite (o).

◆ area_of_circle()

FUNC area SI::formula::area_of_circle ( const length r)

Calculates the area of a circle from radius (r).

◆ area_of_cone()

FUNC area SI::formula::area_of_cone ( const length r,
const length h )

Calculates the area of a cone from radius (r) and height (h).

◆ area_of_cube()

FUNC area SI::formula::area_of_cube ( const length a)

Calculates the area of a cube from length (a).

◆ area_of_cylinder()

FUNC area SI::formula::area_of_cylinder ( const length r,
const length h )

Calculates the area of a cylinder from radius (r) and height (h).

◆ area_of_ellipse()

FUNC area SI::formula::area_of_ellipse ( const length a,
const length b )

Calculates the area of an ellipse from radius (a) and (b).

◆ area_of_rectangle()

FUNC area SI::formula::area_of_rectangle ( const length l,
const length b )

Calculates the area of a rectangle from length (l) and base (b).

◆ area_of_sphere()

FUNC area SI::formula::area_of_sphere ( const length r)

Calculates the area of a sphere from radius (r).

◆ area_of_square()

FUNC area SI::formula::area_of_square ( const length a)

Calculates the area of a square from length (a).

◆ area_of_trapezoid()

FUNC area SI::formula::area_of_trapezoid ( const length b1,
const length b2,
const length h )

Calculates the area of a trapezoid from base 1 (b1), base 2 (b2) and height (h).

◆ area_of_triangle()

FUNC area SI::formula::area_of_triangle ( const length b,
const length h )

Calculates the area of a triangle from base (b) and height (h).

◆ average_speed()

FUNC velocity SI::formula::average_speed ( const length distance,
const time duration )

Calculates the average speed from distance and duration.

◆ avg_of_array()

FUNC velocity SI::formula::avg_of_array ( velocity arr[],
int n )

Returns the average velocity in the given array.

◆ ballistic_max_height()

FUNC length SI::formula::ballistic_max_height ( const velocity v0,
const length h,
const angle a,
const acceleration g )

Calculates the max height of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).

◆ ballistic_max_range()

FUNC length SI::formula::ballistic_max_range ( const velocity v0,
const length h,
const angle a,
const acceleration g )

Calculates the max range of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).

◆ ballistic_travel_time()

FUNC time SI::formula::ballistic_travel_time ( const velocity v0,
const length h,
const angle a,
const acceleration g )

Calculates the flight time of a bullet (without force of drag, wind, etc.), based on: initial launch velocity (v0), initial height (h), launch angle (a), and gravitation (g).

◆ BMI()

FUNC dimensionless SI::formula::BMI ( const mass w,
const length h )

Calculates the human body-mass index (BMI) from weight (w) and height (h).

◆ braking_distance()

FUNC length SI::formula::braking_distance ( const velocity v0,
const velocity v1,
const acceleration deceleration )

Calculates the braking distance to brake from v0 to v1 with the given deceleration.

◆ circumference_of_circle()

FUNC length SI::formula::circumference_of_circle ( const length r)

Calculates the circumference of a circle from radius (r).

◆ climb_rate()

FUNC velocity SI::formula::climb_rate ( const velocity ground_speed,
const angle climb_angle )

Calculates the climb rate for the given speed and climb angle.

◆ consumed_electrical_power()

FUNC auto SI::formula::consumed_electrical_power ( const electric_current I,
const electric_potential U )

Calculates the consumed electrical power of a current (I) and potential (U).

◆ density_of()

FUNC density SI::formula::density_of ( const mass m,
const volume V )

Calculates the density from mass (m) and volume (V).

◆ density_of_dry_air()

FUNC density SI::formula::density_of_dry_air ( const pressure air_pressure,
const temperature air_temperature )

Calculates the density of dry air.

◆ distance()

FUNC length SI::formula::distance ( const length x1,
const length y1,
const length x2,
const length y2 )

Calculates the shortest distance between two points in 2D.

◆ distance_on_Earth()

FUNC length SI::formula::distance_on_Earth ( angle lat1,
angle long1,
angle lat2,
angle long2 )

Calculates the distance between two lat/long coordinates on Earth (haversine formula).

◆ drag_in_fluid()

FUNC force SI::formula::drag_in_fluid ( const density p,
const velocity u,
const dimensionless cd,
const area A )

Calculates the drag force based on mass density of the fluid (p), flow velocity (u), drag coefficient (cd) and reference area (A).

◆ eccentricity_of_ellipse()

FUNC dimensionless SI::formula::eccentricity_of_ellipse ( const length a,
const length b )

Calculates the eccentricity of an ellipse from radius (a) and (b).

◆ final_velocity()

FUNC velocity SI::formula::final_velocity ( const velocity i,
const acceleration a,
const SI::time t )

Calculates the final velocity based on initial velocity (i) with acceleration (a) for time (t).

◆ flattening_factor()

FUNC dimensionless SI::formula::flattening_factor ( const length Re,
const length Rp )

Calculates the flattening factor (f) of an astronomical object from radius to equator (Re) and radius to pole (Rp).

◆ frequency_of_chromatic_note()

FUNC frequency SI::formula::frequency_of_chromatic_note ( const int note,
const int reference_note,
const frequency reference_frequency )

Calculates the frequency of a chromatic music note.

◆ g_force_of_acceleration()

FUNC dimensionless SI::formula::g_force_of_acceleration ( const velocity v0,
const velocity v1,
const time t )

Calculates the G-force when accelerating from v0 to v1 within the given time.

◆ glide_path()

FUNC angle SI::formula::glide_path ( const length h,
const length v )

Calculates the glide path from horizontal distance (h) and vertical change (v).

◆ glide_ratio()

FUNC dimensionless SI::formula::glide_ratio ( const length h,
const length a )

Calculates the glide ratio from horizontal distance (h) and altitude lost (a).

◆ gravitational_attractive_force()

FUNC force SI::formula::gravitational_attractive_force ( const mass m1,
const mass m2,
const length d )

Calculates the attractive force between two bodies of masses (m1) and (m2) with distance (d) between their centres of mass.

◆ gravitational_escape_velocity()

FUNC velocity SI::formula::gravitational_escape_velocity ( const mass M,
const length r )

Calculates the escape velocity from a Mass (M) of body (e.g. a planet) with radius of body (r).

◆ gravitational_potential_energy()

FUNC energy SI::formula::gravitational_potential_energy ( const mass m,
const length h,
const acceleration gravity )

Calculates the gravitational potential energy of a mass (m) at height (h) based on gravity (e.g. on Earth).

◆ hypotenuse_of_triangle()

FUNC length SI::formula::hypotenuse_of_triangle ( const length a,
const length b )

Calculates the hypotenuse in a right triangle, based on Pythagorean equation: a² + b² = c²

◆ kinetic_energy()

FUNC energy SI::formula::kinetic_energy ( const mass m,
const velocity v )

Calculates the kinetic energy of a non-rotating object of mass (m) traveling at velocity (v).

◆ latus_rectum_of_ellipse()

FUNC length SI::formula::latus_rectum_of_ellipse ( const length a,
const length b )

Calculates the latus rectum of an ellipse from radius (a) and (b).

◆ lift_force_of_wing()

FUNC force SI::formula::lift_force_of_wing ( const dimensionless lift_coefficient,
const area wing_surface,
const density air_density,
const velocity true_air_speed )

Calculates the lift force of an aircraft wing.

◆ local_gravity()

FUNC acceleration SI::formula::local_gravity ( const angle lat,
const length h )

Calculates the theoretical local gravity at latitude (lat) and height above MSL (h).

◆ Lorentz_force()

FUNC auto SI::formula::Lorentz_force ( const double q,
const velocity v,
const double B )

Calculates the Lorentz force.

◆ Mach_number()

FUNC dimensionless SI::formula::Mach_number ( const velocity v,
const velocity speed_of_sound )

Calculates the Mach number from velocity (v) of moving aircraft at altitude's speed of sound.

◆ mass_of()

FUNC mass SI::formula::mass_of ( const density p,
const volume V )

Calculates the mass from density (p) and volume (V).

◆ max_of_array()

FUNC velocity SI::formula::max_of_array ( velocity arr[],
int n )

Returns the maximum velocity in the given array.

◆ min_of_array()

FUNC velocity SI::formula::min_of_array ( velocity arr[],
int n )

Returns the minimum velocity in the given array.

◆ Newtons_motion()

FUNC auto SI::formula::Newtons_motion ( const length s0,
const velocity v0,
const acceleration a,
const time t )

◆ perimeter_of_ellipse()

FUNC length SI::formula::perimeter_of_ellipse ( const length a,
const length b )

Calculates approximately(!) the perimeter of an ellipse from length of semi-major axis (a) and length of semi-minor axis (b).

◆ perimeter_of_rectangle()

FUNC length SI::formula::perimeter_of_rectangle ( const length l,
const length b )

Calculates the perimeter of a rectangle from length (l) and base (b).

◆ perimeter_of_square()

FUNC length SI::formula::perimeter_of_square ( const length a)

Calculates the perimeter of a square from length (a).

◆ radius_of_circumference()

FUNC length SI::formula::radius_of_circumference ( const length c)

Calculates the radius of a circle from circumference (c).

◆ Schwarzschild_radius()

FUNC length SI::formula::Schwarzschild_radius ( const mass M)

Calculates the Schwarzschild radius of a black hole from it's mass (M).

◆ sine_wave()

FUNC electric_potential SI::formula::sine_wave ( const electric_potential V0,
const frequency f,
const SI::time t )

Calculates V(t) from peak voltage (V0), frequency (f), and time (t).

◆ sound_intensity()

FUNC auto SI::formula::sound_intensity ( const power power_of_sound_source,
const length distance_from_sound_source )

Calculates the sound intensity of a sound source from a distance.

◆ speed_of_sound_in_air()

FUNC velocity SI::formula::speed_of_sound_in_air ( const temperature T)

Calculates the speed of sound in air based on temperature (T).

◆ sum_of_array()

FUNC velocity SI::formula::sum_of_array ( velocity arr[],
int n )

Returns the sum of all velocities in the given array.

◆ temperature_gradient()

FUNC temperature SI::formula::temperature_gradient ( const length altitude)

Returns the temperature gradient per kilometer for the given geopotential altitude.

◆ time_of_free_fall()

FUNC time SI::formula::time_of_free_fall ( const length height,
const acceleration gravity )

Calculates the free fall time from the given height.

◆ true_airspeed()

FUNC velocity SI::formula::true_airspeed ( const force lift_force,
const dimensionless lift_coefficient,
const area wing_surface,
const density air_density )

Calculates the true airspeed (TAS).

◆ turn_radius()

FUNC length SI::formula::turn_radius ( const velocity ground_speed,
const angle bank_angle )

Calculates the turn radius at the given speed and bank angle.

◆ turning_radius_of_vehicle()

FUNC length SI::formula::turning_radius_of_vehicle ( const length wheelbase,
const angle steering_angle,
const length tire_width )

Calculates the turning radius of wheeled vehicles.

◆ vertical_height()

FUNC length SI::formula::vertical_height ( const angle glide_path,
const length horizontal_distance )

Calculates the vertical height for the given glide path and horizontal distance.

◆ volume_of()

FUNC volume SI::formula::volume_of ( const mass m,
const density p )

Calculates the volume from mass (m) and density (p).

◆ volume_of_cone()

FUNC volume SI::formula::volume_of_cone ( const length r,
const length h )

Calculates the volume of a cone from radius (r) and height (h).

◆ volume_of_cube()

FUNC volume SI::formula::volume_of_cube ( const length a)

Calculates the volume of a cube from length (a).

◆ volume_of_cylinder()

FUNC volume SI::formula::volume_of_cylinder ( const length r,
const length h )

Calculates the volume of a cylinder based on radius (r) and height (h).

◆ volume_of_prism()

FUNC volume SI::formula::volume_of_prism ( const area A,
const length h )

Calculates the volume of a prism from base area (A) and height (h).

◆ volume_of_sphere()

FUNC volume SI::formula::volume_of_sphere ( const length r)

Calculates the volume of a sphere from radius (r).

◆ wavelength()

FUNC length SI::formula::wavelength ( const velocity v,
const frequency f )

Calculates the wavelength from velocity (v) and frequency (f).

◆ wheel_rpm()

FUNC dimensionless SI::formula::wheel_rpm ( const velocity v,
const length r )

Calculates the revolutions per minute (RPM) from velocity (v) and wheel radius (r).

◆ wheel_speed()

FUNC velocity SI::formula::wheel_speed ( const length r,
const dimensionless RPM )

Calculates the wheel speed from wheel radius (r) and revolutions per minute (RPM).

◆ windchill_temperature()

FUNC temperature SI::formula::windchill_temperature ( const temperature air_temperature,
const velocity wind_speed )

Calculates the windchill temperature.