[Fixes Issue #1292] Calculates per fin mass when splitting a set of fins with a mass override.

If a set of fins has an overriden mass, then, if the set is split into individual fins, the overridden mass is divided by the number of fins in the set and the quotient is set as the mass override for each individual fin.
This commit is contained in:
hcraigmiller 2022-04-14 03:05:29 -07:00
parent 868f37d78f
commit 736b1c1193
2 changed files with 6 additions and 2 deletions

View File

@ -28,8 +28,11 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona
* Maximum allowed cant of fins.
*/
public static final double MAX_CANT_RADIANS = (15.0 * Math.PI / 180);
public enum CrossSection {
public void setOverrideMass() {
}
public enum CrossSection {
//// Square
SQUARE(trans.get("FinSet.CrossSection.SQUARE"), 1.00),
//// Rounded

View File

@ -129,6 +129,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
copy.setFinCount(1);
copy.setBaseRotation(base + i * 2 * Math.PI / count);
copy.setName(copy.getName() + " #" + (i + 1));
copy.setOverrideMass(((FinSet) component).getOverrideMass()/((FinSet) component).getFinCount());
parent.addChild(copy, index + i);
}
}