Skip to content
Snippets Groups Projects
Commit 5ae45355 authored by mkelly2's avatar mkelly2
Browse files

Updated getting started and packets documentation.

parent 98320d45
No related branches found
No related tags found
1 merge request!28Ground station documentation
......@@ -17,6 +17,7 @@ data passes through between the VRPN (Camera System), the quad, and user interfa
the frontend to manage the writing and parsing of return messages from the backend.
![GroundStationComponents](images/groundStationComponents.jpg)
**Figure 1** Ground Station main components
**Figure 2** Shows a sample connection with the VRPN system, a packet sent or recieved
......@@ -31,6 +32,7 @@ the Crazyflies to work with the MicroCART system.
![GroundStationDiagram](images/groundStationDiagram.jpg)
**Figure 2** Ground Station connections and packets
Ground Station Commands
......@@ -53,5 +55,6 @@ Here is an example of how a press of the "Send to quad" button in the GUI is pro
![GroundStationFlowchart1](images/buttonPressCallStackFlowchart.png)
**Figure 3** Ground Station call stack flowchart
......@@ -5,15 +5,15 @@ but the structure of all packets is the same it is just the way the data is form
between packets.
## Introduction ##
All packets are the same in the sense that they have consistent headers with a start character and all end with a checksum as well as
a end character. The basic structure is shown below.
All packets are the same in the sense that they have consistent headers with a start character and all end with a checksum.
The basic structure is shown below.
| Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|:-----------------:|:---------------:|:------------:|:----------:|:-----------:|:----:|:--------:|:-------------:|
| Message Parameter | Begin Character | Message Type | Message ID | Data Length | Data | Checksum | End Character |
| Bytes | 1 | 2 | 2 | 2 | var | 1 | 1 |
| Index | 0 | 1 | 2 | 3 | 4 | 5 |
|:-----------------:|:---------------:|:------------:|:----------:|:-----------:|:----:|:--------:|
| Message Parameter | Begin Character | Message Type | Message ID | Data Length | Data | Checksum |
| Bytes | 1 | 2 | 2 | 2 | var | 1 |
Both the begin and end characters are defined in the Message enum in [commands.h](../../quad/src/commands/commands.h). Message types
The begin character is defined in the Message enum in [commands.h](../../quad/src/commands/commands.h). Message types
are defined within the MessageTypeID enum in [commands.h](../../quad/src/commands/commands.h). Message ID is managed within the backend
[backend.c](../../groundStation/src/backend/backend.c) and is just a counter that is used in client_recv to number packets. Data length
varies with the command that is being sent, but the length of a command is constant. The data is sent in a specific format set by commands.
......@@ -43,7 +43,11 @@ out the return if there is one.
**GUI**
TODO - Matt
The GUI is programmed using QT as such it is written in C++ and uses a thread to do communication with the backend. The main files of the GUI to edit are
[controlworker.h](../../groundStation/gui/MicroCART/controlworker.h) and [mainwindow.h](../../groundStation/gui/MicroCART/mainwindow.h) and the corresponding
source files. To add connectivity to the backend add a slot and signal to the controlworker.h file and add a corresponding signal and slot on the mainwindow.h. Next,
connect the slots and signals in the mainwindow.cpp file and add any additional UI to the mainwindow.ui form.
### Frontend ###
......@@ -156,10 +160,6 @@ The response will be of type RESPSOURCE_ID.
### getnodes ###
**Sent from Ground Station**
//TODO - Does not list in callbacks.c, does this exist?
**Response to Ground Station**
| data index | 0 - 2*N-1 | 2*N - 4*N-1 | 4*N - (< 4096) |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment