third_party/phoenixsuite/cpp/src/Sensors/PigeonIMU.cpp
/**
 * Get the current Fusion Status (including fused heading)
 *
 * @param status 	object reference to fill with fusion status flags.
 *					Caller may pass null if flags are not needed.
 * @return The fused heading in degrees.
 */
Get the current Fusion Status (including fused heading)
@param status        object reference to fill with fusion status flags.
Caller may pass null if flags are not needed.
@return The fused heading in degrees.
Get the current Fusion Status ( including fused heading ) @param status object reference to fill with fusion status flags . Caller may pass null if flags are not needed . @return The fused heading in degrees .
double PigeonIMU::GetFusedHeading(FusionStatus & status) {
	int bIsFusing, bIsValid;
	double fusedHeading;
	int lastError;
	int errCode = c_PigeonIMU_GetFusedHeading2(_handle, &bIsFusing, &bIsValid,
			&fusedHeading, &lastError);
	std::string description;
	if (errCode != 0) {
		bIsFusing = false;
		bIsValid = false;
		description =
				"Could not receive status frame.  Check wiring and web-config.";
	} else {
		if (bIsValid == false) {
			description = "Fused Heading is not valid.";
		} else if (bIsFusing == false) {
			description = "Fused Heading is valid.";
		} else {
			description = "Fused Heading is valid and is fusing compass.";
		}
	}
	status.heading = fusedHeading;
	status.bIsFusing = (bool) bIsFusing;
	status.bIsValid = (bool) bIsValid;
	status.description = description;
	status.lastError = errCode;
	return fusedHeading;
}
double PigeonIMU :: GetFusedHeading ( FusionStatus & status ) { int bIsFusing , bIsValid ; double fusedHeading ; int lastError ; int errCode = c_PigeonIMU_GetFusedHeading2 ( _handle , & bIsFusing , & bIsValid , & fusedHeading , & lastError ) ; std :: string description ; if ( errCode != 0 ) { bIsFusing = false ; bIsValid = false ; description = " " ; } else { if ( bIsValid == false ) { description = " " ; } else if ( bIsFusing == false ) { description = " " ; } else { description = " " ; } } status . heading = fusedHeading ; status . bIsFusing = ( bool ) bIsFusing ; status . bIsValid = ( bool ) bIsValid ; status . description = description ; status . lastError = errCode ; return fusedHeading ; }
Get the current Fusion Status (including fused heading)
 @param status        object reference to fill with fusion status flags.
Get the current Fusion Status ( including fused heading ) @param status object reference to fill with fusion status flags .
/* fill caller's struct */