Pathing and GPS naviagtion for the rover. Documentation necessary!
[Gonna keep this updated as a working log of what I'm doing in the gps folder] -benton
This SoRo component is a new candidate for documentation! If you know markdown, and have a good idea about what's going on here, please feel free to make a new page about it in the docs! :)
If SWIG is not installed, install it and python3 dev tools with
sudo apt install swig python3-dev gcc
Process:
- wrap edc.c into a library
- use edc.c to wrap sbc.c into a library
- use sbc.c to wrap gps.c into a library
- Then use gps.c library to wrap main.c or main.cpp
Run
make all
swig -python edc.i
gcc -fpic -c -I/usr/include/python3.8 edc.c edc_wrap.c
gcc -shared edc.o edc_wrap.o -o _edc.so
swig -python sbp.i
gcc -fpic -c -I/usr/include/python3.8 sbp.c sbp_wrap.c
gcc -shared sbp.o sbp_wrap.o -o _sbp.so edc.o
swig -python gps.i
gcc -fpic -c -I/usr/include/python3.8 gps.c gps_wrap.c
gcc -shared gps.o gps_wrap.o -o _gps.so sbp.o edc.o
swig -python main.i
gcc -fpic -c -I/usr/include/python3.8 main.c main_wrap.c
gcc -shared main.o main_wrap.o -o _gpsmain.so gps.o sbp.o edc.o
- Copy gps code over
- Figure out what is necessary to running the code and what can be disposed of (bye bye cpp and hpp files)
- Write a main function that can call gps methods just to see if the damn thing even works
- Get it all to at least build correctly
- Figure out how to wrap the gps code and turn it into a python module
- See if that module can be imported into another python script and the correct information from the Swift can be accesssed
- See if it will actually communicate with the Swift