Closed JanWielgus closed 3 years ago
Hello, I'd like to work on this.
Hello, I'd like to work on this.
Ok, so I think you have to fork this repo. Then create a new branch from "master" (not as I wrote earlier). Then you need to create a new file in Common folder named Utils.h. There create two namespaces: "Common" namespace, and inside it create a second nested namespace named "Utils".
Inside that second namespace create declaration of a function to calculate altitude: it have to return altitude of type float in meters and have one argument corresponding to sea-level pressure. Current pressure you can get by including "Instances/SensorInstances.h" file and then you can use Instance::baro.getPressure_hPa() to get current pressure measured by drone sensors. Temperature is not yet available to obtain in code so create a temporary constant with, lets say 20 deg Celsius. If you have any questions, please let me know.
By the way, how did you find this project? :D
Sorry, @tawandamoyo, this issue had to be done as fast as possible.
CREATE THIS BRANCH FROM (and merge it to) AltHold-implementation branch
Formula: https://keisan.casio.com/exec/system/1224585971