8#ifndef META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
9#define META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
15#include <android/sensor.h>
84 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);
196 const ASensor* sensorAccelerometer_ =
nullptr;
199 const ASensor* sensorLinearAccelerometer_ =
nullptr;
202 const ASensor* sensorRotationVector_ =
nullptr;
205 const ASensor* sensorGameRotationVector_ =
nullptr;
208 const ASensor* sensorGyroRaw_ =
nullptr;
211 const ASensor* sensorGyroUnbiased_ =
nullptr;
214 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:220
static void registerCustomTimestampConverter(TimestampConverter &×tampConverter)
Registers a custom timestamp converter for all Android devices.
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:217
static TimestampConverter & timestampConverter()
Returns the timestamp converter for all android devices.
std::unordered_map< std::string, CustomDevicePair > CustomDeviceMap
Definition of an unordered map mapping names of custom devices to sensors.
Definition AndroidFactory.h:44
std::pair< Device::DeviceType, const ASensor * > CustomDevicePair
Definition of a pair combining a device type with a sensor.
Definition AndroidFactory.h:39
Device * createAndroidGyroUnbiasedSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF unbiased gyro sensor.
This class implements a sensor for the Android library.
Definition AndroidSensor.h:42
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 is a helper class allowing to converter timestamps defined in a specific time domain to un...
Definition Timestamp.h:312
This class implements a timestamp.
Definition Timestamp.h:63
The namespace covering the entire Ocean framework.
Definition Accessor.h:15