Browse Source

Added 2 kPA offset to pressure measurements to get HIL closer to real conditions

QGC4.4
Lorenz Meier 11 years ago
parent
commit
f48b6c3bf8
  1. 3
      src/comm/MAVLinkSimulationLink.h
  2. 4
      src/comm/QGCXPlaneLink.cc

3
src/comm/MAVLinkSimulationLink.h

@ -123,9 +123,10 @@ protected:
void enqueue(uint8_t* stream, uint8_t* index, mavlink_message_t* msg); 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 uint8_t componentId = 200;
static const uint16_t version = 1000; static const uint16_t version = 1000;
static const unsigned int barometerOffsetkPa = 2;
signals: signals:
void valueChanged(int uasId, QString curve, double value, quint64 usec); void valueChanged(int uasId, QString curve, double value, quint64 usec);

4
src/comm/QGCXPlaneLink.cc

@ -667,8 +667,8 @@ void QGCXPlaneLink::readBytes()
/* current pressure at MSL in kPa */ /* current pressure at MSL in kPa */
double p1 = 1013.25 / 10.0; double p1 = 1013.25 / 10.0;
/* measured pressure in hPa */ /* measured pressure in hPa, plus offset to simulate weather effects / offsets */
double p = abs_pressure / 10.0; double p = abs_pressure / 10.0 + barometerOffsetkPa;
/* /*
* Solve: * Solve:

Loading…
Cancel
Save