Changeset - d96de01781be
[Not reviewed]
default
4 3 2
mkanning@CL-SEC241-10.cedarville.edu - 12 years ago 2012-11-15 14:02:59
mkanning@CL-SEC241-10.cedarville.edu
more changes to GPS tracker
9 files changed with 76 insertions and 921 deletions:
0 comments (0 inline, 0 general)
master/master/lib/aprs_trackuino/gps.c
Show inline comments
 
deleted file
master/master/lib/aprs_trackuino/gps.cpp
Show inline comments
 
deleted file
master/master/lib/aprs_trackuino/gps.h
Show inline comments
 
deleted file
master/master/lib/aprs_trackuino/trackuino.pde
Show inline comments
 
deleted file
master/master/lib/trackuinoGPS/gps.c
Show inline comments
 
@@ -250,24 +250,26 @@ void parse_altitude(const char *token)
 
void gps_setup() {
 
	strcpy(gps_time, "000000");
 
	strcpy(gps_aprs_lat, "0000.00N");
 
	strcpy(gps_aprs_lon, "00000.00E");
 
}
 

	
 
/// MKa GPS transmission parser
 
void parse_gps_transmission(char c){
 
/// MKa GPS transmission parser START
 
void parse_gps_transmission(char gpsToken){
 
	// i think c is the most recent character of transmission and is constantly 
 
	// tested if terminal character. if terminal then do parse on previous transmission.
 
	 
 
	// $--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx
 
	if(c == '\n') //end of transmission sentence. may need more checks
 
	if(gpsToken == '$') //start of transmission sentence
 
	{
 
		
 
	}
 
}
 

	
 
/// MKa GPS transmission parser END
 

	
 
/// process gps transmission 
 
bool gps_decode(char c)
 
{
 
	int ret = false;
 

	
 
	switch(c) {
master/master/lib/trackuinoGPS/gps.h
Show inline comments
 
@@ -35,13 +35,12 @@ extern float gps_speed;
 
extern float gps_altitude;
 

	
 

	
 

	
 
void gps_setup();
 
bool gps_decode(char c);
 

	
 
#endif
 
enum t_sentence_type {
 
typedef enum t_sentence_type {
 
	SENTENCE_UNK,
 
	SENTENCE_GGA,
 
	SENTENCE_RMC
 
};
 
\ No newline at end of file
 
}t_sentence_type;
 
#endif
master/master/lib/trackuinoGPS/gpsMKa.c
Show inline comments
 
new file 100644
 
/*
 
 * gpsMKa.c
 
 *
 
 * Created: 11/15/2012 12:02:38 PM
 
 *  Author: mkanning
 
 */ 
 
#include <stdbool.h>
 

	
 
// has the transmission started 
 
bool transmissionBegin = false;
 

	
 
// holds the byte ALREADY PARSED. includes starting character
 
int bytesReceived = 0;
 

	
 
//data (and checksum) of most recent transmission
 
char data[16];
 

	
 
/// MKa GPS transmission parser START
 
void parse_gps_transmission(void){
 
	
 
	// Pull byte off of the buffer
 
	char byte = uart_getchar();
 
	
 
	// $--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx
 
	if(byte == '$') //start of transmission sentence
 
	{
 
		transmissionBegin = true;
 
		bytesReceived = 1; //resets transmission if '$' is found
 
	}
 
	
 
	if (transmissionBegin)
 
	{
 
		if (bytesReceived == 3) //check 4th byte
 
		{
 
			if(byte == ' ')
 
			{
 
				
 
			}
 
		} 
 
		else
 
		{
 
		}
 
		//use a state machine implementation rather than this
 
	}
 
	
 
}
 

	
 
/// MKa GPS transmission parser END
 
\ No newline at end of file
master/master/lib/trackuinoGPS/gpsMKa.h
Show inline comments
 
new file 100644
 
/*
 
 * gpsMKa.h
 
 *
 
 * Created: 11/15/2012 12:02:53 PM
 
 *  Author: mkanning
 
 */ 
 
 
 
#ifndef GPSMKA_H_
 
#define GPSMKA_H_
 
#define GGA_MESSAGE
 
#define RMC_MESSAGE
 
#define UKN_MESSAGE
 
// states
 
#define 
 
 
 
#endif /* GPSMKA_H_ */
 
\ No newline at end of file
master/master/master.cproj
Show inline comments
 
@@ -192,28 +192,23 @@
 
    <Compile Include="lib\serparser.h">
 
      <SubType>compile</SubType>
 
    </Compile>
 
    <Compile Include="lib\trackuinoGPS\config.h">
 
      <SubType>compile</SubType>
 
    </Compile>
 
    <Compile Include="lib\trackuinoGPS\gps.c">
 
    <Compile Include="lib\trackuinoGPS\gpsMKa.c">
 
      <SubType>compile</SubType>
 
    </Compile>
 
    <Compile Include="lib\trackuinoGPS\gps.h">
 
    <Compile Include="lib\trackuinoGPS\gpsMKa.h">
 
      <SubType>compile</SubType>
 
    </Compile>
 
    <Compile Include="master.c">
 
      <SubType>compile</SubType>
 
    </Compile>
 
  </ItemGroup>
 
  <ItemGroup>
 
    <Folder Include="lib" />
 
    <Folder Include="lib\trackuinoGPS" />
 
    <Folder Include="lib\sd" />
 
  </ItemGroup>
 
  <ItemGroup>
 
    <None Include="lib\trackuinoGPS\trackuino.pde">
 
      <SubType>compile</SubType>
 
    </None>
 
  </ItemGroup>
 
  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
 
</Project>
 
\ No newline at end of file
0 comments (0 inline, 0 general)