8#ifndef META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
9#define META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
15#include <android/sensor.h>
82 static void newGPSLocation(
const double latitude,
const double longitude,
const float altitude,
const float direction,
const float speed,
const float accuracy,
const float altitudeAccuracy,
const float directionAccuracy,
const float speedAccuracy,
const Timestamp& timestamp);
182 const ASensor* sensorAccelerometer_ =
nullptr;
185 const ASensor* sensorLinearAccelerometer_ =
nullptr;
188 const ASensor* sensorRotationVector_ =
nullptr;
191 const ASensor* sensorGameRotationVector_ =
nullptr;
194 const ASensor* sensorGyroRaw_ =
nullptr;
197 const ASensor* sensorGyroUnbiased_ =
nullptr;
200 const ASensor* sensorGravity_ =
nullptr;
This class implements a device factory for the Android feature based tracking system.
Definition AndroidFactory.h:31
static void newGPSLocation(const double latitude, const double longitude, const float altitude, const float direction, const float speed, const float accuracy, const float altitudeAccuracy, const float directionAccuracy, const float speedAccuracy, const Timestamp ×tamp)
Sends a new GPS location to the tracker which is managed by this factory.
static bool unregisterFactory()
Unregisters this factory at the manger.
Device * createAndroidGyroRawSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF raw gyro sensor.
Device * createAndroidOrientationTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF orientation tracker.
Device * createAndroidAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF acceleration sensor.
Device * createAndroidHeadingTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF heading tracker.
void registerDevices()
Registers all devices.
Lock lock_
The factory's lock.
Definition AndroidFactory.h:206
Device * createAndroidGPSTracker(const std::string &name, const Device::DeviceType &deviceType)
Creates a new GPS tracker.
Device * createAndroidLinearAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF linear acceleration sensor.
bool registerCustomDevice(const std::string &deviceName, const std::string &stringType, const Device::DeviceType &deviceType)
Registers a custom device which is otherwise unknown to this factory.
AndroidFactory()
Creates a new factory.
Device * createAndroidGravityTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF gravity tracker.
Device * createCustomDevice(const std::string &name, const Device::DeviceType &deviceType)
static bool registerFactory()
Registers this factory at the manager.
static std::string registerCustomDevice(const std::string &stringType, const Device::DeviceType &deviceType)
Registers a custom device which is otherwise unknown to this factory.
CustomDeviceMap customDeviceMap_
The custom devices.
Definition AndroidFactory.h:203
std::unordered_map< std::string, CustomDevicePair > CustomDeviceMap
Definition of an unordered map mapping names of custom devices to sensors.
Definition AndroidFactory.h:42
std::pair< Device::DeviceType, const ASensor * > CustomDevicePair
Definition of a pair combining a device type with a sensor.
Definition AndroidFactory.h:37
Device * createAndroidGyroUnbiasedSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF unbiased gyro sensor.
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
This class is the base class for all devices of any type.
Definition devices/Device.h:28
This class implements a factory able to create instances of devices.
Definition devices/Factory.h:28
This class implements a recursive lock object.
Definition Lock.h:31
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15