Class 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 location
      static void addGPSConstraint​(long unixTimeMs, double latitude, double longitude, GPSFixQuality fixQuality, float errorCEP)
      Ass a GPS Constraint to help solve the user's location
      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.
      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
      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
      static boolean canDropUWBBeacon​(java.lang.String beaconName)
      Determines whether user can drop an UWB beacon
      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.
      static void registerEvents​(INeonEventListenerConstraint listener)
      Register a listener for constraint events from the API
      static boolean unregisterEvents​(INeonEventListenerConstraint listener)
      Unregister a listener for constraint events from the API
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NeonConstraint

        public NeonConstraint()
    • 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 ms
        latitude - WGS-84 Latitude
        longitude - WGS-84 Longitude
        locationError - Location Error in meters
        elevation - 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 ms
        latitude - WGS-84 Latitude of ranging device
        longitude - WGS-84 Longitude of ranging device
        placementError - Error in placement of ranging device in meters
        range - Range to ranging device in meters
        type - Range type of the ranging device
        elevation - 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 ms
        latitude - WGS-84 Latitude
        longitude - WGS-84 Longitude
        fixQuality - The GPS fix quality
        errorCEP - 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 ms
        beaconName - The device name of the UWB beacon, in the form "TRX_9XXX". Can be retrieved from BluetoothDevice.name
        latitude - WGS-84 Latitude of UWB beacon
        longitude - WGS-84 Longitude of UWB beacon
        locationError - Error in placement of UWB beacon in meters
        elevationInfo - 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