Class ErrorModel
- java.lang.Object
-
- com.trx.neon.api.neonConstraint.model.ErrorModel
-
- All Implemented Interfaces:
android.os.Parcelable
public final class ErrorModel extends java.lang.Object implements android.os.ParcelableCharacterizes the error model for a certain type of constraint
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<ErrorModel>CREATORUsed for sending data across binders
-
Constructor Summary
Constructors Constructor Description ErrorModel(android.os.Parcel in)Constructor for data serialized over the binder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorModelCustom(java.util.UUID modelType, float[] parameters)Represents the error model for a custom constraint.intdescribeContents()static ErrorModelDropUWBBeacon(int beaconID, float locationError)Represents the error for a dropped UWB beacon.static ErrorModelGaussian(float stdDev)Represents the error for a Gaussian constraint, assumed to be centered at zerojava.util.UUIDgetModelType()float[]getParameters()static ErrorModelGPS(GPSFixQuality fixQuality, float errorCEP)Represents the error for a GPS Constraintstatic ErrorModelRanging(float range, float placementError, RangeType rangeType)Represents the error for a Ranging Constraintjava.lang.StringtoString()static ErrorModelUniform(float radius)Represents the error for a Uniform constraintstatic ErrorModelUserCheckin(float locationError)Represents the error for a user check-in.voidwriteToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<ErrorModel> CREATOR
Used for sending data across binders
-
-
Method Detail
-
UserCheckin
public static ErrorModel UserCheckin(float locationError)
Represents the error for a user check-in. This is specifically defined as a user touching a location on a map and saying "I am here." The location error represents the uncertainty in the location on the map. You probably shouldn't go smaller than 1 meter. It could also correspond to the zoom level of the map.- Parameters:
locationError- Location Error in meters- Returns:
- a User Check-in ErrorModel
-
GPS
public static ErrorModel GPS(GPSFixQuality fixQuality, float errorCEP)
Represents the error for a GPS Constraint- Parameters:
fixQuality- - Represents the quality of a GPS fix, which more or less corresponds with the fix quality field of the NMEA GGA message. Used to determine how accurate the position information is.errorCEP- - The error radius in meters CEP50.- Returns:
- a GPS ErrorModel
-
Ranging
public static ErrorModel Ranging(float range, float placementError, RangeType rangeType)
Represents the error for a Ranging Constraint- Parameters:
range- The computed range in meters to the ranging deviceplacementError- Uncertainty in meters of the placement location of the ranging device (at least 1m recommended)rangeType- Ranging technology used- Returns:
- a Ranging ErrorModel
-
DropUWBBeacon
public static ErrorModel DropUWBBeacon(int beaconID, float locationError)
Represents the error for a dropped UWB beacon. This is specifically designed for programming a dropped UWB beacon with it's location and error. The location error represents the uncertainty in the location on the map, or the uncertainty in the user's location.- Parameters:
beaconID- ID for the beacon to be droppedlocationError- Location Error in meters- Returns:
- a Dropped Beacon ErrorModel
-
Uniform
public static ErrorModel Uniform(float radius)
Represents the error for a Uniform constraint- Parameters:
radius- Error in meters- Returns:
- a Uniform ErrorModel
-
Gaussian
public static ErrorModel Gaussian(float stdDev)
Represents the error for a Gaussian constraint, assumed to be centered at zero- Parameters:
stdDev- Standard Deviation for Gaussian in meters- Returns:
- a Uniform ErrorModel
-
Custom
public static ErrorModel Custom(java.util.UUID modelType, float[] parameters)
Represents the error model for a custom constraint. If the error model does not fit the defined types above, you can work with us to define a model type and list of parameters that can be used to define a specific error model. This will have no effect if the Location Service has not been modified to accept your constraint.- Parameters:
modelType- A UUID that defined a model typeparameters- A lsit of parameters that accompany the model type- Returns:
- a Custom ErrorModel
-
getModelType
public final java.util.UUID getModelType()
-
getParameters
public float[] getParameters()
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-