Conversion

Provide functionality for converting between imperial and metric system.

class casex.conversion.Conversion[source]

Provide functionality for converting between imperial and metric system.

Note that all methods are static, and can be called without instantiating Conversion, i.e.

length = casex.Conversion.ft_to_m(32)
static ft_to_m(length)[source]

Converts feet to meter. Simply a multiplication with 0.3048 ft/m.

Parameters

length (float) – Length in [ft].

Returns

length – Length in [m].

Return type

float

static ftlb_to_J(energy)[source]

Converts foot-pound to joule. Simply a multiplication with 1.355818 J/ft-lbs.

Parameters

energy (float) – Energy in [ft-lbs].

Returns

energy – Kinetic energy in [J].

Return type

float

static kg_to_lbs(mass)[source]

Converts kg to pounds. Simply a division with 0.45359237 lbs/kg.

Parameters

mass (float) – Mass in [lbs].

Returns

mass – Mass in [kg].

Return type

float

static lbs_to_kg(mass)[source]

Converts pounds to kg. Simply a multiplication with 0.45359237 lbs/kg.

Parameters

mass (float) – Mass in [kg].

Returns

mass – Mass in [lbs].

Return type

float

static m_to_ft(length)[source]

Converts meter to feet. Simply a division with 0.3048 ft/m.

Parameters

length (float) – Length in [m].

Returns

length – Length in [ft].

Return type

float