|
|
|
@ -185,6 +185,10 @@ public:
@@ -185,6 +185,10 @@ public:
|
|
|
|
|
int32_t rtk_baseline_z_mm; ///< Current baseline in ECEF z or NED down component in mm
|
|
|
|
|
uint32_t rtk_accuracy; ///< Current estimate of 3D baseline accuracy (receiver dependent, typical 0 to 9999)
|
|
|
|
|
int32_t rtk_iar_num_hypotheses; ///< Current number of integer ambiguity hypotheses
|
|
|
|
|
|
|
|
|
|
float heading; //RTKGPS heading
|
|
|
|
|
float heading_offset; //RTKGPS heading_offset
|
|
|
|
|
uint32_t last_gps_fixed_time_ms; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/// Startup initialisation.
|
|
|
|
@ -476,6 +480,33 @@ public:
@@ -476,6 +480,33 @@ public:
|
|
|
|
|
return instance>=GPS_MAX_RECEIVERS? GPS_Type::GPS_TYPE_NONE : GPS_Type(_type[instance].get()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Brown
|
|
|
|
|
// GPS heading in degrees
|
|
|
|
|
float gps_heading(uint8_t instance) const { |
|
|
|
|
return (state[instance].heading > _heading_offset )?(state[instance].heading - _heading_offset):(state[instance].heading + 360.0 - _heading_offset ); |
|
|
|
|
// state[i].heading_offset = _heading_offset;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int32_t gps_heading() const { |
|
|
|
|
return gps_heading(primary_instance)*100; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//get gps fixed time
|
|
|
|
|
uint32_t gps_last_fixed_time(uint8_t instance) const { |
|
|
|
|
return state[instance].last_gps_fixed_time_ms; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint32_t gps_last_fixed_time() const { |
|
|
|
|
return gps_last_fixed_time(primary_instance); |
|
|
|
|
} |
|
|
|
|
uint8_t gps_heading_enable() const { |
|
|
|
|
return _heading_enable; |
|
|
|
|
} |
|
|
|
|
void set_gps_heading_enable(int8_t enable) { |
|
|
|
|
_heading_enable = enable; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
|
|
// configuration parameters
|
|
|
|
@ -500,7 +531,9 @@ protected:
@@ -500,7 +531,9 @@ protected:
|
|
|
|
|
AP_Int16 _driver_options; |
|
|
|
|
|
|
|
|
|
uint32_t _log_gps_bit = -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AP_Float _heading_offset; |
|
|
|
|
AP_Int8 _heading_enable; |
|
|
|
|
private: |
|
|
|
|
static AP_GPS *_singleton; |
|
|
|
|
HAL_Semaphore rsem; |
|
|
|
|