sub_getgps.pl 459 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sub sub_getgps {
	print ">> Use GPS...? [y/n] 	 				: " ;
	chop($gpsans = <STDIN>) ;
	print "\n" ;
	if ($gpsans =~ /[yY]/) {
	print ">> Port name...?  	 				: " ;
	chop($gpsport = <STDIN>) ;
	print "\n" ;
	print ">> Baud rate...?  	 				: " ;
	chop($gpsbaud = <STDIN>) ;
	print "\n" ;
	$gpson = 1 ;
	} else {
	$gpson = 0 ;
	}
	$gps = new GPS::NMEA(  'Port'      => "$gpsport",
	                       'Baud'      =>  $gpsbaud,
			);	
	
	
	return $gps ;
}

1;