90 likes | 221 Views
Interface from Command & Data Handling (C&DH) to Control System. C&DH System Architecture. One Ada package is used to integrate the application Contains procedures to perform the following: Initialization Rate processing (one task per rate) 80 Hz 10 Hz 5 Hz 1 Hz 0.1 Hz Inter-task I/O.
E N D
Interface from Command & Data Handling (C&DH) to Control System
C&DH System Architecture • One Ada package is used to integrate the application • Contains procedures to perform the following: • Initialization • Rate processing (one task per rate) • 80 Hz • 10 Hz • 5 Hz • 1 Hz • 0.1 Hz • Inter-task I/O
Ada Restrictions • System Architect has provided restrictions on use of Ada constructs • No “delay” statements • Wants a single, periodic, interrupt • All dynamic memory allocations (“new”) must be performed in initialization code • Worry about memory fragmentation • Worry about memory leaks • Use up to optimization level 2 (“-O2” compilation flag) • Worry about code generator at level 3 • Use dynamic elaboration checking (-gnatE compilation flag) • Needed for DMS • Requires use of pragma Elaborate or Elaborate_all to avoid Program_Error exception
Package Application_Interface with Cyclic_Index_Types; package Application_Interface is procedure Initializations; procedure Eighty_Hz_Processing; procedure Eighty_Hz_Io; -------------------------------------------------- Ten_Hz_Offset : Cyclic_Index_Types.Offset_Type; procedure Ten_Hz_Processing; procedure Ten_Hz_Io; -------------------------------------------------- Five_Hz_Offset : Cyclic_Index_Types.Offset_Type; procedure Five_Hz_Processing; procedure Five_Hz_Io; -------------------------------------------------- One_Hz_Offset : Cyclic_Index_Types.Offset_Type; procedure One_Hz_Processing; procedure One_Hz_Io; -------------------------------------------------- Tenth_Hz_Offset : Cyclic_Index_Types.Offset_Type; procedure Tenth_Hz_Processing; procedure Tenth_Hz_Io; end Application_Interface;
GN&C Interface With C&DH • Sensor data is configured to simply “arrive” periodically • Actuator data is automatically sent periodically • Various I/O procedures used to move data
Good Programming Practice • Minimal processing in I/O procedures • They are called within the 80 Hz task • Should simply copy data from local objects to global objects 80 Hz Task 80 Hz processing Signal 10 Hz task 10 Hz I/O 10 Hz Task 10 Hz Task processing
1 Second Frame (Theoretical) 80 Hz 10 Hz 5 Hz 1 Hz 0.1 Hz
1 Second Frame (Real) 80 Hz 80 passes 10 Hz 10 passes 5 Hz 1 pass 1 pass 1 pass 1 pass 1 pass 1 Hz 1 pass 0.1 Hz
I/O Inputs • Mode commands • Reference frame • Attitude command • GPS attitude data (initialization only) • Star Tracker data • Inertial Sensor Assembly (ISA) data • Reboost start time • Reboost end time Outputs • Thruster commands