- Implemented a DampingMoment simulation listener example
[debian/openrocket] / core / src / net / sf / openrocket / simulation / customexpression / RangeExpression.java
index 83b5e6c506dce15c80891c087c3c005cdef1eff3..1667b61e9a1695fee2ea4df06410836f20539bdb 100644 (file)
@@ -40,7 +40,6 @@ public class RangeExpression extends CustomExpression {
                this.expression = variableType+startTime+endTime; // this is used just for generating the hash
                
                log.info("New range expression, "+startTime + " to "+endTime);
-               
        }
        
        /*
@@ -73,7 +72,9 @@ public class RangeExpression 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<Double> data = status.getFlightData().get(type);
                List<Double> time = status.getFlightData().get(FlightDataType.TYPE_TIME);