Package edu.tufts.hrilab.ava.util
Class Utilities
java.lang.Object
edu.tufts.hrilab.ava.util.Utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateAuthToken(String username, String password) Encode username and password into auth token header.static doublefromMapPixelScale(double val, double scale) Convert a value in pixels to meters via scalar.static doubletoMapPixelScale(double val, double scale) Convert a value in meters to pixel via scalar.
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
createAuthToken
Encode username and password into auth token header. Prevents need to store username and password in memory.- Parameters:
username- Ava RMS usernamepassword- Ava RMS password- Returns:
- encoded auth token
-
fromMapPixelScale
public static double fromMapPixelScale(double val, double scale) Convert a value in pixels to meters via scalar.- Parameters:
val- pixel valuescale- meters/pixel- Returns:
- meter value
-
toMapPixelScale
public static double toMapPixelScale(double val, double scale) Convert a value in meters to pixel via scalar.- Parameters:
val- meters to convertscale- meters/pixel- Returns:
- pixel value
-