Changeset 30 in flair-dev for trunk/include/FlairCore
- Timestamp:
- Jul 29, 2016, 3:20:18 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairCore/GpsData.h
r27 r30 14 14 15 15 #include <io_data.h> 16 #include <IODataElement.h>17 #include <Vector3D.h>18 16 19 17 namespace flair { 20 18 namespace core { 19 20 class IODataElement; 21 class Vector3D; 21 22 22 23 /*! \class GpsData … … 35 36 std::string GetDescription() const { return "gps data"; } 36 37 size_t GetSize() const { 37 return 0; 38 size_t size = 0; 39 size += 2*doubleType.GetSize(); // Latitude, Longitude 40 size += floatType.GetSize(); // Altitude 41 size += UInt8Type.GetSize(); // NumberOfSatellites 42 size += UInt8Type.GetSize(); // FixQuality_t 43 size += 5*floatType.GetSize();//e,n,u,ve,vn 44 return size; 38 45 } 39 46 … … 46 53 */ 47 54 typedef enum { 48 55 Latitude /*! latitude in degrees */, 56 Longitude /*! longitude in degrees */, 57 Altitude /*! altitude */, 58 NumberOfSatellites /*! number of satellites */, 59 FixQuality /*! fix quality */, 60 East /*! east */, 61 North /*! north */, 62 Up /*! up */, 63 EastVelocity /*! east velocity*/, 64 NorthVelocity /*! north velocity*/, 49 65 } PlotableData_t; 66 67 /*! 68 \enum FixQuality_t 69 \brief Fix qualty indicators 70 */ 71 enum class FixQuality_t : uint8_t { 72 Invalid = 0, /*!< invalid */ 73 Gps = 1, /*!< Gps */ 74 DGps = 2, /*!< Differential Gps */ 75 Pps = 3, /*!< Pps */ 76 Rtk = 4, /*!< RTK */ 77 RtkFloat = 5, /*!< RTK float */ 78 Estimated = 6, /*!< Estimated */ 79 Manual = 7, /*!< Manual */ 80 Simulation = 8, /*!< Simulation */ 81 }; 50 82 51 83 /*! … … 77 109 IODataElement *Element(PlotableData_t data_type) const; 78 110 111 /*! 112 * \brief Get latitude, longitude and altitude 113 * 114 * This method is mutex protected. 115 * 116 * \param latitude latitude 117 * \param longitude longitude 118 * \param altitude altitude 119 * 120 */ 121 void GetLla(double &latitude, double &longitude, 122 float &altitude) const; 123 124 /*! 125 * \brief Set latitude, longitude and altitude 126 * 127 * This method is mutex protected. 128 * 129 * \param latitude latitude 130 * \param longitude longitude 131 * \param altitude altitude 132 * 133 */ 134 void SetLla(double latitude,double longitude, 135 float altitude); 136 137 138 /*! 139 * \brief Get east, north and up 140 * 141 * This method is mutex protected. 142 * 143 * \param east east 144 * \param north north 145 * \param up up 146 * 147 */ 148 void GetEnu(float &east, float &north, 149 float &up) const; 150 151 /*! 152 * \brief Set east, north and up 153 * 154 * This method is mutex protected. 155 * 156 * \param east east 157 * \param north north 158 * \param up up 159 * 160 */ 161 void SetEnu(float east, float north, 162 float up); 163 164 /*! 165 * \brief Get east and north velocities 166 * 167 * This method is mutex protected. 168 * 169 * \param eastVelocity east velocity 170 * \param northVelocity north velocity 171 * 172 */ 173 void GetVelocity(float &eastVelocity, float &northVelocity) const; 174 175 /*! 176 * \brief Set east and north velocities 177 * 178 * This method is mutex protected. 179 * 180 * \param eastVelocity east velocity 181 * \param northVelocity north velocity 182 * 183 */ 184 void SetVelocity(float eastVelocity, float northVelocity); 185 186 /*! 187 * \brief Get number of satellites 188 * 189 * \return number of satellites 190 * 191 */ 192 uint8_t GetNumberOfSatellites(void) const; 193 194 /*! 195 * \brief Set number of satellites 196 * 197 * \param numberOfSatellites number of satellites 198 * 199 */ 200 void SetNumberOfSatellites(uint8_t numberOfSatellites); 201 202 /*! 203 * \brief Get fix quality 204 * 205 * \return fix quality 206 * 207 */ 208 FixQuality_t GetFixQuality(void) const; 209 210 /*! 211 * \brief Set fix quality 212 * 213 * \param fixQuality fix quality 214 * 215 */ 216 void SetFixQuality(FixQuality_t fixQuality); 79 217 80 218 Type const &GetDataType() const { return dataType; } … … 91 229 void CopyDatas(char *dst) const; 92 230 93 94 95 231 void Queue(char **dst, const void *src, size_t size) const; 96 232 Type dataType; 233 double latitude,longitude; 234 float altitude; 235 uint8_t numberOfSatellites; 236 FixQuality_t fixQuality; 237 float east,north,up,eastVelocity,northVelocity; 97 238 }; 98 239
Note:
See TracChangeset
for help on using the changeset viewer.