source: flair-dev/trunk/include/FlairCore/GeoCoordinate.h@ 12

Last change on this file since 12 was 2, checked in by Sanahuja Guillaume, 9 years ago

initial commit flaircore

File size: 3.1 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/*!
6 * \file GeoCoordinate.h
7 * \brief Class defining a point by its lla coordinates
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/07/29
10 * \version 4.0
11 */
12#ifndef GEOCOORDINATE_H
13#define GEOCOORDINATE_H
14
15#include <io_data.h>
16
17namespace flair { namespace core {
18
19 /*! \class GeoCoordinate
20 *
21 * \brief Class defining a point by its lla coordinates
22 */
23 class GeoCoordinate: public io_data {
24 public:
25 class Type: public DataType {
26 public:
27 size_t GetSize() const {
28 return sizeof(latitude)+sizeof(longitude)+sizeof(altitude);
29 }
30 std::string GetDescription() const {return "lla";}
31 };
32
33 /*!
34 * \brief Constructor
35 *
36 * Construct GeoCoordinate using values from another class.
37 *
38 * \param parent parent
39 * \param name name
40 * \param point class to copy
41 * \param n number of samples
42 */
43 GeoCoordinate(const Object* parent,std::string name,const GeoCoordinate *point,int n=1);
44
45 /*!
46 * \brief Constructor
47 *
48 * Construct GeoCoordinate using specified values.
49 *
50 * \param parent parent
51 * \param name name
52 * \param latitude latitude
53 * \param longitude longitude
54 * \param altitude altitude
55 * \param n number of samples
56 */
57 GeoCoordinate(const Object* parent,std::string name,double latitude,double longitude,double altitude,int n=1);
58
59 /*!
60 * \brief Destructor
61 *
62 */
63 ~GeoCoordinate();
64
65 /*!
66 * \brief Copy
67 *
68 * \param point class to copy
69 */
70 void CopyFrom(const GeoCoordinate *point);
71
72 /*!
73 * \brief Set coordinates
74 *
75 * \param latitude latitude
76 * \param longitude longitude
77 * \param altitude altitude
78 */
79 void SetCoordinates(double latitude,double longitude,double altitude);
80
81 /*!
82 * \brief Get coordinates
83 *
84 * \param latitude latitude
85 * \param longitude longitude
86 * \param altitude altitude
87 */
88 void GetCoordinates(double *latitude,double *longitude,double *altitude) const;
89
90 Type const &GetDataType() const {return dataType;}
91 private:
92 /*!
93 * \brief Copy datas
94 *
95 * Reimplemented from io_data. \n
96 * See io_data::CopyDatas.
97 *
98 * \param dst destination buffer
99 */
100 void CopyDatas(char* ptr) const;
101
102 double latitude;
103 double longitude;
104 double altitude;
105 Type dataType;
106 };
107
108} // end namespace core
109} // end namespace flair
110
111#endif // GEOCOORDINATE_H
Note: See TracBrowser for help on using the repository browser.