Changeset 180 in flair-src for trunk/lib/FlairCore
- Timestamp:
- May 31, 2017, 3:53:32 PM (7 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/GpsData.cpp
r51 r180 49 49 case GpsData::EastVelocity: 50 50 case GpsData::NorthVelocity: 51 case GpsData::Pdop: 52 case GpsData::Hdop: 53 case GpsData::Vdop: 51 54 size=4; 52 55 break; … … 62 65 void CopyData(char *dst) const { 63 66 double latitude,longitude; 64 float altitude,east,north,up,eastVelocity,northVelocity ;67 float altitude,east,north,up,eastVelocity,northVelocity,pDop,hDop,vDop; 65 68 66 69 gpsdata->GetLla(latitude,longitude,altitude); … … 69 72 gpsdata->GetEnu(east,north,up); 70 73 gpsdata->GetVelocity(eastVelocity,northVelocity); 74 gpsdata->GetDop(pDop,hDop,vDop); 71 75 72 76 switch (plotableData) { … … 100 104 case GpsData::NorthVelocity: 101 105 memcpy(dst, &northVelocity, sizeof(northVelocity)); 106 break; 107 case GpsData::Pdop: 108 memcpy(dst, &pDop, sizeof(pDop)); 109 break; 110 case GpsData::Hdop: 111 memcpy(dst, &hDop, sizeof(hDop)); 112 break; 113 case GpsData::Vdop: 114 memcpy(dst, &vDop, sizeof(vDop)); 102 115 break; 103 116 default: … … 119 132 case GpsData::EastVelocity: 120 133 case GpsData::NorthVelocity: 134 case GpsData::Pdop: 135 case GpsData::Hdop: 136 case GpsData::Vdop: 121 137 return floatType; 122 138 break; … … 150 166 AppendLogDescription("east velocity", floatType); 151 167 AppendLogDescription("north velocity", floatType); 168 AppendLogDescription("pdop", floatType); 169 AppendLogDescription("hdop", floatType); 170 AppendLogDescription("vdop", floatType); 152 171 153 172 numberOfSatellites=0; … … 220 239 } 221 240 241 void GpsData::GetDop(float &inPdop, float &inHdop,float &inVdop) const { 242 inPdop=pDop; 243 inHdop=hDop; 244 inVdop=vDop; 245 } 246 247 void GpsData::SetDop(float inPdop, float inHdop,float inVdop) { 248 pDop=inPdop; 249 hDop=inHdop; 250 vDop=inVdop; 251 } 252 222 253 IODataElement *GpsData::Element(PlotableData_t data_type) const { 223 254 string name; … … 252 283 case GpsData::NorthVelocity: 253 284 name = "NorthVelocity"; 285 break; 286 case GpsData::Pdop: 287 name = "Pdop"; 288 break; 289 case GpsData::Hdop: 290 name = "Hdop"; 291 break; 292 case GpsData::Vdop: 293 name = "Vdop"; 254 294 break; 255 295 } … … 271 311 Queue(&dst, &eastVelocity, sizeof(eastVelocity)); 272 312 Queue(&dst, &northVelocity, sizeof(northVelocity)); 313 Queue(&dst, &pDop, sizeof(pDop)); 314 Queue(&dst, &hDop, sizeof(hDop)); 315 Queue(&dst, &vDop, sizeof(vDop)); 273 316 274 317 ReleaseMutex(); -
trunk/lib/FlairCore/src/GpsData.h
r167 r180 41 41 size += UInt8Type.GetSize(); // FixQuality_t 42 42 size += 5*floatType.GetSize();//e,n,u,ve,vn 43 size += 3*floatType.GetSize();//pdop,hdop,vdop 43 44 return size; 44 45 } … … 62 63 EastVelocity /*! east velocity*/, 63 64 NorthVelocity /*! north velocity*/, 65 Pdop /* dilution of precision*/, 66 Hdop /* horizontal dilution of precision*/, 67 Vdop /* vertical dilution of precision*/, 64 68 } PlotableData_t; 65 69 … … 214 218 */ 215 219 void SetFixQuality(FixQuality_t fixQuality); 220 221 /*! 222 * \brief Get dilution of precision 223 * 224 * This method is mutex protected. 225 * 226 * \param pDop dilution of precision 227 * \param hDop horizontal dilution of precision 228 * \param vDop vertical dilution of precision 229 * 230 */ 231 void GetDop(float &pDop, float &hDop,float &vDop) const; 232 233 /*! 234 * \brief Set dilution of precision 235 * 236 * This method is mutex protected. 237 * 238 * \param pDop dilution of precision 239 * \param hDop horizontal dilution of precision 240 * \param vDop vertical dilution of precision 241 * 242 */ 243 void SetDop(float pDop, float hDop,float vDop); 216 244 217 245 Type const &GetDataType() const { return dataType; } … … 234 262 uint8_t numberOfSatellites; 235 263 FixQuality_t fixQuality; 236 float east,north,up,eastVelocity,northVelocity ;264 float east,north,up,eastVelocity,northVelocity,pDop,hDop,vDop; 237 265 }; 238 266
Note:
See TracChangeset
for help on using the changeset viewer.