libosmscout 1.1.1
Loading...
Searching...
No Matches
BearingAgent.h
Go to the documentation of this file.
1#ifndef OSMSCOUT_NAVIGATION_BEARING_AGENT_H
2#define OSMSCOUT_NAVIGATION_BEARING_AGENT_H
3
4/*
5 This source is part of the libosmscout library
6 Copyright (C) 2018 Tim Teulings
7 Copyright (C) 2019 Lukas Karas
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
27
28namespace osmscout {
29
30 struct OSMSCOUT_API BearingChangedMessage CLASS_FINAL : public NavigationMessage
31 {
32 const Bearing bearing;
33
35 const Bearing &bearing);
36 };
37
38 class OSMSCOUT_API BearingAgent CLASS_FINAL : public NavigationAgent
39 {
40 private:
41 GeoCoord previousPoint;
42 Bearing previousBearing;
43 bool previousPointValid{false};
44 Timestamp lastUpdate;
45
46 public:
47 explicit BearingAgent() = default;
48 std::list<NavigationMessageRef> Process(const NavigationMessageRef& message) override;
49 };
50}
51
52#endif //OSMSCOUT_NAVIGATION_BEARING_AGENT_H
#define OSMSCOUT_API
Definition CoreImportExport.h:45
Definition Area.h:88
std::list< NavigationMessageRef > Process(const NavigationMessageRef &message) override
std::vector< VoiceSample > message
Definition VoiceInstructionAgent.h:99
BearingChangedMessage(const Timestamp &timestamp, const Bearing &bearing)
Definition Engine.h:79
Definition Area.h:39
std::chrono::system_clock::time_point Timestamp
Definition Time.h:27
std::shared_ptr< NavigationMessage > NavigationMessageRef
Definition Engine.h:56
Definition Engine.h:49
const Timestamp timestamp
Definition Engine.h:50