sensorGloPosInt.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * @Brief     Storage GPS data and provide setter and getter methods
00003  * @Version   0.3.0
00004  * @Author    Chris Liu
00005  * @Created   2015/11/20
00006  * @Modified  2015/12/25
00007  *****************************************************************************/
00008 
00009 #ifndef _DJI2MAV_SENSORGLOPOSINT_H_
00010 #define _DJI2MAV_SENSORGLOPOSINT_H_
00011 
00012 
00013 namespace dji2mav {
00014 
00015     class SensorGloPosInt {
00016         public:
00017             SensorGloPosInt() {
00018             }
00019 
00020 
00021             ~SensorGloPosInt() {
00022             }
00023 
00024 
00025             inline mavlink_global_position_int_t* getDataPtr() {
00026                 return &m_data;
00027             }
00028 
00029 
00030             inline void setTimeBootMs(const int32_t* ts) {
00031                 m_data.time_boot_ms = *ts;
00032             }
00033 
00034 
00035             inline void setLat(const double* lat) {
00036                 m_data.lat = (int) (*lat * 1e7);
00037             }
00038 
00039 
00040             inline void setLat(const int32_t* lat) {
00041                 m_data.lat = *lat;
00042             }
00043 
00044 
00045             inline void setLon(const double* lon) {
00046                 m_data.lon = (int) (*lon * 1e7);
00047             }
00048 
00049 
00050             inline void setLon(const int32_t* lon) {
00051                 m_data.lon = *lon;
00052             }
00053 
00054 
00055             inline void setAlt(const float* alt) {
00056                 m_data.alt = (int) (*alt * 1e7);
00057             }
00058 
00059 
00060             inline void setAlt(const int32_t* alt) {
00061                 m_data.alt = *alt;
00062             }
00063 
00064 
00065             inline void setRelativeAlt(const float* relativeAlt) {
00066                 m_data.relative_alt = (int) (*relativeAlt * 1e7);
00067             }
00068 
00069 
00070             inline void setRelativeAlt(const int32_t* relativeAlt) {
00071                 m_data.relative_alt = *relativeAlt;
00072             }
00073 
00074 
00075             inline void setVx(const float* vx) {
00076                 m_data.vx = *vx;
00077             }
00078 
00079 
00080             inline void setVy(const float* vy) {
00081                 m_data.vy = *vy;
00082             }
00083 
00084 
00085             inline void setVz(const float* vz) {
00086                 m_data.vz = *vz;
00087             }
00088 
00089 
00090         private:
00091             mavlink_global_position_int_t m_data;
00092 
00093 
00094     };
00095 
00096 } //namespace dji2mav
00097 
00098 
00099 #endif


dji_sdk_dji2mav
Author(s):
autogenerated on Thu Jun 6 2019 17:55:35