AlchemistPrimus / N2-AvionicsFlightSoftware

A repository containing flight software for the N2 rocket.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 code successfully.

Project structure


├── data
│   └── flightdata.txt
├── include
│   ├── checkState.h
│   ├── defs.h
│   ├── functions.h
│   ├── kalmanfilter.h
│   ├── logdata.h
│   ├── readsensors.h
│   └── transmitwifi.h
├── lib
│   └── README
├── LICENSE
├── platformio.ini
├── README.md
├── src
│   └── main.cpp
└── test
    └── README

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

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
0 Pre-Flight Ground 20m Above Ground Level
1 Powered Flight accelerationZ <=2m/s2 for 0.1s
2 Coasting velecity less than zero to detect apogee
3 Ballistic Descent 20m displacement below apogee to deploy parachute
4 Chute Descent < 20m Above Ground
5 Post-flight Ground No more events

About

A repository containing flight software for the N2 rocket.

License:MIT License


Languages

Language:C 66.3%Language:C++ 33.7%