Finish documention until someone change something

This commit is contained in:
2022-02-15 20:12:50 +01:00
parent 3a2e51713b
commit c8e3344b27
50 changed files with 991 additions and 223 deletions
+68 -1
View File
@@ -1,7 +1,7 @@
/**
* @file route.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @brief Contains a class which hold multiple Points
* @version 0.1
* @date 2022-01-31
*
@@ -16,33 +16,100 @@
#include <list>
/**
* @brief A to handle points on the earth
*
* The points inherits latidue and longitude as doubles
*
*/
class Point{
public:
/**
* @brief Construct a new Point object
*
* @param lat latidude
* @param lon longitude
*/
Point(double lat, double lon) { this->lat = lat; this->lon = lon; }
Point(){ this->lat = 0; this->lon = 0; }
double lat = 0;
double lon = 0;
/**
* @brief checks if to points are equal
*
* @param rhs
* @return true
* @return false
*/
bool operator==(const Point& rhs) const {
return this->lat == rhs.lat && this->lon == rhs.lon;
}
/**
* @brief Checks if the Point is valid
*
* @return true
* @return false
*/
bool isValid() const { return this->lat + this->lon; }
};
/**
* @brief Holds some route information
*
*/
struct RouteInfo{
/**
* @brief Selected number of Points
*/
uint16_t currentPoint;
/**
* @brief Total points stored in route
*/
uint16_t totalPoints;
};
/**
* @brief A class to manage multiple points
*
* The list of point presents a route which can be driven
*/
class Route {
public:
/**
* @brief Construct a new Route object
*/
Route();
/**
* @brief Adds a point to the list
*
* @param point
*/
void addPointToRoute(Point point);
/**
* @brief Select the first point as target
*
* @return Point
*/
Point startRoute();
/**
* @brief Get the next point and set it as target
*
* @return Point is zero if there are no more Points
*/
Point getNextPoint();
/**
* @brief Get the Route Info object
*
* @return RouteInfo
*/
RouteInfo getRouteInfo();
private: