libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout
include
osmscout
navigation
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
24
#include <
osmscout/navigation/Engine.h
>
25
#include <
osmscout/navigation/Agents.h
>
26
#include <
osmscout/navigation/PositionAgent.h
>
27
28
namespace
osmscout
{
29
30
struct
OSMSCOUT_API
BearingChangedMessage
CLASS_FINAL
:
public
NavigationMessage
31
{
32
const
Bearing bearing;
33
34
BearingChangedMessage
(
const
Timestamp
&
timestamp
,
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
Agents.h
OSMSCOUT_API
#define OSMSCOUT_API
Definition
CoreImportExport.h:45
Engine.h
PositionAgent.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::BearingAgent
BearingAgent()=default
osmscout::CLASS_FINAL::Process
std::list< NavigationMessageRef > Process(const NavigationMessageRef &message) override
osmscout::CLASS_FINAL::message
std::vector< VoiceSample > message
Definition
VoiceInstructionAgent.h:99
osmscout::CLASS_FINAL::BearingChangedMessage
BearingChangedMessage(const Timestamp ×tamp, const Bearing &bearing)
osmscout::NavigationAgent
Definition
Engine.h:79
osmscout
Definition
Area.h:39
osmscout::Timestamp
std::chrono::system_clock::time_point Timestamp
Definition
Time.h:27
osmscout::NavigationMessageRef
std::shared_ptr< NavigationMessage > NavigationMessageRef
Definition
Engine.h:56
osmscout::NavigationMessage
Definition
Engine.h:49
osmscout::NavigationMessage::timestamp
const Timestamp timestamp
Definition
Engine.h:50
Generated by
1.17.0