diff --git a/aero_astro_calc/Inertia.py b/aero_astro_calc/Inertia.py new file mode 100644 index 0000000..535e556 --- /dev/null +++ b/aero_astro_calc/Inertia.py @@ -0,0 +1,14 @@ +from typing import Tuple + + +class Inertia: + def __init__(self, area: float, centroid: Tuple[float, float]): + self.area = area + self.centroid = centroid + + def __add__(self, other): + AX = self.area * self.centroid[0] + other.area * other.centroid[0] + AY = self.area * self.centroid[1] + other.area * other.centroid[1] + self.area = self.area + other.area + self.centroid = (AX / self.area, AY / self.area) +