#ifndef G346_A4A5_H_
#define G346_A4A5_H_

class Ads1553MsgQ;

#include "ads_data.h"

class InuTimetagCheck;

class GrifoMsg_A4A5
{
public:

  GrifoMsg_A4A5();

  static void a4_asynchronous_message_routine(Ads1553MsgQ* msg);
  static void a5_asynchronous_message_routine(Ads1553MsgQ* msg);

  void move_cursor(bool valid, int rate_x=0, int rate_y=0);
  void move_antenna_el(bool valid, double el);
  void set_antenna_el(bool valid, double el);
  void clear_antenna_slew();

public:
    void cursorToSpoi();

public:
  AdsLogicData a4_timetag;


  AdsLogicData a4_true_heading;
  AdsLogicData a4_magnetic_heading;

  AdsLogicData a4_crs_zero;
  AdsLogicData a4_crs_slave;
  AdsLogicData a4_crs_snowplough;

  AdsLogicData a4_crs_rate_valid;
  AdsLogicData a4_crs_rate_x;
  AdsLogicData a4_crs_rate_y;

  AdsLogicData a4_crs_azimuth;
  AdsLogicData a4_crs_range;

  AdsLogicData a4_ant_slew;
  AdsLogicData a4_az_demand;
  AdsLogicData a4_el_demand;

  AdsLogicData a4_x_acc;
  AdsLogicData a4_y_acc;
  AdsLogicData a4_z_acc;

  AdsLogicData a4_spoi_pos_valid;
  AdsLogicData a4_spoi_latitude;
  AdsLogicData a4_spoi_longitude;
  AdsLogicData a4_spoi_altitude_valid;
  AdsLogicData a4_spoi_altitude;

  AdsLogicData a4_ppos_timetag;
  AdsLogicData a4_ppos_valid;
  AdsLogicData a4_ppos_latitude;
  AdsLogicData a4_ppos_longitude;

  AdsLogicData a4_wind_direction;
  AdsLogicData a4_wind_speed;

  AdsLogicData a4_corrected_baro_altitude;
  AdsLogicData a4_radio_altimeter_altitude;
  AdsLogicData a4_baro_altitude;

  AdsLogicData a4_baro_altitude_invalid;
  AdsLogicData a4_radio_altimeter_invalid;
  AdsLogicData a4_corrected_baro_altitude_invalid;

  AdsLogicData a4_tas_invalid;
  AdsLogicData a4_cas_invalid;
  AdsLogicData a4_tas;
  AdsLogicData a4_cas;

  AdsLogicData a4_present_position_invalid;
  AdsLogicData a4_attitude_invalid;
  AdsLogicData a4_navigation_data_invalid;
  AdsLogicData a4_clearance_plane_dist;

  AdsLogicData a4_sar_enabled;
  AdsLogicData a4_norm_ghost_selection;
  AdsLogicData a4_dtt_enabled;

  AdsLogicData a5_timetag;
  AdsLogicData a5_ptaz_timetag;
  AdsLogicData a5_pitch_timetag;
  AdsLogicData a5_roll_timetag;

  AdsLogicData a5_ptaz;

  AdsLogicData a5_pitch;
  AdsLogicData a5_roll;

  AdsLogicData a5_pitch_rate;
  AdsLogicData a5_roll_rate;
  AdsLogicData a5_yaw_rate;

  AdsLogicData a5_pitch_ang_acc;
  AdsLogicData a5_roll_ang_acc;
  AdsLogicData a5_yaw_ang_acc;

  AdsLogicData a5_x_vel;
  AdsLogicData a5_y_vel;
  AdsLogicData a5_z_vel;

  AdsLogicData a5_nx;
  AdsLogicData a5_ny;
  AdsLogicData a5_nz;

  InuTimetagCheck& inuTtCheck;

};

#endif /*G346_A4A5_H_*/
