Package com.trx.neon.api.neonConstraint
Class NeonConstraint
- java.lang.Object
-
- com.trx.neon.api.neonConstraint.NeonConstraint
-
public class NeonConstraint extends java.lang.Object
The main entry point for integrating Neon Constraint Services into your application.
-
-
Constructor Summary
Constructors Constructor Description NeonConstraint()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addCustomConstraint(CustomConstraint constraint)
Add a custom constraint to help solve the user’s locationstatic void
addGPSConstraint(long unixTimeMs, double latitude, double longitude, GPSFixQuality fixQuality, float errorCEP)
Ass a GPS Constraint to help solve the user's locationstatic void
addNMEASentence(java.lang.String sentence)
Add a GPS NMEA sentence to help solve the user's location In order to generate GPS Constraints via this method, send at least the following NMEA sentences: RMC, GGA, GSV, and GSA.static void
addRangingConstraint(long unixTimeMs, double latitude, double longitude, float placementError, float range, RangeType type, ElevationInfo elevation)
Add a ranging constraint to help solve the user's locationstatic void
addUserCheckin(long unixTimeMs, double latitude, double longitude, float locationError, ElevationInfo elevation)
Add a user check-in to help solve the user’s locationstatic boolean
canDropUWBBeacon(java.lang.String beaconName)
Determines whether user can drop an UWB beaconstatic void
dropUWBBeacon(long unixTimeMs, java.lang.String beaconName, double latitude, double longitude, float locationError, ElevationInfo elevationInfo)
Program an UWB beacon with location and elevation information so it can then beacon to improve nearby users.static void
registerEvents(INeonEventListenerConstraint listener)
Register a listener for constraint events from the APIstatic boolean
unregisterEvents(INeonEventListenerConstraint listener)
Unregister a listener for constraint events from the API
-
-
-
Method Detail
-
registerEvents
public static void registerEvents(INeonEventListenerConstraint listener)
Register a listener for constraint events from the API
-
unregisterEvents
public static boolean unregisterEvents(INeonEventListenerConstraint listener)
Unregister a listener for constraint events from the API
-
addUserCheckin
public static void addUserCheckin(long unixTimeMs, double latitude, double longitude, float locationError, ElevationInfo elevation)
Add a user check-in to help solve the user’s location- Parameters:
unixTimeMs
- Unix time in mslatitude
- WGS-84 Latitudelongitude
- WGS-84 LongitudelocationError
- Location Error in meterselevation
- Elevation information- See Also:
ElevationInfo
-
addRangingConstraint
public static void addRangingConstraint(long unixTimeMs, double latitude, double longitude, float placementError, float range, RangeType type, ElevationInfo elevation)
Add a ranging constraint to help solve the user's location- Parameters:
unixTimeMs
- Unix time in mslatitude
- WGS-84 Latitude of ranging devicelongitude
- WGS-84 Longitude of ranging deviceplacementError
- Error in placement of ranging device in metersrange
- Range to ranging device in meterstype
- Range type of the ranging deviceelevation
- Elevation information for the ranging device- See Also:
RangeType
,ElevationInfo
-
addGPSConstraint
public static void addGPSConstraint(long unixTimeMs, double latitude, double longitude, GPSFixQuality fixQuality, float errorCEP)
Ass a GPS Constraint to help solve the user's location- Parameters:
unixTimeMs
- Unix time in mslatitude
- WGS-84 Latitudelongitude
- WGS-84 LongitudefixQuality
- The GPS fix qualityerrorCEP
- CEP50 Error in meters- See Also:
GPSFixQuality
-
addCustomConstraint
public static void addCustomConstraint(CustomConstraint constraint)
Add a custom constraint to help solve the user’s location- Parameters:
constraint
- A CustomConstraint object that represent a location with error and elevation info- See Also:
CustomConstraint
-
addNMEASentence
public static void addNMEASentence(java.lang.String sentence)
Add a GPS NMEA sentence to help solve the user's location In order to generate GPS Constraints via this method, send at least the following NMEA sentences: RMC, GGA, GSV, and GSA.- Parameters:
sentence
- A single and complete NMEA sentence
-
dropUWBBeacon
public static void dropUWBBeacon(long unixTimeMs, java.lang.String beaconName, double latitude, double longitude, float locationError, ElevationInfo elevationInfo)
Program an UWB beacon with location and elevation information so it can then beacon to improve nearby users. An UWB-enabled tracker is required.- Parameters:
unixTimeMs
- Unix time in msbeaconName
- The device name of the UWB beacon, in the form "TRX_9XXX". Can be retrieved from BluetoothDevice.namelatitude
- WGS-84 Latitude of UWB beaconlongitude
- WGS-84 Longitude of UWB beaconlocationError
- Error in placement of UWB beacon in meterselevationInfo
- Elevation information for UWB beacon- See Also:
ElevationInfo
-
canDropUWBBeacon
public static boolean canDropUWBBeacon(java.lang.String beaconName)
Determines whether user can drop an UWB beacon- Parameters:
beaconName
- bluetooth device name of the beacon to be dropped, in the form "TRX_9XXX"- Returns:
- whether or not the beacon is able to be dropped
-
-