Commit d22c4e0f authored by Pierre NARVOR's avatar Pierre NARVOR
Browse files

[driver/messages] Added subtype of Status message

parent d3509b52
......@@ -186,6 +186,35 @@ struct StatusRawAHRS {
// in degrees-per-second.
};
/**
* Compensated AHRS Sensor Data Fields
*
* If Status.contentType contains the AHRS_COMP_DATA bit (see STATUS_BITS_T),
* then the following fields are sequentially appended to the message record.
*
* Values are sampled internally by the AHRS at a rate of 50Hz.
*/
struct StatusCompensatedAHRS {
float ahrsCompAccX; // The AHRS_RAW_ACC_X sensor reading after the
//calibration coefficients have been applied.
float ahrsCompAccY; // The AHRS_RAW_ACC_Y sensor reading after the
// calibration coefficients have been applied.
float ahrsCompAccZ; // The AHRS_RAW_ACC_Z sensor reading after the
// calibration coefficients have been applied.
float ahrsCompMagX; // The AHRS_RAW_MAG_X sensor reading after the
// calibration coefficients have been applied.
float ahrsCompMagY; // The AHRS_RAW_MAG_Y sensor reading after the
// calibration coefficients have been applied.
float ahrsCompMagZ; // The AHRS_RAW_MAG_Z sensor reading after the
// calibration coefficients have been applied.
float ahrsCompGyroX; // The AHRS_RAW_GYRO_X sensor reading after the
// calibration coefficients have been applied.
float ahrsCompGyroY; // The AHRS_RAW_ GYRO _Y sensor reading after the
// calibration coefficients have been applied.
float ahrsCompGyroZ; // The AHRS_RAW_ GYRO _Z sensor reading after the
// calibration coefficients have been applied.
};
}; //namespace messages
}; //namespace seatrac
}; //namespace narval
......@@ -200,4 +229,88 @@ inline std::ostream& operator<<(std::ostream& os, const narval::seatrac::message
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusEnvironment& msg)
{
const char* prefix = "\n- ";
os << "Environment :"
<< prefix << "envSupply : " << msg.envSupply
<< prefix << "envTemp : " << msg.envTemp
<< prefix << "envPressure : " << msg.envPressure
<< prefix << "envDepth : " << msg.envDepth
<< prefix << "envVos : " << msg.envVos;
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusAttitude& msg)
{
const char* prefix = "\n- ";
os << "Attitude :"
<< prefix << "attYaw : " << msg.attYaw
<< prefix << "attPitch : " << msg.attPitch
<< prefix << "attRoll : " << msg.attRoll;
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusMagCalibration& msg)
{
const char* prefix = "\n- ";
os << "MagCalibration :"
<< prefix << "magCalBuf : " << msg.magCalBuf
<< prefix << "magCalValid : " << msg.magCalValid
<< prefix << "magCalAge : " << msg.magCalAge
<< prefix << "magCalFit : " << msg.magCalFit;
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusAccCalibration& msg)
{
const char* prefix = "\n- ";
os << "AccCalibration :"
<< prefix << "accLimMinX : " << msg.accLimMinX
<< prefix << "accLimMinY : " << msg.accLimMinY
<< prefix << "accLimMinZ : " << msg.accLimMinZ
<< prefix << "accLimMaxX : " << msg.accLimMaxX
<< prefix << "accLimMaxY : " << msg.accLimMaxY
<< prefix << "accLimMaxZ : " << msg.accLimMaxZ;
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusRawAHRS& msg)
{
const char* prefix = "\n- ";
os << "RawAHRS :"
<< prefix << "ahrsRawAccX : " << msg.ahrsRawAccX
<< prefix << "ahrsRawAccY : " << msg.ahrsRawAccY
<< prefix << "ahrsRawAccZ : " << msg.ahrsRawAccZ
<< prefix << "ahrsRawMagX : " << msg.ahrsRawMagX
<< prefix << "ahrsRawMagY : " << msg.ahrsRawMagY
<< prefix << "ahrsRawMagZ : " << msg.ahrsRawMagZ
<< prefix << "ahrsRawGyroX : " << msg.ahrsRawGyroX
<< prefix << "ahrsRawGyroY : " << msg.ahrsRawGyroY
<< prefix << "ahrsRawGyroZ : " << msg.ahrsRawGyroZ;
return os;
}
inline std::ostream& operator<<(std::ostream& os,
const narval::seatrac::messages::StatusCompensatedAHRS& msg)
{
const char* prefix = "\n- ";
os << "CompensatedAHRS :"
<< prefix << "ahrsCompAccX : " << msg.ahrsCompAccX
<< prefix << "ahrsCompAccY : " << msg.ahrsCompAccY
<< prefix << "ahrsCompAccZ : " << msg.ahrsCompAccZ
<< prefix << "ahrsCompMagX : " << msg.ahrsCompMagX
<< prefix << "ahrsCompMagY : " << msg.ahrsCompMagY
<< prefix << "ahrsCompMagZ : " << msg.ahrsCompMagZ
<< prefix << "ahrsCompGyroX : " << msg.ahrsCompGyroX
<< prefix << "ahrsCompGyroY : " << msg.ahrsCompGyroY
<< prefix << "ahrsCompGyroZ : " << msg.ahrsCompGyroZ;
return os;
};
#endif //_DEF_SEATRAC_DRIVER_MESSAGES_STATUS_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment