|
|
|
@ -285,23 +285,20 @@ void QGCJSBSimLink::readBytes()
@@ -285,23 +285,20 @@ void QGCJSBSimLink::readBytes()
|
|
|
|
|
if (s > maxLength) std::cerr << __FILE__ << __LINE__ << " UDP datagram overflow, allowed to read less bytes than datagram size" << std::endl; |
|
|
|
|
socket->readDatagram(data, maxLength, &sender, &senderPort); |
|
|
|
|
|
|
|
|
|
QByteArray b(data, s); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
// Print string
|
|
|
|
|
// QString state(b);
|
|
|
|
|
|
|
|
|
|
// // Parse string
|
|
|
|
|
// float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed;
|
|
|
|
|
// double lat, lon, alt;
|
|
|
|
|
// double vx, vy, vz, xacc, yacc, zacc;
|
|
|
|
|
|
|
|
|
|
// // Send updated state
|
|
|
|
|
// emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed,
|
|
|
|
|
// pitchspeed, yawspeed, lat, lon, alt,
|
|
|
|
|
// vx, vy, vz, xacc, yacc, zacc);
|
|
|
|
|
|
|
|
|
|
QByteArray b(data, s); |
|
|
|
|
QString state(b); |
|
|
|
|
|
|
|
|
|
// Parse string
|
|
|
|
|
float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed; |
|
|
|
|
double lat, lon, alt; |
|
|
|
|
double vx, vy, vz, xacc, yacc, zacc; |
|
|
|
|
|
|
|
|
|
// Send updated state
|
|
|
|
|
emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed, |
|
|
|
|
pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc); |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
// Echo data for debugging purposes
|
|
|
|
|
std::cerr << __FILE__ << __LINE__ << "Received datagram:" << std::endl; |
|
|
|
|