Search for question
Question

ATC: Code Challenge

See the overview slide for a full description of the task and system to implement.

The scaffold provided here includes a main.c, message.h header file and a template for a

Makefile. Source (.c) files should be placed in the "src" sub-directory and header (.h) files in

the "include" sub-directory. The Makefile will look for files here, compile object files into a

sub-directory "build" and produce a binary executable "atc" which runs the air traffic control

program.

The provided file "message.h" includes an example structure "ADSBPacket" which you might

use to store each ADS-B decoded message you receive. You can edit any files provided in

the scaffold and add your own files to suit your needs.

Building, Running and Marking

Your program is expected to be built, without errors, using a Makefile and should build an

executable called "atc". During testing, your program will be built using:

make clean && make

To test your program, we will run ./atc with no input arguments.

Input testing file:

The scaffold also includes a file "example_input_001.txt" which contains a hypothetical set of

message and command data that your program might receive. You can use this for testing

your program by calling:

./atc < example_input_001.txt

which calls your program and re-directs the contents of the file through to the standard input.

When doing this, you will see the output messages your code produces in response to this

input, which may be useful during the implementation and testing process.

Fig: 1