//// Vertical position and motion
//// Altitude
- public static final FlightDataType TYPE_ALTITUDE = newType(trans.get("FlightDataType.TYPE_ALTITUDE"), "a", UnitGroup.UNITS_DISTANCE, 10);
+ public static final FlightDataType TYPE_ALTITUDE = newType(trans.get("FlightDataType.TYPE_ALTITUDE"), "h", UnitGroup.UNITS_DISTANCE, 10);
//// Vertical velocity
public static final FlightDataType TYPE_VELOCITY_Z = newType(trans.get("FlightDataType.TYPE_VELOCITY_Z"), "Vz", UnitGroup.UNITS_VELOCITY, 11);
//// Vertical acceleration
// An array of all the built in types
public static final FlightDataType[] ALL_TYPES = {
+ TYPE_TIME,
TYPE_ALTITUDE ,
TYPE_VELOCITY_Z ,
TYPE_ACCELERATION_Z,
* @return a data type.
*/
public static synchronized FlightDataType getType(String s, String symbol, UnitGroup u) {
+ // modified to include the unit
FlightDataType type = EXISTING_TYPES.get(s.toLowerCase(Locale.ENGLISH));
+
+ // added this for backward compatibility. Will update type if symbol undefined
+ //if (type != null && type.getSymbol() != symbol){
+ // EXISTING_TYPES.remove(type);
+ // type = null;
+ //}
+
if (type != null) {
return type;
}
private final String name;
private final String symbol;
private final UnitGroup units;
- private final int priority;
+ private int priority;
private final int hashCode;
}
-
+ public void setPriority(int p){
+ this.priority = p;
+ }
public String getName() {
return name;
@Override
public String toString() {
- return name;
+ return name; //+" ("+symbol+") "+units.getDefaultUnit().toString();
}
@Override