IVL GPS + GRASS

James Darrell McCauley mccauley at ecn.purdue.edu
Wed May 11 18:12:44 EDT 1994


J.R. Spidell (jspidell at cl08.cnde.iastate.edu ) writes on 10 May 94:
>a map of the surrounding area.  As far as GRASS goes, all I need
>it for is to display the map on the PC screen using DXF or Tiger files
>and take the information from the serial port and display dots on
>the screen indicating each of the mobile units.

>Now that I have given a little more info, what pieces of GRASS (v.digit+?)
>should I look at first?  GRASS is a large package and somewhat
>intimidating... I just need to be pointed in the right direction
>to begin...

d.vect (to display DXF or Tiger files)
d.points

You may have to do a bit of coding, depending upon what get's fed into 
the serial port. Say, for example, we have data in the form
"Vehicle# easting northing." Then, you may want to do something like:

while(data is coming in)
{
  switch(vehicle)
  {
    case CAR : 			/* car is green */
	sprintf (buf, "echo %g %g | d.points c=green s=1 t=+\n", east,north);
        G_system(buf);
	break;
    case TRUCK : 		/* truck is red */
	sprintf (buf, "echo %g %g | d.points c=red s=1 t=+\n", east,north);
        G_system(buf);
	break;
    default :
    break;
  }
}

Alternatively, you may look at popen() (depending upon how often
a mobile unit sends a signal, popen may be much more efficient).
  process=popen("d.points", "w");
  ...
  fprintf(process,"%g %g\n",east,north);

Don't let the C code be daunting (if you're not a programmer). What
you are asking about seems fairly straightforward (and could possibly
be done without C programming). If you run into problems, ask the good
folks on grassp-list.

Assuming that you have already imported your Tiger or DXF files,
you first need to find out what the format of the data coming in
from the serial line looks like. Then, it's just a matter of
parsing it and feeding it into d.points.

Good luck,

>thanx in advance for the info,
>-jr-

--Darrell

James Darrell McCauley, Purdue Univ, West Lafayette, IN 47907-1146, USA
mccauley at ecn.purdue.edu, mccauley%ecn at purccvm.bitnet, pur-ee!mccauley
** will finish PhD/engr in 9/94 - need job. inquiries welcome (no hh, plz) **
** Personal WWW page URL ftp://pasture.ecn.purdue.edu/pub/mccauley/me.html **



More information about the grass-user mailing list