|
@@ -47,6 +47,7 @@ extern "C" {
|
|
|
#define RT_SENSOR_CLASS_FORCE (13) /* Force sensor */
|
|
|
#define RT_SENSOR_CLASS_DUST (14) /* Dust sensor */
|
|
|
#define RT_SENSOR_CLASS_ECO2 (15) /* eCO2 sensor */
|
|
|
+#define RT_SENSOR_CLASS_GNSS (16) /* GPS/GNSS sensor */
|
|
|
|
|
|
/* Sensor vendor types */
|
|
|
|
|
@@ -84,6 +85,8 @@ extern "C" {
|
|
|
#define RT_SENSOR_UNIT_MN (13) /* Force unit: mN */
|
|
|
#define RT_SENSOR_UNIT_PPM (14) /* Concentration unit: ppm */
|
|
|
#define RT_SENSOR_UNIT_PPB (15) /* Concentration unit: ppb */
|
|
|
+#define RT_SENSOR_UNIT_DMS (16) /* Coordinates unit: DMS */
|
|
|
+#define RT_SENSOR_UNIT_DD (17) /* Coordinates unit: DD */
|
|
|
|
|
|
/* Sensor communication interface types */
|
|
|
|
|
@@ -184,6 +187,12 @@ struct sensor_3_axis
|
|
|
rt_int32_t z;
|
|
|
};
|
|
|
|
|
|
+struct coordinates
|
|
|
+{
|
|
|
+ double longitude;
|
|
|
+ double latitude;
|
|
|
+};
|
|
|
+
|
|
|
struct rt_sensor_data
|
|
|
{
|
|
|
rt_uint32_t timestamp; /* The timestamp when the data was received */
|
|
@@ -193,6 +202,7 @@ struct rt_sensor_data
|
|
|
struct sensor_3_axis acce; /* Accelerometer. unit: mG */
|
|
|
struct sensor_3_axis gyro; /* Gyroscope. unit: mdps */
|
|
|
struct sensor_3_axis mag; /* Magnetometer. unit: mGauss */
|
|
|
+ struct coordinates coord; /* Coordinates unit: degrees */
|
|
|
rt_int32_t temp; /* Temperature. unit: dCelsius */
|
|
|
rt_int32_t humi; /* Relative humidity. unit: permillage */
|
|
|
rt_int32_t baro; /* Pressure. unit: pascal (Pa) */
|