Fix typos in OR codebase
This commit is contained in:
parent
185ce54ed0
commit
e3af87eee5
@ -105,7 +105,7 @@ public class ExpressionBuilder {
|
||||
|
||||
/**
|
||||
* set the variables names used in the expression without setting their
|
||||
* values. Usefull for building an expression before you know the variable values.
|
||||
* values. Useful for building an expression before you know the variable values.
|
||||
*
|
||||
* @param variableNames
|
||||
* vararg {@link String} of the variable names used in the
|
||||
|
@ -143,7 +143,7 @@ class FunctionToken extends CalculationToken {
|
||||
*
|
||||
* get the {@link Function}
|
||||
*
|
||||
* @return the correspoding {@link Function}
|
||||
* @return the corresponding {@link Function}
|
||||
*/
|
||||
Function getFunction() {
|
||||
return function;
|
||||
|
@ -35,11 +35,11 @@ public class Decal {
|
||||
private final EdgeMode mode;
|
||||
|
||||
/**
|
||||
* Builds a new decal with the given itens
|
||||
* Builds a new decal with the given items
|
||||
*
|
||||
* @param offset The offset of the decal, in coordinate obejct format
|
||||
* @param offset The offset of the decal, in coordinate object format
|
||||
* @param center The position of the center of the decal, in coordinate object format
|
||||
* @param scale The scale of the decal, in coordinate obejct format
|
||||
* @param scale The scale of the decal, in coordinate object format
|
||||
* @param rotation Rotation of the decal, in radians
|
||||
* @param image The image itself
|
||||
* @param mode The description of Edge behaviour
|
||||
|
@ -8,7 +8,7 @@ import java.io.InputStream;
|
||||
import net.sf.openrocket.util.ChangeSource;
|
||||
|
||||
/**
|
||||
* Interface to handle image files for declas
|
||||
* Interface to handle image files for decals
|
||||
*
|
||||
*/
|
||||
public interface DecalImage extends ChangeSource, Comparable<DecalImage> {
|
||||
|
@ -131,7 +131,7 @@ public class UpdateInfoRetriever {
|
||||
}
|
||||
|
||||
/**
|
||||
* check if the string is formated as an update list header
|
||||
* check if the string is formatted as an update list header
|
||||
* @param str the string to be checked
|
||||
* @return true if str is a header, false otherwise
|
||||
*/
|
||||
@ -250,7 +250,7 @@ public class UpdateInfoRetriever {
|
||||
/**
|
||||
* checks if a line contains an update information
|
||||
* @param line the line to be checked
|
||||
* @return true if the line caontain an update information
|
||||
* @return true if the line contain an update information
|
||||
* false otherwise
|
||||
*/
|
||||
private boolean isUpdateInfo(String line) {
|
||||
@ -386,7 +386,7 @@ public class UpdateInfoRetriever {
|
||||
|
||||
/**
|
||||
* builds the default url for fetching updates
|
||||
* @return the string with an url for fethcing updates
|
||||
* @return the string with an url for fetching updates
|
||||
*/
|
||||
private String getUrl() {
|
||||
return Communicator.UPDATE_INFO_URL + "?" + Communicator.VERSION_PARAM + "="
|
||||
|
@ -100,7 +100,7 @@ public class ThrustCurveMotorSet implements Comparable<ThrustCurveMotorSet> {
|
||||
* @param motor the motor to be checked
|
||||
* @param digest the digest of the motor
|
||||
* @param m the current motor being checked with
|
||||
* @return wheter the motor is or no
|
||||
* @return whether the motor is or no
|
||||
*/
|
||||
private boolean isMotorPresent(ThrustCurveMotor motor, final String digest, Motor m) {
|
||||
return digest.equals(digestMap.get(m)) &&
|
||||
@ -129,7 +129,7 @@ public class ThrustCurveMotorSet implements Comparable<ThrustCurveMotorSet> {
|
||||
|
||||
|
||||
/**
|
||||
* adds the standard delay if aplicable
|
||||
* adds the standard delay if applicable
|
||||
* @param motor the motor to be considered
|
||||
*/
|
||||
private void addStandardDelays(ThrustCurveMotor motor) {
|
||||
@ -181,7 +181,7 @@ public class ThrustCurveMotorSet implements Comparable<ThrustCurveMotorSet> {
|
||||
|
||||
/**
|
||||
* checks if the given motor is the first one
|
||||
* the ifrst motor inserted is what will difine the rest of the motors in the set
|
||||
* the first motor inserted is what will define the rest of the motors in the set
|
||||
* @param motor the motor to be checked
|
||||
*/
|
||||
private void checkFirstInsertion(ThrustCurveMotor motor) {
|
||||
|
@ -230,8 +230,8 @@ public class DecalRegistry {
|
||||
}
|
||||
|
||||
/**
|
||||
* sercha
|
||||
* @param file
|
||||
* Find decal that has file {file} as source
|
||||
* @param file decal source file
|
||||
* @return
|
||||
*/
|
||||
private DecalImageImpl findDecalForFile(File file) {
|
||||
@ -272,7 +272,7 @@ public class DecalRegistry {
|
||||
/**
|
||||
* Makes a unique name for saving decal files in case the name already exists
|
||||
* @param name the name of the decal
|
||||
* @return the name formated and unique
|
||||
* @return the name formatted and unique
|
||||
*/
|
||||
private String makeUniqueName(String name) {
|
||||
|
||||
|
@ -120,13 +120,13 @@ public class OpenRocketDocument implements ComponentChangeListener {
|
||||
*/
|
||||
public void addCustomExpression(CustomExpression expression) {
|
||||
if (customExpressions.contains(expression)) {
|
||||
log.info(Markers.USER_MARKER, "Could not add custom expression " + expression.getName() + " to document as document alerady has a matching expression.");
|
||||
log.info(Markers.USER_MARKER, "Could not add custom expression " + expression.getName() + " to document as document already has a matching expression.");
|
||||
}
|
||||
customExpressions.add(expression);
|
||||
}
|
||||
|
||||
/**
|
||||
* remves
|
||||
* Removes custom expression from the document
|
||||
* @param expression
|
||||
*/
|
||||
public void removeCustomExpression(CustomExpression expression) {
|
||||
@ -418,7 +418,7 @@ public class OpenRocketDocument implements ComponentChangeListener {
|
||||
|
||||
/**
|
||||
* removes all simulations with the specific configId
|
||||
* @param configId the Flight Configuration Id that dictates which simulations shoul be removed
|
||||
* @param configId the Flight Configuration Id that dictates which simulations should be removed
|
||||
*/
|
||||
private void removeSimulations(FlightConfigurationId configId) {
|
||||
for (Simulation s : getSimulations()) {
|
||||
|
@ -438,7 +438,7 @@ public class Simulation implements ChangeSource, Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this simulation contains plotable flight data.
|
||||
* Return true if this simulation contains plottable flight data.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@ public class CSVExport {
|
||||
// Number of data points
|
||||
int n = branch.getLength();
|
||||
|
||||
// Flight events in occurrance order
|
||||
// Flight events in occurrence order
|
||||
List<FlightEvent> events = branch.getEvents();
|
||||
Collections.sort(events);
|
||||
int eventPosition = 0;
|
||||
|
@ -147,7 +147,7 @@ public class GeneralRocketSaver {
|
||||
|
||||
private void save(String fileName, OutputStream output, OpenRocketDocument document, StorageOptions options) throws IOException {
|
||||
|
||||
// For now, we don't save decal inforamtion in ROCKSIM files, so don't do anything
|
||||
// For now, we don't save decal information in ROCKSIM files, so don't do anything
|
||||
// which follows.
|
||||
// TODO - add support for decals in ROCKSIM files?
|
||||
if (options.getFileType() == FileType.ROCKSIM) {
|
||||
|
@ -234,7 +234,7 @@ public class OpenRocketSaver extends RocketSaver {
|
||||
|
||||
|
||||
/**
|
||||
* Finds a getElements method somewhere in the *saver class hiearchy corresponding to the given component.
|
||||
* Finds a getElements method somewhere in the *saver class hierarchy corresponding to the given component.
|
||||
*/
|
||||
private static Reflection.Method findGetElementsMethod(RocketComponent component) {
|
||||
String currentclassname;
|
||||
|
@ -184,7 +184,7 @@ class RingHandler extends PositionDependentHandler<CenteringRing> {
|
||||
super.endHandler(element, attributes, content, warnings);
|
||||
|
||||
// The <Ring> XML element in Rocksim design file is used for many types of components, unfortunately.
|
||||
// Additional subelements are used to indicate the type of the rocket component. When parsing using SAX
|
||||
// Additional sub-elements are used to indicate the type of the rocket component. When parsing using SAX
|
||||
// this poses a problem because we can't "look ahead" to see what type is being represented at the start
|
||||
// of parsing - something that would be nice to do so that we can instantiate the correct OR component
|
||||
// at the start, then just call setters for the appropriate data.
|
||||
|
@ -36,7 +36,7 @@ public interface ElementHandler {
|
||||
* and all of its contents is to be ignored.
|
||||
* <p>
|
||||
* Note that this method may also return <code>this</code>, in which case this
|
||||
* handler will also handle the subelement.
|
||||
* handler will also handle the sub-element.
|
||||
*
|
||||
* @param element the element name.
|
||||
* @param attributes attributes of the element.
|
||||
|
@ -9,7 +9,7 @@ import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* A singleton element handler that does not accept any content in the element
|
||||
* except whitespace text. All subelements are ignored and a warning is produced
|
||||
* except whitespace text. All sub-elements are ignored and a warning is produced
|
||||
* of them. It ignores any attributes.
|
||||
* <p>
|
||||
* This class can be used for elements that have no content but contain attributes.
|
||||
|
@ -242,7 +242,7 @@ public class MassCalculation {
|
||||
|
||||
double clusterIt = motorConfig.getUnitLongitudinalInertia()*instanceCount*eachMass;
|
||||
|
||||
// if more than 1 moter => motors are not an the centerline => adjust via parallel-axis theorem
|
||||
// if more than 1 motor => motors are not at the centerline => adjust via parallel-axis theorem
|
||||
double clusterIr = clusterBaseIr;
|
||||
if( 1 < instanceCount ){
|
||||
for( Coordinate coord : offsets ){
|
||||
|
@ -2,7 +2,7 @@ package net.sf.openrocket.optimization.general;
|
||||
|
||||
/**
|
||||
* A storage of cached values of a function. The purpose of this class is to
|
||||
* cache function values between optimization runs. Subinterfaces may provide
|
||||
* cache function values between optimization runs. Sub-interfaces may provide
|
||||
* additional functionality.
|
||||
*
|
||||
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
|
||||
|
@ -148,7 +148,7 @@ public final class Point {
|
||||
/**
|
||||
* Return the squared length of this coordinate.
|
||||
*
|
||||
* @return the square of the length of thie coordinate.
|
||||
* @return the square of the length of the coordinate.
|
||||
*/
|
||||
public double length2() {
|
||||
if (length2 < 0) {
|
||||
|
@ -174,7 +174,7 @@ public class MultidirectionalSearchOptimizer implements FunctionOptimizer, Stati
|
||||
|
||||
if (accept(coordinateSearch, currentValue)) {
|
||||
|
||||
log.debug("Coordinate search successful, reseting simplex");
|
||||
log.debug("Coordinate search successful, resetting simplex");
|
||||
List<Point> toAbort = new LinkedList<Point>(simplex);
|
||||
simplex.clear();
|
||||
simplex.add(current);
|
||||
|
@ -86,7 +86,7 @@ public class MaterialDTO {
|
||||
/**
|
||||
* Special directive to the JAXB system. After the object is parsed from xml,
|
||||
* we replace the '2' with Chars.SQUARED, and '3' with Chars.CUBED. Just the
|
||||
* opposite transformation as doen in beforeMarshal.
|
||||
* opposite transformation as done in beforeMarshal.
|
||||
* @param unmarshaller
|
||||
* @param parent
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ public interface BoxBounded {
|
||||
|
||||
/**
|
||||
* Get a bounding box for a single instance of this component, from its own reference point.
|
||||
* This is expected to be compbined with a InstanceContext for bounds in the global / rocket frame.
|
||||
* This is expected to be combined with a InstanceContext for bounds in the global / rocket frame.
|
||||
*
|
||||
* @return BoundingBox from the instance's reference point.
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ public class CenteringRing extends RadiusRingComponent {
|
||||
// Implement sibling inner radius automation
|
||||
if (isInnerRadiusAutomatic()) {
|
||||
innerRadius = 0;
|
||||
// Component can be parentless if disattached from rocket
|
||||
// Component can be parentless if detached from rocket
|
||||
if (this.getParent() != null) {
|
||||
for (RocketComponent sibling : this.getParent().getChildren()) {
|
||||
/*
|
||||
|
@ -263,7 +263,7 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
||||
|
||||
// this method is deprecated because it ignores instancing of parent components (e.g. Strapons or pods )
|
||||
// depending on your context, this may or may not be what you want.
|
||||
// recomend migrating to either: `getAllComponents` or `getActiveInstances`
|
||||
// recommend migrating to either: `getAllComponents` or `getActiveInstances`
|
||||
@Deprecated
|
||||
public Collection<RocketComponent> getActiveComponents() {
|
||||
Queue<RocketComponent> toProcess = new ArrayDeque<RocketComponent>(this.getActiveStages());
|
||||
|
@ -49,7 +49,7 @@ public interface MotorMount extends ChangeSource, FlightConfigurableComponent {
|
||||
public MotorConfiguration getDefaultMotorConfig();
|
||||
|
||||
/**
|
||||
* Default implementatino supplied by RocketComponent (returns 1);
|
||||
* Default implementation supplied by RocketComponent (returns 1);
|
||||
*
|
||||
* @return number of times this component is instanced
|
||||
*/
|
||||
|
@ -97,11 +97,11 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
|
||||
// Override mass/CG
|
||||
private double overrideMass = 0;
|
||||
private boolean massOverriden = false;
|
||||
private boolean massOverridden = false;
|
||||
private double overrideCGX = 0;
|
||||
private boolean cgOverriden = false;
|
||||
private boolean cgOverridden = false;
|
||||
private double overrideCD = 0;
|
||||
private boolean cdOverriden = false;
|
||||
private boolean cdOverridden = false;
|
||||
|
||||
private boolean overrideSubcomponents = false;
|
||||
|
||||
@ -234,7 +234,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
* Return a collection of bounding coordinates. The coordinates must be such that
|
||||
* the component is fully enclosed in their convex hull.
|
||||
*
|
||||
* Note: this function gets the bounds only for this component. Subchildren must be called individually.
|
||||
* Note: this function gets the bounds only for this component. Sub-children must be called individually.
|
||||
*
|
||||
* @return a collection of coordinates that bound the component.
|
||||
*/
|
||||
@ -521,7 +521,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
return;
|
||||
checkState();
|
||||
overrideMass = Math.max(m, 0);
|
||||
if (massOverriden)
|
||||
if (massOverridden)
|
||||
fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
*/
|
||||
public final boolean isMassOverridden() {
|
||||
mutex.verify();
|
||||
return massOverriden;
|
||||
return massOverridden;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -542,11 +542,11 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
* @param o whether the mass is overridden
|
||||
*/
|
||||
public final void setMassOverridden(boolean o) {
|
||||
if (massOverriden == o) {
|
||||
if (massOverridden == o) {
|
||||
return;
|
||||
}
|
||||
checkState();
|
||||
massOverriden = o;
|
||||
massOverridden = o;
|
||||
fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
|
||||
}
|
||||
|
||||
@ -597,7 +597,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
*/
|
||||
public final boolean isCGOverridden() {
|
||||
mutex.verify();
|
||||
return cgOverriden;
|
||||
return cgOverridden;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -606,17 +606,17 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
* @param o whether the CG is overridden
|
||||
*/
|
||||
public final void setCGOverridden(boolean o) {
|
||||
if (cgOverriden == o) {
|
||||
if (cgOverridden == o) {
|
||||
return;
|
||||
}
|
||||
checkState();
|
||||
cgOverriden = o;
|
||||
cgOverridden = o;
|
||||
fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Return the current override CD. The CD is not neccesarily overriden.
|
||||
/** Return the current override CD. The CD is not necessarily overridden.
|
||||
*
|
||||
* @return the override CG.
|
||||
*/
|
||||
@ -644,27 +644,27 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
|
||||
|
||||
/**
|
||||
* Return whether the CD is currently overriden.
|
||||
* Return whether the CD is currently overridden.
|
||||
*
|
||||
* @return whether the CD is overridden
|
||||
*/
|
||||
public final boolean isCDOverridden() {
|
||||
mutex.verify();
|
||||
return cdOverriden;
|
||||
return cdOverridden;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set whether the CD is currently overriden.
|
||||
* Set whether the CD is currently overridden.
|
||||
*
|
||||
* @param o whether the CD is overriden
|
||||
* @param o whether the CD is overridden
|
||||
*/
|
||||
public final void setCDOverridden(boolean o) {
|
||||
if(cdOverriden == o) {
|
||||
if(cdOverridden == o) {
|
||||
return;
|
||||
}
|
||||
checkState();
|
||||
cdOverriden = o;
|
||||
cdOverridden = o;
|
||||
fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
|
||||
}
|
||||
|
||||
@ -1283,7 +1283,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
*/
|
||||
public final double getMass() {
|
||||
mutex.verify();
|
||||
if (massOverriden)
|
||||
if (massOverridden)
|
||||
return overrideMass;
|
||||
return getComponentMass();
|
||||
}
|
||||
@ -1311,10 +1311,10 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
*/
|
||||
public final Coordinate getCG() {
|
||||
checkState();
|
||||
if (cgOverriden)
|
||||
if (cgOverridden)
|
||||
return getOverrideCG().setWeight(getMass());
|
||||
|
||||
if (massOverriden)
|
||||
if (massOverridden)
|
||||
return getComponentCG().setWeight(getMass());
|
||||
|
||||
return getComponentCG();
|
||||
@ -2016,9 +2016,9 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
this.color = src.color;
|
||||
this.lineStyle = src.lineStyle;
|
||||
this.overrideMass = src.overrideMass;
|
||||
this.massOverriden = src.massOverriden;
|
||||
this.massOverridden = src.massOverridden;
|
||||
this.overrideCGX = src.overrideCGX;
|
||||
this.cgOverriden = src.cgOverriden;
|
||||
this.cgOverridden = src.cgOverridden;
|
||||
this.overrideSubcomponents = src.overrideSubcomponents;
|
||||
this.name = src.name;
|
||||
this.comment = src.comment;
|
||||
|
@ -25,7 +25,7 @@ public class Transition extends SymmetricComponent implements InsideColorCompone
|
||||
|
||||
private Shape type;
|
||||
private double shapeParameter;
|
||||
private boolean clipped; // Not to be read - use isClipped(), which may be overriden
|
||||
private boolean clipped; // Not to be read - use isClipped(), which may be overridden
|
||||
|
||||
private double foreRadius, aftRadius;
|
||||
private boolean autoForeRadius, autoAftRadius2; // Whether the start radius is automatic
|
||||
|
@ -264,7 +264,7 @@ public class TubeFinSet extends ExternalComponent implements AxialPositionable,
|
||||
|
||||
@Override
|
||||
public double getLongitudinalUnitInertia() {
|
||||
// Logitudinal Unit Inertia for a single tube fin.
|
||||
// Longitudinal Unit Inertia for a single tube fin.
|
||||
// 1/12 * (3 * (r1^2 + r2^2) + h^2)
|
||||
final double inertia = (3 * (MathUtil.pow2(getOuterRadius()) + MathUtil.pow2(getInnerRadius())) + MathUtil.pow2(getLength())) / 12;
|
||||
if (fins == 1) {
|
||||
|
@ -3,7 +3,7 @@ package net.sf.openrocket.rocketvisitors;
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponentVisitor;
|
||||
|
||||
public abstract class DepthFirstRecusiveVisitor<R> implements RocketComponentVisitor<R> {
|
||||
public abstract class DepthFirstRecursiveVisitor<R> implements RocketComponentVisitor<R> {
|
||||
|
||||
@Override
|
||||
public final void visit(RocketComponent visitable) {
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||
|
||||
public class ListComponents<T extends RocketComponent> extends DepthFirstRecusiveVisitor<List<T>> {
|
||||
public class ListComponents<T extends RocketComponent> extends DepthFirstRecursiveVisitor<List<T>> {
|
||||
|
||||
private final Class<T> componentClazz;
|
||||
protected List<T> components = new ArrayList<T>();
|
||||
|
@ -59,7 +59,7 @@ public class SimulationOptions implements ChangeSource, Cloneable {
|
||||
|
||||
|
||||
private double windAverage = preferences.getDouble(Preferences.WIND_AVERAGE, 2.0);
|
||||
private double windTurbulence = preferences.getDouble(Preferences.WIND_TURBULANCE, 0.1);
|
||||
private double windTurbulence = preferences.getDouble(Preferences.WIND_TURBULENCE, 0.1);
|
||||
|
||||
/*
|
||||
* SimulationOptions maintains the launch site parameters as separate double values,
|
||||
|
@ -7,7 +7,7 @@ import net.sf.openrocket.simulation.listeners.AbstractSimulationListener;
|
||||
|
||||
/**
|
||||
* A simulation listener that stops the simulation after a specified number of steps or
|
||||
* after a specified abount of simulation time.
|
||||
* after a specified amount of simulation time.
|
||||
*
|
||||
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
|
||||
*/
|
||||
|
@ -83,7 +83,7 @@ public abstract class Preferences implements ChangeSource {
|
||||
public static final String LAUNCH_ROD_DIRECTION = "LaunchRodDirection";
|
||||
public static final String WIND_DIRECTION = "WindDirection";
|
||||
public static final String WIND_AVERAGE = "WindAverage";
|
||||
public static final String WIND_TURBULANCE = "WindTurbulence";
|
||||
public static final String WIND_TURBULENCE = "WindTurbulence";
|
||||
public static final String LAUNCH_ALTITUDE = "LaunchAltitude";
|
||||
public static final String LAUNCH_LATITUDE = "LaunchLatitude";
|
||||
public static final String LAUNCH_LONGITUDE = "LaunchLongitude";
|
||||
@ -188,15 +188,15 @@ public abstract class Preferences implements ChangeSource {
|
||||
}
|
||||
|
||||
public final double getWindTurbulenceIntensity() {
|
||||
return Application.getPreferences().getChoice(Preferences.WIND_TURBULANCE, 0.9, 0.1);
|
||||
return Application.getPreferences().getChoice(Preferences.WIND_TURBULENCE, 0.9, 0.1);
|
||||
}
|
||||
|
||||
public final void setWindTurbulenceIntensity(double wti) {
|
||||
double oldWTI = Application.getPreferences().getChoice(Preferences.WIND_TURBULANCE, 0.9, 0.3);
|
||||
double oldWTI = Application.getPreferences().getChoice(Preferences.WIND_TURBULENCE, 0.9, 0.3);
|
||||
|
||||
if (MathUtil.equals(oldWTI, wti))
|
||||
return;
|
||||
this.putDouble(Preferences.WIND_TURBULANCE, wti);
|
||||
this.putDouble(Preferences.WIND_TURBULENCE, wti);
|
||||
fireChangeEvent();
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ public abstract class Preferences implements ChangeSource {
|
||||
|
||||
|
||||
public double getWindSpeedDeviation() {
|
||||
return this.getDouble(WIND_AVERAGE, 2) * this.getDouble(WIND_TURBULANCE, .1);
|
||||
return this.getDouble(WIND_AVERAGE, 2) * this.getDouble(WIND_TURBULENCE, .1);
|
||||
}
|
||||
|
||||
public void setWindSpeedDeviation(double windDeviation) {
|
||||
|
@ -27,7 +27,7 @@ public class ListenerList<T> implements Invalidatable, Iterable<T> {
|
||||
|
||||
|
||||
/**
|
||||
* Sole contructor.
|
||||
* Sole constructor.
|
||||
*/
|
||||
public ListenerList() {
|
||||
this.instantiationLocation = new Throwable();
|
||||
@ -73,7 +73,7 @@ public class ListenerList<T> implements Invalidatable, Iterable<T> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
log.info("Attempting to remove non-existant listener " + listener);
|
||||
log.info("Attempting to remove non-existent listener " + listener);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public abstract class SafetyMutex {
|
||||
|
||||
// Check that the mutex is locked by the current thread
|
||||
if (lockingThread != Thread.currentThread()) {
|
||||
error("Mutex is being unlocked from differerent thread than where it was locked", false);
|
||||
error("Mutex is being unlocked from different thread than where it was locked", false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class Transformation implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the given transformation before this tranformation. The resulting
|
||||
* Applies the given transformation before this transformation. The resulting
|
||||
* transformation result.transform(c) will equal this.transform(other.transform(c)).
|
||||
*
|
||||
* @param other Transformation to apply
|
||||
|
@ -152,7 +152,7 @@ public class TransitionComponentTests extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void changeAftSholderLengthLeavesPreset() {
|
||||
public void changeAftShoulderLengthLeavesPreset() {
|
||||
Transition tr = new Transition();
|
||||
|
||||
tr.loadPreset(preset);
|
||||
|
@ -149,7 +149,7 @@ public class FractionalUnitTest {
|
||||
assertEquals("-\u00B9\u2044\u2084", testUnit.toString(-.225));
|
||||
assertEquals("-\u00B9\u2044\u2084", testUnit.toString(-.25));
|
||||
assertEquals("-\u00B9\u2044\u2084", testUnit.toString(-.274));
|
||||
//assertEquals("-1/4", testUnit.toString(-.275)); // this has roundoff error which pushes it over epsilon
|
||||
//assertEquals("-1/4", testUnit.toString(-.275)); // this has round-off error which pushes it over epsilon
|
||||
|
||||
assertEquals("0", testUnit.toString(-0.024));
|
||||
assertEquals("0", testUnit.toString(0));
|
||||
@ -253,7 +253,7 @@ public class FractionalUnitTest {
|
||||
|
||||
assertEquals("7 \u2077\u2044\u2088", inchUnit.toString(length));
|
||||
|
||||
// had problems with roundoff in decrement.
|
||||
// had problems with round-off in decrement.
|
||||
|
||||
double v = inchUnit.toUnit(length);
|
||||
for (int i = 0; i < 15; i++) {
|
||||
|
@ -8,7 +8,7 @@ import org.junit.Test;
|
||||
public class GeodeticComputationStrategyTest {
|
||||
|
||||
@Test
|
||||
public void testSpericalAddCoordinate() {
|
||||
public void testSphericalAddCoordinate() {
|
||||
|
||||
double arcmin = (1.0 / 60.0);
|
||||
double arcsec = (1.0 / (60.0 * 60.0));
|
||||
@ -145,7 +145,7 @@ public class GeodeticComputationStrategyTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void testSpericalGetCoriolisAcceleration() {
|
||||
public void testSphericalGetCoriolisAcceleration() {
|
||||
|
||||
// For positive latitude and rotational velocity, a movement due east results in an acceleration due south
|
||||
Coordinate velocity = new Coordinate(-1000, 0, 0);
|
||||
|
@ -67,7 +67,7 @@ public class ParameterSetModel<T extends FlightConfigurableParameter<T>> impleme
|
||||
this.selected = item;
|
||||
return;
|
||||
}else{
|
||||
throw new IllegalArgumentException("attempted to set selected item (oftype "+item.getClass().getSimpleName()
|
||||
throw new IllegalArgumentException("attempted to set selected item (of type "+item.getClass().getSimpleName()
|
||||
+") when this generic contains a type: "+this.selected.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class XTableColumnModel extends DefaultTableColumnModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Checks wether the specified column is currently visible.
|
||||
/** Checks whether the specified column is currently visible.
|
||||
* @param aColumn column to check
|
||||
* @return visibility of specified column (false if there is no such column at all. [It's not visible, right?])
|
||||
*/
|
||||
@ -107,7 +107,7 @@ public class XTableColumnModel extends DefaultTableColumnModel {
|
||||
return (tableColumns.indexOf(aColumn) >= 0);
|
||||
}
|
||||
|
||||
/** Append <code>column</code> to the right of exisiting columns.
|
||||
/** Append <code>column</code> to the right of existing columns.
|
||||
* Posts <code>columnAdded</code> event.
|
||||
* @param column The column to be added
|
||||
* @see #removeColumn
|
||||
|
@ -102,7 +102,7 @@ public class RocketFigure3d extends JPanel implements GLEventListener {
|
||||
this.rkt = document.getRocket();
|
||||
this.setLayout(new BorderLayout());
|
||||
|
||||
//Only initizlize GL if 3d is enabled.
|
||||
//Only initialize GL if 3d is enabled.
|
||||
if (is3dEnabled()) {
|
||||
//Fixes a linux / X bug: Splash must be closed before GL Init
|
||||
SplashScreen splash = Splash.getSplashScreen();
|
||||
|
@ -54,10 +54,10 @@ public class SaveAsFileChooser extends JFileChooser {
|
||||
break;
|
||||
}
|
||||
|
||||
final RememberFilenamePropertyListener listner = new RememberFilenamePropertyListener();
|
||||
this.addPropertyChangeListener(JFileChooser.FILE_FILTER_CHANGED_PROPERTY, listner);
|
||||
this.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, listner);
|
||||
this.addPropertyChangeListener(JFileChooser.SELECTED_FILES_CHANGED_PROPERTY, listner);
|
||||
final RememberFilenamePropertyListener listener = new RememberFilenamePropertyListener();
|
||||
this.addPropertyChangeListener(JFileChooser.FILE_FILTER_CHANGED_PROPERTY, listener);
|
||||
this.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, listener);
|
||||
this.addPropertyChangeListener(JFileChooser.SELECTED_FILES_CHANGED_PROPERTY, listener);
|
||||
|
||||
this.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory());
|
||||
|
||||
|
@ -27,7 +27,7 @@ import net.sf.openrocket.gui.widgets.SelectColorButton;
|
||||
* the button.
|
||||
*
|
||||
* The button can be invoked by a mouse click or by pressing the space bar
|
||||
* when the cell has focus. Optionaly a mnemonic can be set to invoke the
|
||||
* when the cell has focus. Optionally a mnemonic can be set to invoke the
|
||||
* button. When the button is invoked the provided Action is invoked. The
|
||||
* source of the Action will be the table. The action command will contain
|
||||
* the model row number of the button that was clicked.
|
||||
|
@ -20,7 +20,7 @@ public class FinSetShapes extends RocketComponentShape {
|
||||
|
||||
// this supplied transformation includes:
|
||||
// - baseRotationTransformation
|
||||
// - mount-radius transformtion
|
||||
// - mount-radius transformation
|
||||
// - component-center offset transformation
|
||||
// - component-instance offset transformation
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class FinPointFigure extends AbstractScaleFigure {
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: This function drawns relative to the reference point of the BODY component
|
||||
// NOTE: This function draws relative to the reference point of the BODY component
|
||||
// In other words: 0,0 == the front, foreRadius of the body component
|
||||
private void paintBodyTransition( Graphics2D g2){
|
||||
|
||||
|
@ -5,7 +5,7 @@ package net.sf.openrocket.gui.widgets;
|
||||
* Java source file for the class MultiSlider
|
||||
*
|
||||
* Copyright (c), 1999 - 2002, Masahiro Takatsuka and GeoVISTA Center
|
||||
* All Rights Researved.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Original Author: Masahiro Takatsuka
|
||||
* $Author: eytanadar $
|
||||
@ -37,7 +37,7 @@ import javax.swing.plaf.SliderUI;
|
||||
Implementation of class MultiSlider
|
||||
====================================================================*/
|
||||
/***
|
||||
* A component that lets the user graphically select values by slding
|
||||
* A component that lets the user graphically select values by sliding
|
||||
* multiple thumbs within a bounded interval. MultiSlider inherits all
|
||||
* fields and methods from javax.swing.JSlider.
|
||||
* <p>
|
||||
@ -70,7 +70,7 @@ public class MultiSlider extends JSlider {
|
||||
|
||||
/***
|
||||
* Creates a slider with the specified orientation and the
|
||||
* specified mimimum, maximum, and initial values.
|
||||
* specified minimum, maximum, and initial values.
|
||||
*
|
||||
* @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL
|
||||
*
|
||||
@ -88,7 +88,7 @@ public class MultiSlider extends JSlider {
|
||||
|
||||
/***
|
||||
* Creates a slider with the specified orientation and the
|
||||
* specified mimimum, maximum, and the number of thumbs.
|
||||
* specified minimum, maximum, and the number of thumbs.
|
||||
*
|
||||
* @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL
|
||||
*
|
||||
@ -105,7 +105,7 @@ public class MultiSlider extends JSlider {
|
||||
|
||||
/***
|
||||
* Creates a horizontal slider with the range 0 to 100 and
|
||||
* an intitial value of 50.
|
||||
* an initial value of 50.
|
||||
*/
|
||||
public MultiSlider() {
|
||||
this(HORIZONTAL, 0, 100);
|
||||
@ -114,7 +114,7 @@ public class MultiSlider extends JSlider {
|
||||
|
||||
/***
|
||||
* Creates a slider using the specified orientation with the
|
||||
* range 0 to 100 and an intitial value of 50.
|
||||
* range 0 to 100 and an initial value of 50.
|
||||
*/
|
||||
public MultiSlider(int orientation) {
|
||||
this(orientation, 0, 100);
|
||||
@ -123,7 +123,7 @@ public class MultiSlider extends JSlider {
|
||||
|
||||
/***
|
||||
* Creates a horizontal slider using the specified min and max
|
||||
* with an intitial value of 50.
|
||||
* with an initial value of 50.
|
||||
*/
|
||||
public MultiSlider(int min, int max) {
|
||||
this(HORIZONTAL, min, max);
|
||||
|
@ -5,7 +5,7 @@ package net.sf.openrocket.gui.widgets;
|
||||
* Java source file for the class MultiSliderUI
|
||||
*
|
||||
* Copyright (c), 1999 - 2002, Masahiro Takatsuka and GeoVISTA Center
|
||||
* All Rights Researved.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Original Author: Masahiro Takatsuka
|
||||
* $Author: eytanadar $
|
||||
|
@ -55,14 +55,14 @@ public class LoggingSystemSetup {
|
||||
*/
|
||||
public static DelegatorLogger getInstance() {
|
||||
Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
LogbackBufferLoggerAdaptor adapater = (LogbackBufferLoggerAdaptor) logger.getAppender("buffer");
|
||||
return adapater.getLogHelper();
|
||||
LogbackBufferLoggerAdaptor adaptor = (LogbackBufferLoggerAdaptor) logger.getAppender("buffer");
|
||||
return adaptor.getLogHelper();
|
||||
}
|
||||
|
||||
public static LogLevelBufferLogger getBufferLogger() {
|
||||
Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
LogbackBufferLoggerAdaptor adapater = (LogbackBufferLoggerAdaptor) logger.getAppender("buffer");
|
||||
return adapater.getLogBuffer();
|
||||
LogbackBufferLoggerAdaptor adaptor = (LogbackBufferLoggerAdaptor) logger.getAppender("buffer");
|
||||
return adaptor.getLogBuffer();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PrintStreamToSLF4J {
|
||||
|
||||
public static PrintStream getPrintStream(String category, PrintStream orignal) {
|
||||
public static PrintStream getPrintStream(String category, PrintStream original) {
|
||||
|
||||
final Logger logger = LoggerFactory.getLogger(category);
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class OpenRocket {
|
||||
private static final String STARTUP_CLASS = "net.sf.openrocket.startup.SwingStartup";
|
||||
|
||||
public static void main(String[] args) {
|
||||
// This property works around some fundimental bugs in TimSort in the java library which has had known issues
|
||||
// This property works around some fundamental bugs in TimSort in the java library which has had known issues
|
||||
// since it was introduced in JDK 1.7. In OpenRocket it manifests when you sort the motors in the motor chooser dialog
|
||||
// by designation.
|
||||
System.setProperty("java.util.Arrays.useLegacyMergeSort","true");
|
||||
|
@ -29,7 +29,7 @@ public class TranslatorProvider implements Provider<Translator> {
|
||||
return oldTranslator;
|
||||
}
|
||||
|
||||
// Check for locale propery
|
||||
// Check for locale property
|
||||
String langcode = System.getProperty("openrocket.locale");
|
||||
|
||||
if (langcode != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user