David Spillman / Mbed 2 deprecated GPSNavigationNew

Dependencies:   GPS2 L3GD20 LSM303DLHC2 PID mbed SDFileSystem

Fork of GPSNavigation by David Spillman

Revision:
14:fd20b7ac8de8
Parent:
13:17f04a55c6e2
Child:
15:1087b8887b53
--- a/main.cpp	Wed Apr 29 18:10:05 2015 +0000
+++ b/main.cpp	Wed Apr 29 18:20:33 2015 +0000
@@ -15,6 +15,11 @@
 //  The project uses a FRDM-K64f (Freescale microcontroller), a LSM303DLHC (magnetometer and accelerometer) to create a tilt compensated comapass, 
 //  MTK3339 GPS module, two xBee Pro S1, three TE KRPA-11 relays (relay logic H-bridge for trolling motor), and a L298n (H-Bridge for linear actuator)
 //
+/**************************************************!!!!!!!WARNING!!!!!!**************************************************************************************************************************/
+//  DO NOT update mbed or SDFileSystem folder
+//  Doing so will/may break this program
+/**************************************************!!!!!!!WARNING!!!!!!**************************************************************************************************************************/
+//
 /***************************************************How To***************************************************************************************************************************************/
 //
 //  Requires a serial to usb adapter to connect an X-Bee to a PC
@@ -57,16 +62,12 @@
 /*************************************************************************************************************************************************************************************************/
 
 //unmodified
-//mbed folder
-#include "mbed.h"
-//SDFileSystem folder
-#include "SDFileSystem.h"
+#include "mbed.h"                                       //mbed folder
+#include "SDFileSystem.h"                               //SDFileSystem folder
 
 //modified
-//GPS folder
-#include "GPS.h"
-//PID folder
-#include "PID.h"
+#include "GPS.h"                                        //GPS folder
+#include "PID.h"                                        //PID folder
 
 //from scratch
 #include "IMUDataAndFilters.h"
@@ -74,6 +75,7 @@
 #include "Actuator.h"
 #include "TrollingMotor.h"
 
+
 #define VOLT_MULT  (3.3f / (0.810f / (3.3f + 0.810f)))  //voltage divider 3.3k and 810 (VREF = 3.3V) keeps 12V measurements below 3.3V
 #define RATIO_TOLERANCE     0.02f                       //How close the difference between the set ratio and current ratio before consider
 #define MIN_RATIO           0.04f                       //Actuator hits retract limit swithc at 2.2%
@@ -95,7 +97,7 @@
 //PID/PID.cpp
 PID headingPID(headKc, headTi, headTd, MAGN_PERIOD);    //Kc, Ti, Td, interval
 
-//mbed classes
+//mbed classes (mbed folder)
 Timer headingTime;
 Timer acc;
 Timer magn;
@@ -106,10 +108,11 @@
 DigitalOut ldo(PTC10);                                  //Controls 3.3V LDO v-reg powering MTK3339 (GPS) 1 = GPS powered on and 0 = GPS powered down
 DigitalOut green(D3);                                   //Light output
 DigitalOut white(PTB9);                                 //Light output
-Serial xBee(PTB11, PTB10);                              //UART 3
+Serial xBee(PTB11, PTB10);                              //UART 3 xbee serial
+//end of mbed classes
 
 //GPS/GPS.cpp
-GPS gps(PTC15, PTC14);                                  //UART 4
+GPS gps(PTC15, PTC14);                                  //UART 4 GPS serial
 
 //Not sure where "FILE" is defined
 FILE *way;                                              //file pointer for waypoints on SD card