/** \file
 *
 *  Contains the SimAhrsStruct class declaration.
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef SIMAHRSSTRUCT_H_
#define SIMAHRSSTRUCT_H_

#include "data/Point3D.h"

/**
 *  A struct of values that is passed from the Simulator to the LRAUV,
 *  with the results from one AHRS simulation timestep.
 *
 *  \ingroup modules_simulator
 */
struct SimAhrsStruct
{
    /// Roll angle in unit RADIAN, Earth referenced (NED; positive starboard)
    double roll;

    /// Pitch angle in unit RADIAN, Earth referenced (NED; positive up)
    double pitch;

    /// Yaw angle in unit RADIAN, Earth referenced (NED)
    double yaw;

    /// Body-fixed frame linear accelerations along FSK in units METER_PER_SECOND_SQUARED
    /// U: surge
    /// V: sway
    /// W: heave
    Point3D linearAcceleration;

    /// Body-fixed frame angular velocities along FSK in units RADIAN_PER_SECOND
    /// P: roll-rate
    /// Q: pitch-rate
    /// R: yaw-rate
    Point3D angularVelocity;

    /// Body-fixed frame magnetic field along FSK in MILLIGAUSS units
    /// X: forward
    /// Y: starboard
    /// Z: keelward
    Point3D magneticField;

    /// Constructor
    SimAhrsStruct()
        : roll( nanf( "" ) ),
          pitch( nanf( "" ) ),
          yaw( nanf( "" ) ),
          linearAcceleration(),
          angularVelocity(),
          magneticField()
    {}
};

#endif /* SIMAHRSSTRUCT_H_ */
