Enum LocationRequest.MotionMode

  • All Implemented Interfaces:
    Serializable, Comparable<LocationRequest.MotionMode>
    Enclosing class:
    LocationRequest

    public static enum LocationRequest.MotionMode
    extends Enum<LocationRequest.MotionMode>
    Allows to indicate how the user that carries the smartphone moves: by foot (default), by car, etc. Knowing how the user moves is important since Situm adapts to each movement type (e.g. if an user moves in a car, Situm will not behave well if this parameter is set to other type of movement).
    • Enum Constant Detail

      • BY_FOOT

        public static final LocationRequest.MotionMode BY_FOOT
        (DEFAULT) User moves on foot (walking), Situm estimates the displacement using inertial sensors (accelerometer, gyroscope, magnetometer). This is the most common configuration for wayfinding and tracking apps.
      • BY_CAR

        public static final LocationRequest.MotionMode BY_CAR
        User moves in a car, Situm estimates the displacement using inertial sensors (accelerometer, gyroscope, magnetometer). Common configuration for wayfinding apps for cars in parking lots.
      • RADIOMAX

        public static final LocationRequest.MotionMode RADIOMAX
        User movement type not known or can not be modelled properly, Situm will just return the location where the WiFi/BLE signals match better with those of the calibrations. Location may be a bit jumpy and less accurate. If the device stays still for a long time period (no acceleration detected), at some point Situm will repeat the same location until the device moves again.

        This mode is typically used to track vehicles that show complex movements, such as forklifts in factories or warehouses. If this is the case, VEHICLE_VISUAL_ODOMETRY is recommended instead (provides better accuracy).

        When using this mode, the value of LocationRequest.useDeadReckoning() is ignored.

      • BY_FOOT_VISUAL_ODOMETRY

        public static final LocationRequest.MotionMode BY_FOOT_VISUAL_ODOMETRY
        (EXPERIMENTAL) User moves on foot (walking), Situm estimates the movement by computing the visual odometry on the back camera feed. Camera must have enough field of view, and environment enough texture, to detect movement in the video feed (e.g. forward or downward facing).

        This mode requires Android 7 or superior and a compatible device (see supported devices).

        This mode requires the permission android.permission.CAMERA.

        When using this mode, the value of LocationRequest.useDeadReckoning() is ignored

      • VEHICLE_VISUAL_ODOMETRY

        public static final LocationRequest.MotionMode VEHICLE_VISUAL_ODOMETRY
        (EXPERIMENTAL) User moves on a vehicle (e.g. car, forklift, etc.) and Situm estimates the movement by computing the visual odometry on the back camera feed. Camera must have enough field of view, and environment enough texture, to detect movement in the video feed (e.g. forward or downward facing).

        This mode requires Android 7 or superior and a compatible device (see supported devices).

        This mode requires the permission android.permission.CAMERA.

        When using this mode, the value of LocationRequest.useDeadReckoning() is ignored

    • Method Detail

      • values

        public static LocationRequest.MotionMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LocationRequest.MotionMode c : LocationRequest.MotionMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LocationRequest.MotionMode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null