Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 38 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# N2-flight-software

## Introduction

This repository contains code used for flight software for Nakuja Rocket N2. The following description provides a detailed
description of program flow, project structure, library dependencies and/or any other necessary documentation needed to run this
description of program flow, project structure, library dependencies and/or any other necessary documentation needed to run this
code successfully.

## Project structure
***

---

```asm
├── data
Expand All @@ -30,33 +33,41 @@ code successfully.
```

### 1. Folders Description
| Folder | Description |
|---|---|
| include | Contains header files |
| lib | Project libraries|
|src| Contains main.cpp source file run by the flight computer |
|test| Contains unit test files |

| Folder | Description |
| ------- | -------------------------------------------------------- |
| include | Contains header files |
| lib | Project libraries |
| src | Contains main.cpp source file run by the flight computer |
| test | Contains unit test files |

### 2. Files Description
| File | Description |
| ---------| ----------- |
|defs.h | Contains constants declaration |
|functions.h| Contains general utility functions and prototype function declarations |
|logdata.h | code for SD card mounting and logging |
|checkState.h| Contains state machine logic |
|kalmanfilter.h | Contains kalman filter for accelerometer values |
|readsensors.h | Contains code for sensors on board including the MPU,BMP,GPS |
|transmitwifi.h | Contains WiFi set-up and MQTT code |


## Flight Logic
The flight program is structured as a state machine with the following states: adopted from BPS space
| State | Description | Waiting for event |

| File | Description |
| -------------- | ---------------------------------------------------------------------- |
| defs.h | Contains constants declaration |
| functions.h | Contains general utility functions and prototype function declarations |
| logdata.h | code for SD card mounting and logging |
| checkState.h | Contains state machine logic |
| kalmanfilter.h | Contains kalman filter for accelerometer values |
| readsensors.h | Contains code for sensors on board including the MPU,BMP,GPS |
| transmitwifi.h | Contains WiFi set-up and MQTT code |

## Flight Logic

The flight program is structured as a state machine with the following states: adopted from BPS space
| State | Description | Waiting for event |
|---|---| -----|
| 0 | Pre-Flight Ground | altitude >= 10m AGL |
| 1 | Powered Flight | velocity < 0 to detect apogee |
| 2 | Apogee | 10m below apogee to deploy parachute |
| 3 | Chute Descent| altitude <= 10m AGL|
| 4 | Post-flight Ground | No more events |
| 0 | Pre-Flight Ground | altitude >= 10m AGL |
| 1 | Powered Flight | velocity < 0 to detect apogee |
| 2 | Apogee | 10m below apogee to deploy parachute |
| 3 | Chute Descent| altitude <= 10m AGL|
| 4 | Post-flight Ground | No more events |

## OTA UPDATES

To perform OTA updates on the code enter the following url in the browser

```bash
<ESP-32 IP-address>/update
```