Last change
on this file since 9 was 3, checked in by Sanahuja Guillaume, 9 years ago |
sensoractuator
|
File size:
1.2 KB
|
Line | |
---|
1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | // created: 2014/05/26
|
---|
6 | // filename: SimuGps.cpp
|
---|
7 | //
|
---|
8 | // author: Guillaume Sanahuja
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Class for a simulation GPS
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #include "SimuGps.h"
|
---|
19 | #include <FrameworkManager.h>
|
---|
20 | #include <string.h>
|
---|
21 | #include <GeoCoordinate.h>
|
---|
22 |
|
---|
23 | using std::string;
|
---|
24 | using namespace flair::core;
|
---|
25 |
|
---|
26 | namespace flair
|
---|
27 | {
|
---|
28 | namespace sensor
|
---|
29 | {
|
---|
30 |
|
---|
31 | SimuGps::SimuGps(const FrameworkManager* parent,string name,Gps::NMEAFlags_t NMEAFlags,uint8_t priority) : Thread(parent,name,priority), Gps(parent,name,NMEAFlags)
|
---|
32 | {
|
---|
33 | }
|
---|
34 |
|
---|
35 | SimuGps::~SimuGps()
|
---|
36 | {
|
---|
37 | SafeStop();
|
---|
38 | Join();
|
---|
39 | }
|
---|
40 |
|
---|
41 | void SimuGps::Run(void)
|
---|
42 | {
|
---|
43 | char response[200] = {0};
|
---|
44 | int size,result;
|
---|
45 | //double lat=0;
|
---|
46 | SetPeriodMS(500);
|
---|
47 | WarnUponSwitches(true);
|
---|
48 |
|
---|
49 | while(!ToBeStopped())
|
---|
50 | {
|
---|
51 | WaitPeriod();
|
---|
52 | position->SetCoordinates(49.402313, 2.795463,0);
|
---|
53 | // lat+=.5;
|
---|
54 | }
|
---|
55 |
|
---|
56 |
|
---|
57 | WarnUponSwitches(false);
|
---|
58 | }
|
---|
59 |
|
---|
60 |
|
---|
61 | } // end namespace sensor
|
---|
62 | } // end namespace framewor
|
---|
Note:
See
TracBrowser
for help on using the repository browser.