blob: eecd4d3809880ff58e95f10351b40a005e212878 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef UNITY_LOCATION_SERVICE_H_
#define UNITY_LOCATION_SERVICE_H_
#include "Runtime/Math/Vector3.h"
struct LocationInfo
{
double timestamp;
float latitude;
float longitude;
float altitude;
float horizontalAccuracy;
float verticalAccuracy;
};
struct HeadingInfo
{
float magneticHeading;
float trueHeading;
Vector3f raw;
double timestamp;
};
enum LocationServiceStatus
{
kLocationServiceStopped,
kLocationServiceInitializing,
kLocationServiceRunning,
kLocationServiceFailed
};
class LocationService
{
public:
static void SetDesiredAccuracy (float val);
static float GetDesiredAccuracy ();
static void SetDistanceFilter (float val);
static float GetDistanceFilter ();
static bool IsServiceEnabledByUser ();
static void StartUpdatingLocation ();
static void StopUpdatingLocation ();
static void SetHeadingUpdatesEnabled (bool enabled);
static bool IsHeadingUpdatesEnabled();
static LocationServiceStatus GetLocationStatus ();
static LocationServiceStatus GetHeadingStatus ();
static LocationInfo GetLastLocation ();
static const HeadingInfo &GetLastHeading ();
static bool IsHeadingAvailable ();
};
#endif // #ifndef UNITY_LOCATION_SERVICE_H_
|