Code example for PrintStream

Methods: println

0
	/** 
	 * Do the heavy lifting necessary to spit out a file header 
	 */ 
	private void emitProlog(Calendar cal) {
 
		out.println("AXGG"+versionString); // AFLY06122 - sect 3.1, A=mfgr info,
		// mfgr=FLY, serial num=06122 
 
		// sect 3.3.1, H=file header 
		String dstr = String.format(Locale.US, "HFDTE%02d%02d%02d",
				cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1,
				(cal.get(Calendar.YEAR) - 1900) % 100); // date
 
		out.println(dstr); // date
 
		out.println("HFFXA100"); // accuracy in meters - required
		out.println("HFPLTPILOT:" + pilotName); // pilot (required)
		out.println("HFGTYGLIDERTYPE:" + gliderType); // glider type (required)
		out.println("HFGIDGLIDERID:" + pilotId); // glider ID required
		out.println("HFDTM100GPSDATUM:WGS84"); // datum required - must be wgs84
		out.println("HFGPSGPS:" + android.os.Build.MODEL); // info on gps
		// manufacturer 
		out.println("HFRFWFIRMWAREVERSION:" + versionString); // sw version of app
		out.println("HFRHWHARDWAREVERSION:" + versionString); // hw version
		out.println("HFFTYFRTYPE:Geeksville,Gaggle"); // required: manufacturer
		// (me) and model num 
 
		// sect 3.4, I=fix extension list 
		out.println("I013638GSP"); // one extension, starts at byte 36, ends at
		// 38, extension type is ground speed (was TAS) 
	} 
 
	/** 
	 * Add standard IGC prologue