1 #include "../BlockLocalPositionEstimator.hpp" 22 eph > _param_lpe_eph_max.get() ||
23 epv > _param_lpe_epv_max.get() ||
61 double gpsLatOrigin = 0;
62 double gpsLonOrigin = 0;
82 PX4_INFO(
"[lpe] gps init " 83 "lat %6.2f lon %6.2f alt %5.1f m",
116 double lat = y_global(
Y_gps_x);
117 double lon = y_global(
Y_gps_y);
147 float var_xy = _param_lpe_gps_xy.get() * _param_lpe_gps_xy.get();
148 float var_z = _param_lpe_gps_z.get() * _param_lpe_gps_z.get();
149 float var_vxy = _param_lpe_gps_vxy.get() * _param_lpe_gps_vxy.get();
150 float var_vz = _param_lpe_gps_vz.get() * _param_lpe_gps_vz.get();
163 if (gps_s_stddev > _param_lpe_gps_vxy.get()) {
164 var_vxy = gps_s_stddev * gps_s_stddev;
167 if (gps_s_stddev > _param_lpe_gps_vz.get()) {
168 var_vz = gps_s_stddev * gps_s_stddev;
181 if (
getDelayPeriods(_param_lpe_gps_delay.get(), &i_hist) < 0) {
return; }
192 for (
size_t i = 0; i < 6; i++) {
201 float beta = (r.
transpose() * (S_I * r))(0, 0);
204 float beta_thresh = 1e2f;
209 double(r(0) * r(0) / S_I(0, 0)),
double(r(1) * r(1) / S_I(1, 1)),
double(r(2) * r(2) / S_I(2, 2)),
210 double(r(3) * r(3) / S_I(3, 3)),
double(r(4) * r(4) / S_I(4, 4)),
double(r(5) * r(5) / S_I(5, 5)));
#define mavlink_log_critical(_pub, _text,...)
Send a mavlink critical message and print to console.
static const float BETA_TABLE[7]
static const uint32_t REQ_GPS_INIT_COUNT
matrix::Vector< Type, M > getMean()
int getDelayPeriods(float delay, uint8_t *periods)
int gpsMeasure(Vector< double, n_y_gps > &y)
static const uint32_t GPS_TIMEOUT
BlockStats< double, n_y_gps > _gpsStats
Matrix< Type, N, M > transpose() const
#define mavlink_and_console_log_info(_pub, _text,...)
Send a mavlink emergency message and print to console.
struct map_projection_reference_s _map_ref
orb_advert_t mavlink_log_pub
uORB::SubscriptionData< vehicle_gps_position_s > _sub_gps
int map_projection_reproject(const struct map_projection_reference_s *ref, float x, float y, double *lat, double *lon)
Transforms a point in the local azimuthal equidistant plane to the geographic coordinate system using...
float vel_pos_innov_var[6]
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
Matrix< float, n_x, n_x > m_P
int map_projection_project(const struct map_projection_reference_s *ref, double lat, double lon, float *x, float *y)
matrix::Matrix< Type, M, N > get(size_t delay)
BlockDelay< float, n_x, 1, HIST_LEN > _xDelay
bool _altOriginInitialized
int map_projection_init(struct map_projection_reference_s *ref, double lat_0, double lon_0)
Initializes the map transformation given by the argument and sets the timestamp to now...
uORB::PublicationData< ekf2_innovations_s > _pub_innov
void update(const matrix::Vector< Type, M > &u)