Skip to content

Programmer's Manual (Ground Station System)

evanharbison02 edited this page Oct 19, 2026 · 3 revisions

Ground Station System Programmer's Manual

This manual documents the functions, data types, and interfaces in the ground station system's source code. It is meant to help future programmers understand, modify, and extend the system by explaining how the code is designed and implemented

Command Structure and Mapping

Commands are covered in more detail in the Ground Station's source libraries section. Before then, it helps to understand how commands are structured and mapped, especially if you ever need to create a new one. Knowing these rules will help you build commands that match both the user experience and the source code logic.

Every command has two parts:

  • Command name: the action the satellite should take
  • Command arguments: the details that modify that action

Command Names

A command name is the action you want the satellite to perform.

Examples:

  • "Go to..."
  • "Walk the..."
  • "Talk with..."

Command Arguments

Arguments modify or give detail to the action. A command can take no arguments or up to two, which is the limit in our Ground Station.

Examples:

  • "Go to the beach" (one argument)
  • "Walk the dog" (one argument)
  • "Talk with your brother and sister" (two arguments)
  • "Go" (no arguments)

Real-World Example

Take the instruction: "Go to the store and get milk."

  • Command name: Go to
  • Argument 1: store
  • Argument 2: milk

Each of these parts is called a token. Using these tokens, the command for the Ground Station would look like this:

Go2 store milk

Source Libraries

Comhand.h

parse_command( )

 int parse_command( const char *input, command_t cmd)

Function:
Used to tokenize and parse a raw command string to a pointer to the correct command_t struct. Returns a int value based on success

Parameter:
const char *input: a char sting pointer that represents the raw command sting read
command_t cmd: a "blank" command_t struct to be populated with the paresed data

Implementation:
Used to populate a command_t struct pointer to be used by the command handling fucntion. Preforms lexical and syntax analyze with the assistance from helper functions and data types with in the library's code

Logger.h

Types.h

Clone this wiki locally