Code cleanup ++
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* -----------
|
||||
* - Arduino UNO R3
|
||||
* - Ultimate GPS logger shield
|
||||
* - 16x2 LCD Shield
|
||||
* - 9V Battery
|
||||
*/
|
||||
#include <math.h>
|
||||
@@ -23,6 +24,7 @@ const float deg2rad = 0.01745329251994;
|
||||
const float rEarth = 6371000.0; // Earths radius in meters
|
||||
float range = 9999; // Distance between src and pos
|
||||
String destination = "N46 59.776, E007 27.771";
|
||||
//String destination = "N46 55.090, E007 26.442"; // Gurten
|
||||
String position = ""; // read from GPS
|
||||
String tmp = "";
|
||||
|
||||
@@ -38,10 +40,13 @@ float lon2 = 0;
|
||||
// Prototypes
|
||||
void useInterrupt(boolean);
|
||||
void print_message(String Line1, String Line2);
|
||||
|
||||
/*******************************************/
|
||||
//String destination = "N46 55.090, W7 26.442"; // Gurten: N 46 55.090 E 7 26.442
|
||||
/*******************************************/
|
||||
void useInterrupt(boolean v);
|
||||
void print_message(String Line1, String Line2);
|
||||
float haversine (float lat1, float lon1, float lat2, float lon2);
|
||||
float string2lon(String position);
|
||||
float string2lat(String position);
|
||||
String gps2string(void);
|
||||
String int2fw(int x, int n);
|
||||
|
||||
void setup()
|
||||
{
|
||||
@@ -79,7 +84,7 @@ void loop()
|
||||
|
||||
tmp = String(range);
|
||||
tmp += " [m]";
|
||||
print_message("I wand up.", tmp);
|
||||
print_message("Me wants up!", tmp);
|
||||
|
||||
} else {
|
||||
print_message("Hello Mischa!", "Take me outside!"); // No fix available
|
||||
|
||||
Reference in New Issue
Block a user