/* ARSP -- Altimeter Radar Sensor Processing (P-Spec 2.1.2) Programmer Name - *************** Data - 11/16/00 Group - 20 Reference - Guidance and Control Software Development Specification Version 2.3 with Formal Modifications 2.3-1 through 2.3-7; Withers and Becher Purpose - The vehicle has one altimeter radar. The ARSP functional unit reads the altimeter counter provided by this radar and converts the data into a measure of distance to the surface. Variable Data Store Data type Range Inputs - ar_alitude so double [0, 2000] ar_frequency rp double [1, 2.45*10^9] k_alt gs long [0, 1] ar_counter ex short [-1, (2^15)-1] ar_status gs char [0:healthy, 1:failed] Outputs - ar_altitude k_alt ar_status Process - The processing of the altimeter counter data (ar_counter) into the vehicle's altitude above the planet's terrain depends on wether or not an echo is recieved by the current time step. The distance covered by the radio pulses emitted from the altimeter radar is directly proportional to the time between transmission and reception of its echo. A digital counter (ar_counter) is started as the radar pulse is transmitted. The counter increments ar_frequency times per second. If an echo is received, the lower order fifteen bits ar_counter contain the pulse count, and the sign bit will contain the value zero. If an echo is not received, ar_counter will contain sixteen one bits. */ using namespace std; #include "/home/cs350/term.projects/include.files/external.h" #include "/home/cs350/term.projects/include.files/guidance_state.h" #include "/home/cs350/term.projects/include.files/run_parameters.h" #include "/home/cs350/term.projects/include.files/sensor_output.h" #include // For debugging only! No I/O permitted in real code. extern struct external ex; extern struct guidance_state gs; extern struct run_parameters rp; extern struct sensor_output so; void arsp() { }