Flair
Framework Libre Air
GeoCoordinate.h
Go to the documentation of this file.
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}
12 #ifndef GEOCOORDINATE_H
13 #define GEOCOORDINATE_H
14 
15 #include <io_data.h>
16 
17 namespace flair {
18 namespace core {
19 
24 class GeoCoordinate : public io_data {
25 public:
26  class Type : public DataType {
27  public:
28  size_t GetSize() const {
29  return sizeof(latitude) + sizeof(longitude) + sizeof(altitude);
30  }
31  std::string GetDescription() const { return "lla"; }
32  };
33 
44  GeoCoordinate(const Object *parent, std::string name,
45  const GeoCoordinate *point, int n = 1);
46 
59  GeoCoordinate(const Object *parent, std::string name, double latitude,
60  double longitude, double altitude, int n = 1);
61 
67 
73  void CopyFrom(const GeoCoordinate *point);
74 
82  void SetCoordinates(double latitude, double longitude, double altitude);
83 
91  void GetCoordinates(double *latitude, double *longitude,
92  double *altitude) const;
93 
94  Type const &GetDataType() const { return dataType; }
95 
96 private:
105  void RawRead(char *ptr) const;
106 
107  double latitude;
108  double longitude;
109  double altitude;
110  Type dataType;
111 };
112 
113 } // end namespace core
114 } // end namespace flair
115 
116 #endif // GEOCOORDINATE_H
Abstract class for data types.
Definition: io_data.h:94
Definition: GeoCoordinate.h:26
Definition: io_data.h:26
Base class for all Framework's classes.
Definition: Object.h:83
namespace of the flair Framework
Definition: Ahrs.h:19
void SetCoordinates(double latitude, double longitude, double altitude)
Set coordinates.
Abstract class for data types.
~GeoCoordinate()
Destructor.
void CopyFrom(const GeoCoordinate *point)
Copy.
Class defining a point by its lla coordinates.
Definition: GeoCoordinate.h:24
void GetCoordinates(double *latitude, double *longitude, double *altitude) const
Get coordinates.
GeoCoordinate(const Object *parent, std::string name, const GeoCoordinate *point, int n=1)
Constructor.