Merge pull request #1297 from hcraigmiller/Split-fin-mass-correction

[Fixes Issue #1292]  Calculates per fin mass when splitting a set of fins with a mass override
This commit is contained in:
Joe Pfeiffer 2022-04-16 16:22:57 -06:00 committed by GitHub
commit cf5190c010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
}