Java House
Crovatto - JcGpsSimulator
Italiano     English

JcGpsSimulator Version 1.4.0

October 2015, by Crovy

JcGpsSimulator is a software that allows you to simulate a gps receiver by sending some strings standard NMEA-0183 on the serial line. This software is created to simulate the change to coordinate at your desk! You can read the coordinates from a text file specially formatted or doing a query on a dbase MySql or SqlServer. This software, due to the driver to handle the serial line, it may only work on Windows operating systems and Linux. Since version 1.1.0 was also introduced the ability to export data in KML format that lets you view the locations on maps Google Earth.

Since version 1.2.1 of the JcGpsSimulator has been made a special installation program valid for both Windows and Linux. Just extract from the zip and run it. For installation need to be "Administrator" of the system because drivers for serial lines are installed in Java folder that generally can be found in sections accessible only to (root) Administrator.

After starting the program must load the coordinates. To do this there are two possibilities:

  • Upload a text file specially formatted;
  • Upload from dbase with specific queries;

Once loaded coordinates, to send it select a row of the table with the desired data.

Other options are:

  • Slide to change the position in a progressive manner between two coordinates. This slider is the distance in a straight line between two coordinates, the distance is in meters;
  • Selecting the serial line to be used;
  • Putting bit Status zero to simulate an incorrect receiving satellite signals;
  • Forcing the speed to zero km/h (normally transmitted a speed equal to 5 km/h);

JcGpsSimulator GPS

The strings sent by the simulator are as follows (each field is separated by a comma):

  • $GPGGA which contains the coordinates and status;
  • $GPZDA which contains the date and time;
  • $GPVTG which containing angle and speed;

Following a detailed three strings transmitted (the fields marked with an asterisk vary according to date and time, coordinates selected, check box "status" and check box "speed"; all other fields have fixed values):

$GPGGA,124449,4541.1290,N,009044.2310,E,1,04,02.00,000123.0,M,0036.0,M,13,0001 *4b[0D][0A] That now analyze field by field: - $ = Identification beginning frame; - GPGGA = Command; * 124449 = UTC -> 12h 44' 49"; * 4541.1290 = latitude -> 45 ° 41' e 1290' (fractional part); - N = Nord; * 009044.2310 = longitude -> 009 ° 44' e 2310' (fractional part); - E = EST; * 1 = GPS signal quality, 1 = valid data, 0 = data not available or incorrect; - 04 = Number of satellites used; - 02.00 = Not significant; - 000123.0 = Altitude; - M = Units of measure for altitude; - 0036.0 = Geoide altitude; - M = units o measure geoide altitude; - 13 = DGPS Timestamp; - 0001 = DGPS id Station; * *4b = checksum; - [0D][0A] = Representation of characters CR LF; $GPZDA,124451,28,09,2007,+00,00*62[0D][0A] That now analyze field by field: - $ = Identification beginning frame; - GPZDA = Command; * 124451 = UTC -> 12h 44' 51"; * 28 = UTC Day of the month; * 09 = UTC Months; * 2007 = UTC Years; - +00 = ora fuso orario locale; - 00 = Minute local time zone; * *62 = checksum - [0D][0A] = Representation of characters CR LF; $GPVTG,078.0,T,078.0,M,005.0,N,0005.0,K,A*13[0D][0A] That now analyze field by field: - $ = Identification beginning frame; - GPVTG = Command; * 078.0 = True angle in degrees; - T = Means TRUE; * 078.0 = Magnetic angle in degrees; - M = Means MAGNETIC; * 005.0 = speed in kts; - N = Means kNot; * 005.0 = speed in km/h; - K = Means km/h; - A = Indicator of how the system position, A:independently; * *13 = checksum - [0D][0A] = Representation of characters CR LF;

The parameters of the serial connection can not be modified and are as follows:

  • baud rate = 4800;
  • parity = No;
  • number of bit = 8;
  • number of stop bit = 1

