Alexa Auto SDK  2.0.0
Location.h
1 /*
2  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef AACE_LOCATION_LOCATION_H
17 #define AACE_LOCATION_LOCATION_H
18 
19 #include <string>
20 #include <chrono>
21 
24 namespace aace {
25 namespace location {
26 
27 class Location;
28 
32 class Location {
33 public:
34  // used for undefined location values
35  static constexpr double UNDEFINED = std::numeric_limits<double>::min();
36 
41  Location();
42 
52  Location( double latitude, double longitude, double altitude = UNDEFINED, double accuracy = UNDEFINED, std::chrono::system_clock::time_point time = std::chrono::system_clock::now() );
53 
59  Location( const Location& location );
60 
66  bool isValid();
67 
73  double getLatitude();
74 
80  double getLongitude();
81 
87  double getAltitude();
88 
94  double getAccuracy();
95 
101  std::chrono::system_clock::time_point getTime();
102 
108  std::string getTimeAsString();
109 
110 private:
111  double m_latitude;
112  double m_longitude;
113  double m_altitude;
114  double m_accuracy;
115  std::chrono::system_clock::time_point m_time;
116 };
117 
118 } // aace::location
119 } // aace
120 
121 #endif // AACE_LOCATION_LOCATION_H
Definition: Location.h:32
std::chrono::system_clock::time_point getTime()
Definition: Location.cpp:67
double getLongitude()
Definition: Location.cpp:55
Definition: AddressBook.h:26
std::string getTimeAsString()
Definition: Location.cpp:71
double getAccuracy()
Definition: Location.cpp:63
double getAltitude()
Definition: Location.cpp:59
Location()
Definition: Location.cpp:23
double getLatitude()
Definition: Location.cpp:51
bool isValid()
Definition: Location.cpp:47

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0