src/orientation_sensor.cpp
void AttitudeValues::Update() {
  //check whether magnetic calibration has been requested to be saved
  if( 1 == save_mag_cal_ ) {
    orientation_sensor_->sensor_interface_->InjectCommand("SVMC");
    save_mag_cal_ = 0;  // set flag back to zero so we don't repeat save
  }
  attitude_.is_data_valid =
      orientation_sensor_->sensor_interface_->IsDataValid();
  attitude_.yaw = orientation_sensor_->sensor_interface_->GetHeadingRadians();
  attitude_.roll =
      orientation_sensor_->sensor_interface_->GetRollRadians();
  attitude_.pitch =
      orientation_sensor_->sensor_interface_->GetPitchRadians();

  output = attitude_;
  notify();
}
/**
 * @brief Provides one Attitude reading from the orientation sensor.
 *
 * Readings are obtained using the sensor fusion library's Get_() methods
 * and assigned to the output variable that passes data from Producers
 * to Consumers. Consumers of the attitude data are then informed
 * by the call to notify(). If data are not valid (e.g. sensor not
 * functioning), a struct member is set to false so when the Signal K
 * message contents are assembled by as_signalk(),they can reflect that. 
 */
@brief Provides one Attitude reading from the orientation sensor.
Readings are obtained using the sensor fusion library's Get_() methods
and assigned to the output variable that passes data from Producers
to Consumers. Consumers of the attitude data are then informed
by the call to notify(). If data are not valid , a struct member is set to false so when the Signal K
message contents are assembled by as_signalk(),they can reflect that.
@brief Provides one Attitude reading from the orientation sensor . Readings are obtained using the sensor fusion library ' s Get_ () methods and assigned to the output variable that passes data from Producers to Consumers . Consumers of the attitude data are then informed by the call to notify () . If data are not valid a struct member is set to false so when the Signal K message contents are assembled by as_signalk () they can reflect that .
void AttitudeValues::Update() {
  if( 1 == save_mag_cal_ ) {
    orientation_sensor_->sensor_interface_->InjectCommand("SVMC");
    save_mag_cal_ = 0;  
  }
  attitude_.is_data_valid =
      orientation_sensor_->sensor_interface_->IsDataValid();
  attitude_.yaw = orientation_sensor_->sensor_interface_->GetHeadingRadians();
  attitude_.roll =
      orientation_sensor_->sensor_interface_->GetRollRadians();
  attitude_.pitch =
      orientation_sensor_->sensor_interface_->GetPitchRadians();
  output = attitude_;
  notify();
}
void AttitudeValues :: Update ( ) { if ( 1 == save_mag_cal_ ) { orientation_sensor_ -> sensor_interface_ -> InjectCommand ( " " ) ; save_mag_cal_ = 0 ; } attitude_ . is_data_valid = orientation_sensor_ -> sensor_interface_ -> IsDataValid ( ) ; attitude_ . yaw = orientation_sensor_ -> sensor_interface_ -> GetHeadingRadians ( ) ; attitude_ . roll = orientation_sensor_ -> sensor_interface_ -> GetRollRadians ( ) ; attitude_ . pitch = orientation_sensor_ -> sensor_interface_ -> GetPitchRadians ( ) ; output = attitude_ ; notify ( ) ; }
@brief Provides one Attitude reading from the orientation sensor.
@brief Provides one Attitude reading from the orientation sensor .
//check whether magnetic calibration has been requested to be saved // set flag back to zero so we don't repeat save