diff --git a/src/comm/MAVLinkSimulationLink.h b/src/comm/MAVLinkSimulationLink.h index 912c520..37db4f4 100644 --- a/src/comm/MAVLinkSimulationLink.h +++ b/src/comm/MAVLinkSimulationLink.h @@ -123,9 +123,10 @@ protected: void enqueue(uint8_t* stream, uint8_t* index, mavlink_message_t* msg); - static const uint8_t systemId = 220; + static const int8_t systemId = 220; static const uint8_t componentId = 200; static const uint16_t version = 1000; + static const unsigned int barometerOffsetkPa = 2; signals: void valueChanged(int uasId, QString curve, double value, quint64 usec); diff --git a/src/comm/QGCXPlaneLink.cc b/src/comm/QGCXPlaneLink.cc index 4459e72..47da6d9 100644 --- a/src/comm/QGCXPlaneLink.cc +++ b/src/comm/QGCXPlaneLink.cc @@ -667,8 +667,8 @@ void QGCXPlaneLink::readBytes() /* current pressure at MSL in kPa */ double p1 = 1013.25 / 10.0; - /* measured pressure in hPa */ - double p = abs_pressure / 10.0; + /* measured pressure in hPa, plus offset to simulate weather effects / offsets */ + double p = abs_pressure / 10.0 + barometerOffsetkPa; /* * Solve: