X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fsimulation%2Fcustomexpression%2FIndexExpression.java;h=6fb084de4154f18ab2b66436acf8334c497bf137;hb=c482637086621542ea78ba8818f315dce0a11dc2;hp=ab7e1572cb32c379e9118d773a3ec4b6d9d8886b;hpb=c322e9329373aa7f0b071663874327da7e650082;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/simulation/customexpression/IndexExpression.java b/core/src/net/sf/openrocket/simulation/customexpression/IndexExpression.java index ab7e1572..6fb084de 100644 --- a/core/src/net/sf/openrocket/simulation/customexpression/IndexExpression.java +++ b/core/src/net/sf/openrocket/simulation/customexpression/IndexExpression.java @@ -23,7 +23,6 @@ public class IndexExpression extends CustomExpression { setExpression(indexText); this.setName(""); this.setSymbol(typeText); - } @Override @@ -35,7 +34,10 @@ public class IndexExpression extends CustomExpression { } // From the given datatype, get the time and function values and make an interpolator - FlightDataType type = getType(); + + //Note: must get in a way that flight data system will figure out units. Otherwise there will be a type conflict when we get the new data. + FlightDataType type = FlightDataType.getType(null, getSymbol(), null); + List data = status.getFlightData().get(type); List time = status.getFlightData().get(FlightDataType.TYPE_TIME); LinearInterpolator interp = new LinearInterpolator(time, data);