The format of the text file containing the coordinates is as follows: [POSITIONS] Number=10 Pos00000=FEB000,2740035,584761,74 Pos00001=FEA001,2740071,584697,248 Pos00002=FEC003,2740429,584001,330 Pos00003=FEC004,2740753,584017,80 Pos00004=FEC005,2740824,584183,318 Pos00005=FEC006,2741129,584231,78 Pos00006=FEC007,2741152,584540,82 Pos00007=FEC008,2740601,584915,106 Pos00008=FEA006,2740468,585271,120 Pos00009=FEB002,2740021,584817,250 Pos00009=FXXXXX,4444444,999999,0

Following a short description of the format:

  • "[POSITION]" Starting of files, required;
  • "Number=" write the number of locations (record) below (in 10);
  • "Pos00000=FEB000,2740035,584761,74" records with data locations such compounds:
    • "Pos" reserved word to indicate the beginning of a new record;
    • "00000" write sequential number of records starting from scratch and always composed from 5 digits
    • "=" reserved character;
    • "FEB000" location name, write what you want;
    • "," reserved character;
    • "2740035" Latitude in thousandths of a degree;
    • "," reserved character;
    • "584761" Longitude in thousandths of a degree;
    • "," reserved character;
    • "74" Angle in degrees of the north;

Configuration hours passed from behind the gps system.

JcGpsSimulator TIME

Configuration connection and queries dbase MySql or MsSqlServer to extract data coordinates.

A sample query can be as follows:

SELECT code, LatMill, LongMill, Direction FROM tabPos

It must be evident that the four fields in the query are required course may have a different name, but must always be present in the query sequence sample.

JcGpsSimulator DB

For this program is not currently a manual.

Requires J2SE 5.0 (version 1.5) or higher, are not supported versions below.

Download the JcGpsSimulator 1.4.0 installer.

Since version 1.4.0 JcGpsSimulator uses the librariesRXTX which operate automatically (ie without creating a link) the usb-serial converters, of course, the operating system must always operate such converters at the driver level.

To Do List Version 1.4.0

October 2015, by Crovy
  • Display on a virtual map the coordinates;
  • Change the position transmitted by moving the mouse on the virtual map;

Known Bugs Version 1.4.0

October 2015, by Crovy
  • None.

Change Log

1.4.0 dated 02.10.15
  • Replaced the old and no longer supported libraries JavaComm with libraries RXTX;
1.3.2 dated 01.07.10
  • Fixed bug of coordinated management with different quadrant from North - East;
1.3.1 dated 19.05.10
  • Added the ability to change the baud rate of serial line;
  • Added sending of RMC string;
  • Added menu to select the GPS string to be sent;
  • Updated library sqljdbc.jar for allow the connection with the latest versions of SqlServer;
1.3.0 dated 10.02.09
  • Added slider to change the position in a progressive manner between two coordinates;
  • Added the ability to save and load the dbase parameters;
  • Added option to show always on top the application;
  • Added led to indicate the status of the serial connection;
  • Changed About window adding the license;
  • Rewrite layout code to delete the library layouts;
1.2.1 dated 31.10.08
  • Check the version of Java at start;
  • Now comes a setup program that prevents the manual installation of serial line driver;
1.2.0 dated 30.10.07
  • Increased frequency GPS sending strings, before it was sent one every second, now it is sent once every 250mS;
  • Fixed error on the continued allocation of memory;
1.1.0 dated 25.10.07
  • Developed saving coordinates to file (useful when the coordinates are imported through queries per dbase);
  • Developed cordinates export to a KML file format used by Google Earth, so it is possible to display the coordinates on maps Google Earth;
  • Developed connection to dbase MySql;
  • Fixed error on reading files of coordinates, if the name assigned to the position was made only by numbers the file was not loaded;
1.0.0 dated 09.03.07
  • Issuing the first version;