Hi Rein and all, I started this "thread" by looking at gpsd as I figured that would be the best way to interface with a gps. I then set my eyes on GPS::NMEA and saw how easy that was to use... The benefit of working without gpsd would be to make installs easier and minimize external dependencies. if GPS::NMEA now uses a lot of cpu then that is certainly not in its favour. We could do it all the hard way also and open a port and parse nmea direct. Such as here: http://vancouver-webpages.com/peter/nmea.perl But, then we would really be building a new gpsd and I find thats a waste of effort. So, should we go with gpsd then ? On a sidenote I have a hard time adjusting to the use of loops in perl. If I would do that in any other language then everything would freeze. In Pascal I would call Application.ProcessMessages once in a while to leave some time for the OS to do its things. 73 de Per, sm0rwo lör 2007-02-10 klockan 20:53 +0100 skrev Rein Couperus: > Hi Per, > > I have been testing around a bit an d found a problem with GPS::NMEA. > > below is a little test progam. It reads the gps constantly and puts the time > and position into ~/mail/.utc > > The problem is that reading the socket this way takes up to 30% of my CPU. > (As a reference, fldigi takes 3% of may CPU). > > I have also checked gpsd, and that does it with 0% CPU. I will now start some > testing with NET::GPSD. > > Here is the little test program. Even if you only want the position it takes > a lot of CPU time: > > #!/usr/bin/perl > use GPS::NMEA; > use Data::Dumper; > > my $gps = GPS::NMEA->new(Port => '/dev/ttyUSB0', > Baud => 4800); > > print "Starting gps\n"; > > while(1) { > my($ns,$lat,$ew,$lon) = $gps->get_position; > > $data= Data::Dumper->new([$gps->{NMEADATA}],[])->Dump; > @items = split ",", $data; > for $utc (@items) { > if ($utc =~ /(\d\d:\d\d:\d\d)/) { > if ($ns eq "S") { > $ns = "-"; > } else { > $ns = " "; > } > if ($ew eq "W") { > $ew = "-"; > } else { > $ew = " "; > } > $outstring = sprintf("%s %s%s %s%s\n", > $1,$ns,$lat,$ew,$lon); > `echo "$outstring" > ~/mail/.utc`; > print $outstring; > last; > } else { > unlink "$ENV{HOME}/mail/.utc"; > } > } > select undef, undef, undef, 0.5; > } # end while > > exit; > > > > -----Ursprüngliche Nachricht----- > > Von: pskmail@xxxxxxxxxxxxx > > Gesendet: 10.02.07 15:39:04 > > An: pskmail@xxxxxxxxxxxxx > > Betreff: [pskmail] Re: A tiny progress report regarding gps > > > > > > I agree, that is an absolute must. > > > > Per > > > > (Sunny, -10C in the sun now) > > > > lör 2007-02-10 klockan 13:54 +0100 skrev Rein Couperus: > > > forgot, it would be nice if we could also get gps time so we can update > > > the clock without internet... > > > > > > Rein > > > > > > (Sunny, 20 degrees in the shade...) > > > > > > > -----Ursprüngliche Nachricht----- > > > > Von: pskmail@xxxxxxxxxxxxx > > > > Gesendet: 10.02.07 11:58:00 > > > > An: pskmail@xxxxxxxxxxxxx > > > > Betreff: [pskmail] Re: A tiny progress report regarding gps > > > > > > > > > > > > > > lör 2007-02-10 klockan 10:55 +0100 skrev Rein Couperus: > > > > > Hi Per, > > > > > > > > > > I think what we need is something we can poll from pskmail, so we can > > > > > get the position when we want. > > > > > One way to do that is to fork a new process which does exactly what > > > > > you did, and put the result in a file which we can read any time from > > > > > any of the other preocesses... > > > > > > > > > > Rein EA/PA0R/P > > > > > > > > > Ok, that should be easy (will fix). > > > > I haven't looked at the client at all so I'll talk to you agn when I > > > > need to have some gui control of this. I suppose we can agree that we > > > > wont need gpsd if we do it this way ? > > > > > > > > Another subject: > > > > Dave has improved fldigi dominoex, oh7jjt and I are testing dominoex16 > > > > on 80 (and 40) meters now. Looks good so far, snr is really bad on 80 > > > > now but I got some parts anyway (more on that as snr improves). > > > > This means I am using fldigi 1.32e and its much slower on psk than it > > > > used to be, timing could be a bit off now. > > > > > > > > 73 de Per, sm0rwo > > > > > > > > > > > > > > > > > > > > > -- > > Pär Crusefalk > > Turnévägen 5 > > 14243 Skogås > > Tel: +4687717482 > > Mob: +46768800670 > > > > > > > > > > > > >