zwischenstand, ich habe Lust mache jetzt weiter :)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
#include "coordinate.h"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @file coordinate.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-01-10
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COORDINATE_H
|
||||
#define COORDINATE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class Coordinate {
|
||||
public:
|
||||
Coordinate(/* args */);
|
||||
~Coordinate();
|
||||
|
||||
double getDistance(Coordinate coordinate);
|
||||
uint16_t getCompassDirection(Coordinate coordinate);
|
||||
|
||||
private:
|
||||
double lon;
|
||||
double lat;
|
||||
};
|
||||
|
||||
|
||||
#endif // COORDINATE_H
|
||||
@@ -0,0 +1,2 @@
|
||||
#include "navigation.h"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @file navigation.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-01-10
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NAVIGATION_H
|
||||
#define NAVIGATION_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "coordinate.h"
|
||||
|
||||
class Navigation {
|
||||
public:
|
||||
Navigation(uint32_t baud, uint8_t rx, uint8_t tx);
|
||||
|
||||
void addCoordinateToRoute(Coordinate coordinate);
|
||||
void addCurrentCoordinateToRoute();
|
||||
void delRoute();
|
||||
|
||||
double getDistanceToLastCoordinate();
|
||||
|
||||
private:
|
||||
Coordinate *lastCoordinate;
|
||||
};
|
||||
|
||||
#endif // NAVIGATION_H
|
||||
Reference in New Issue
Block a user