Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4235437
Initial integration of BerryIMU code
emilybthorpe Jan 13, 2023
b425651
created sensor, accelometer class, initial run logic
emilybthorpe Jan 13, 2023
3a883a0
Reorganize directories for refractor
emilybthorpe Jan 13, 2023
d3389fb
Initial gyroscope refractor, update sensor class
emilybthorpe Jan 15, 2023
ddb3319
add pitch/roll calculator
emilybthorpe Jan 15, 2023
fd16ff5
refractor magnetmeter
emilybthorpe Jan 15, 2023
ec4e000
Directory cleanup after refractor
emilybthorpe Jan 15, 2023
678fe66
add filter angle calculator
emilybthorpe Jan 16, 2023
fac7347
Fix syntax errors
emilybthorpe Jan 19, 2023
004a7c5
fix semicolon
emilybthorpe Jan 19, 2023
26b1e2e
Debug existing sensor code and integrate to run.py
MacHighPowerRocketry Jan 26, 2023
c4a3b5c
upload pressure sensor test
emilybthorpe Jan 26, 2023
c11a95e
Integrate pressure sensor, add toString()
emilybthorpe Jan 27, 2023
d9f3708
rework main runner
emilybthorpe Jan 27, 2023
b29037f
Round sensor data to x decimal points
emilybthorpe Jan 29, 2023
bc7a2aa
add delay before log (currently 50 milliseconds)
emilybthorpe Jan 29, 2023
e1f9ef4
Delete todo
emilybthorpe Jan 29, 2023
454e389
update pressure sensor rounding
emilybthorpe Jan 30, 2023
b02bae5
Merge branch 'BerryIMU_integration' of https://github.com/MacHighPowe…
emilybthorpe Jan 30, 2023
917cd61
Initial integration of berryGPS
emilybthorpe Feb 2, 2023
45b1c42
update imports
emilybthorpe Feb 2, 2023
adf895a
add gitignore to project
emilybthorpe Feb 2, 2023
64acd10
pre-test gps integration
emilybthorpe Feb 2, 2023
25db5c2
refactor gps and fix endless loop
emilybthorpe Feb 3, 2023
7acad02
fix logger req in pressure sensor
MacHighPowerRocketry Feb 17, 2023
ee39092
merge run.py
MacHighPowerRocketry Feb 17, 2023
444a260
Delete rocketLogger.cpython-37.pyc
emilybthorpe Feb 17, 2023
e53d437
fix super call in gps
MacHighPowerRocketry Feb 17, 2023
88ccb8b
create new log file (w/timestamp) at each run
MacHighPowerRocketry Feb 17, 2023
5fbdd14
Merge branch 'BerryIMU_integration' of github.com:MacHighPowerRocketr…
MacHighPowerRocketry Feb 17, 2023
5649ded
fix indentation in logger
emilybthorpe Feb 17, 2023
2fbe065
reworked gps, fixing error causing no output
emilybthorpe Feb 20, 2023
794c1d3
update gitignore
emilybthorpe Feb 20, 2023
a33f58e
fix accelerometer returning y,x values instead of x,y
emilybthorpe Mar 1, 2023
fc85291
fix berryGPS not importing sys
emilybthorpe Mar 1, 2023
edfa4b6
add connectBus() to init
emilybthorpe Mar 1, 2023
4a51e4c
add debug line
emilybthorpe Mar 1, 2023
034898d
fix bus not being loaded
emilybthorpe Mar 1, 2023
1dc6a69
completed gps code
MacHighPowerRocketry Mar 1, 2023
6a067cf
add methods to check if altitude is at least value
emilybthorpe Mar 2, 2023
9f59834
remove old pressure sensor testing code
emilybthorpe Mar 3, 2023
0ebabc2
Merge branch 'BerryIMU_integration' of github.com:MacHighPowerRocketr…
MacHighPowerRocketry Mar 3, 2023
423db66
add original imu for testing
emilybthorpe Mar 3, 2023
ef439bd
Merge branch 'BerryIMU_integration' of github.com:MacHighPowerRocketr…
MacHighPowerRocketry Mar 3, 2023
07609e0
start callibration work
MacHighPowerRocketry Mar 3, 2023
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
175 changes: 175 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
Sensors/__pycache__/__init__.cpython-310.pyc
__pycache__/rocketLogger.cpython-310.pyc
Sensors/__pycache__/berryGPS.cpython-310.pyc
Sensors/__pycache__/pressureSensor.cpython-310.pyc
Sensors/__pycache__/sensor.cpython-310.pyc
Sensors/__pycache__/berryAccelerometer.cpython-310.pyc
Sensors/__pycache__/berryGyroscope.cpython-310.pyc
Sensors/__pycache__/berryMagnetometer.cpython-310.pyc

# Byte-compiled / optimized / DLL files
__pycache__/
Sensors/__pycache__/
BerryIMU/__pycache__/
*.py[cod]
*$py.class
*.cpython-310.pyc
Sensors/__pycache__/__init__.cpython-310.pyc


# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.pyc
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.vscode/settings.json
57 changes: 57 additions & 0 deletions BerryIMU/BMP388.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# define BMP388 Device I2C address

I2C_ADD_BMP388_AD0_LOW = 0x76
I2C_ADD_BMP388_AD0_HIGH = 0x77
I2C_ADD_BMP388 = I2C_ADD_BMP388_AD0_HIGH

BMP388_REG_ADD_WIA = 0x00
BMP388_REG_VAL_WIA = 0x50

BMP388_REG_ADD_ERR = 0x02
BMP388_REG_VAL_FATAL_ERR = 0x01
BMP388_REG_VAL_CMD_ERR = 0x02
BMP388_REG_VAL_CONF_ERR = 0x04

BMP388_REG_ADD_STATUS = 0x03
BMP388_REG_VAL_CMD_RDY = 0x10
BMP388_REG_VAL_DRDY_PRESS = 0x20
BMP388_REG_VAL_DRDY_TEMP = 0x40

BMP388_REG_ADD_CMD = 0x7E
BMP388_REG_VAL_EXTMODE_EN = 0x34
BMP388_REG_VAL_FIFI_FLUSH = 0xB0
BMP388_REG_VAL_SOFT_RESET = 0xB6

BMP388_REG_ADD_PWR_CTRL = 0x1B
BMP388_REG_VAL_PRESS_EN = 0x01
BMP388_REG_VAL_TEMP_EN = 0x02
BMP388_REG_VAL_NORMAL_MODE = 0x30

BMP388_REG_ADD_PRESS_XLSB = 0x04
BMP388_REG_ADD_PRESS_LSB = 0x05
BMP388_REG_ADD_PRESS_MSB = 0x06
BMP388_REG_ADD_TEMP_XLSB = 0x07
BMP388_REG_ADD_TEMP_LSB = 0x08
BMP388_REG_ADD_TEMP_MSB = 0x09

BMP388_REG_ADD_T1_LSB = 0x31
BMP388_REG_ADD_T1_MSB = 0x32
BMP388_REG_ADD_T2_LSB = 0x33
BMP388_REG_ADD_T2_MSB = 0x34
BMP388_REG_ADD_T3 = 0x35
BMP388_REG_ADD_P1_LSB = 0x36
BMP388_REG_ADD_P1_MSB = 0x37
BMP388_REG_ADD_P2_LSB = 0x38
BMP388_REG_ADD_P2_MSB = 0x39
BMP388_REG_ADD_P3 = 0x3A
BMP388_REG_ADD_P4 = 0x3B
BMP388_REG_ADD_P5_LSB = 0x3C
BMP388_REG_ADD_P5_MSB = 0x3D
BMP388_REG_ADD_P6_LSB = 0x3E
BMP388_REG_ADD_P6_MSB = 0x3F
BMP388_REG_ADD_P7 = 0x40
BMP388_REG_ADD_P8 = 0x41
BMP388_REG_ADD_P9_LSB = 0x42
BMP388_REG_ADD_P9_MSB = 0x43
BMP388_REG_ADD_P10 = 0x44
BMP388_REG_ADD_P11 = 0x45
Loading