bauen klappt wieder, navigation ist kaputt, todo: und fixme: beachten!
This commit is contained in:
@@ -39,7 +39,8 @@ Navigation::~Navigation() {
|
||||
}
|
||||
|
||||
void Navigation::loop() {
|
||||
this->gps->checkUbloxI2C();
|
||||
//FIXME: Hier sollte funktion zum aktualisieren des GPS Moduls stehen
|
||||
//this->gps->checkUbloxI2C();
|
||||
}
|
||||
|
||||
void Navigation::newRoute() {
|
||||
@@ -76,7 +77,9 @@ CourseCorrection Navigation::getCourseCorrection() {
|
||||
}
|
||||
}
|
||||
|
||||
double currentCourse = this->gps->course.deg();
|
||||
//FIXME: next line
|
||||
double currentCourse = 0;
|
||||
//double currentCourse = this->gps->course.deg();
|
||||
int16_t correction = currentCourse - targetCourse;
|
||||
if (correction > 180)
|
||||
correction -= 360;
|
||||
|
||||
@@ -110,9 +110,9 @@ class Navigation {
|
||||
/**
|
||||
* @brief Returns the GPS object
|
||||
*
|
||||
* @return TinyGPSPlus*
|
||||
* @return SFE_UBLOX_GNSS*
|
||||
*/
|
||||
TinyGPSPlus* getGPS() { return this->gps; }
|
||||
SFE_UBLOX_GNSS* getGPS() { return this->gps; }
|
||||
|
||||
/**
|
||||
* @brief Get the Route Info object
|
||||
|
||||
@@ -8,3 +8,33 @@
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include "navigationUtils.h"
|
||||
|
||||
double NavigationUtils::getCurrentCourse(Point p1) {
|
||||
//TODO: write it!!!
|
||||
return 0;
|
||||
}
|
||||
|
||||
void NavigationUtils::setLastPoint(Point p1) {
|
||||
this->lastPoint = p1;
|
||||
}
|
||||
|
||||
|
||||
double NavigationUtils::courseTo(Point p1, Point p2) {
|
||||
//TODO: write it!!!
|
||||
return 0;
|
||||
}
|
||||
|
||||
double NavigationUtils::courseTo(double lat1, double lon1, double lat2, double lon2) {
|
||||
return NavigationUtils::courseTo(Point(lat1, lon1), Point(lat2, lon2));
|
||||
}
|
||||
|
||||
double NavigationUtils::distanceBetween(Point p1, Point p2) {
|
||||
//TODO: write it!!!
|
||||
return 0;
|
||||
}
|
||||
|
||||
double NavigationUtils::distanceBetween(double lat1, double lon1, double lat2, double lon2) {
|
||||
return NavigationUtils::distanceBetween(Point(lat1, lon1), Point(lat2, lon2));
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
class NavigationUtils {
|
||||
public:
|
||||
void getCurrentCourse(Point p1);
|
||||
double getCurrentCourse(Point p1);
|
||||
void setLastPoint(Point p1);
|
||||
|
||||
static double courseTo(Point p1, Point p2);
|
||||
|
||||
Reference in New Issue
Block a user