Exemple #1
0
char* getLongitude(void){
	int tconv, i;
	char tchar[2];
	if(coordValid()){
		temp[0] = gps_Longitude[0];
		temp[1] = gps_Longitude[1];
		temp[2] = gps_Longitude[2];
		temp[3] = ' ';
		temp[4] = gps_Longitude[3];
		temp[5] = gps_Longitude[4];
		temp[6] = '\'';
		tconv = decToInt(gps_Longitude+6,4) * 0.6 / 100.0;
		intToDec(tconv,tchar,2);
		temp[7] = tchar[0];
		temp[8] = tchar[1];
		temp[9] = '\"';
		temp[10] = gps_EWind[0];
		temp[11] = 0;
	}
	else{
		i = 0;
		while(i<11)
			temp[i++] = ' ';
		temp[i] = 0;
	}
	return temp;
}
Exemple #2
0
double DFGPS::getLongitude () {
	double lon = (double)decToInt (gpsp[4], 3);
	return lon + atof (gpsp[4]+3) / 60.0;
}
Exemple #3
0
double DFGPS::getSatellites () {
	double sat = (double)decToInt (gpsp[4], 3);
	return sat + atof (gpsp[4]+3) / 60.0;
}
Exemple #4
0
double DFGPS::getLatitude () {
	double lat = (double)decToInt (gpsp[2], 2);
	return lat + atof (gpsp[2]+2) / 60.0;
}
Exemple #5
0
double DFGPS::getLongitude () {
	double lon = (double)decToInt (gpsp[2], 2);
	return lon + atof (gpsp[2]+2) / 60.0;
}