import java.util.Collection;
import java.util.List;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Transformation;
public abstract class FinSet extends ExternalComponent {
+ private static final Translator trans = Application.getTranslator();
+
+ // FIXME: converting triangular fins to freeform fails
/**
* Maximum allowed cant of fins.
public enum CrossSection {
- SQUARE("Square", 1.00),
- ROUNDED("Rounded", 0.99),
- AIRFOIL("Airfoil", 0.85);
+ //// Square
+ SQUARE(trans.get("FinSet.CrossSection.SQUARE"), 1.00),
+ //// Rounded
+ ROUNDED(trans.get("FinSet.CrossSection.ROUNDED"), 0.99),
+ //// Airfoil
+ AIRFOIL(trans.get("FinSet.CrossSection.AIRFOIL"), 0.85);
private final String name;
private final double volume;
}
public enum TabRelativePosition {
- FRONT("Root chord leading edge"),
- CENTER("Root chord midpoint"),
- END("Root chord trailing edge");
+ //// Root chord leading edge
+ FRONT(trans.get("FinSet.TabRelativePosition.FRONT")),
+ //// Root chord midpoint
+ CENTER(trans.get("FinSet.TabRelativePosition.CENTER")),
+ //// Root chord trailing edge
+ END(trans.get("FinSet.TabRelativePosition.END"));
private final String name;
/*
- * Return an approximation of the longitudal unitary inertia of the fin set.
+ * Return an approximation of the longitudinal unitary inertia of the fin set.
* The process is the following:
*
* 1. Approximate the fin with a rectangular fin
* set and multiplied by the number of fins.
*/
@Override
- public double getLongitudalUnitInertia() {
+ public double getLongitudinalUnitInertia() {
double area = getFinArea();
if (MathUtil.equals(area, 0))
return 0;
@Override
- protected void copyFrom(RocketComponent c) {
- super.copyFrom(c);
-
+ protected List<RocketComponent> copyFrom(RocketComponent c) {
FinSet src = (FinSet) c;
this.fins = src.fins;
this.finRotation = src.finRotation;
this.tabLength = src.tabLength;
this.tabRelativePosition = src.tabRelativePosition;
this.tabShift = src.tabShift;
+
+ return super.copyFrom(c);
}
}