
                             NMEA statistics utility

                              NMEASTAT.exe Ver1.28

                               Jan. 2015 (C)4river

Summary.

  NMEASTAT calculates and displays 2drms etc. reading the NMEA log file of the GPS receiver.
  Reading of a CSV file and ".pos" file of RTKLIB is also supported.
    Note) "Field Separator" of ".pos" file should be made comma ",".

  Operating condition.
     Operational OS: Windows 8(Desktop), Windows 7, Windows Vista, Windows XP.


Feature.
  1) The horizontal, horizontal south-north, horizontal east-west, and altitude 2drms are 
     calculating displayed.
  2) The mean value in the latitude longitude and the altitude is displayed.
  3) The read valid data can be output as CSV file.
     Appending a "_s" in the output file name if the CSV file input.


Install.
  In installation just copies executable file NMEASTAT.exe in the suitable folder.
  Because registry is not used, it can Un-install with only the deletion of NMEASTAT.exe and
  NMEASTAT.ini

  Note1) The Program Files folder cannot be written since Windows Vista.
         If possible, please install NMEASTAT.exe in a folder besides "Program Files".


Usage.

 1. Reading and recalculation of log file.

    The extension of the NMEA log file is either ".nmea", ".nme", ".nma", ".txt", ".log" or ".ubx".
    The extension of the NMEA log file is either ".csv" or ".pos".
    TReading of a logfile can be performed by the following 3 ways.
    1) It reads from an open dialog by main menu "File" -> "Load file".
    2) It reads by drag & drop.
    3) The file fixed by the command line option when starting is read.

    To limit the range, "Count range" of the main menu is clicked.
    Click the "Set" button after specifying the calculation range at time, and click "Recount" of a main menu.
    When "Reset" is clicked, it returns it to all selective states.

 2. Selection of standard coordinates.

    It selects by the radiobutton of "Satndard coodinates" group box.
      Average coodinates: 2drms is calculated based on the mean value of input data.
      True coordinates:   2drms is calculated based on coordinates specified in "True coordinates" group box.

    Input of "True coordinates" group box.
      LatitudeF  Input it like   3539'31.04"N,  35 39 31.04 N,   35.65862222 etc
      Longitude:  Input it like -10020'30",     100 20 30 W,    -100.34166666 etc.
      Alt.:       Input it like  123.4m, 404.85ft, 0.076677mi, 0.06663nm (Default is a meter).
      Paste Ave.: A click will paste the value of an "Average" group box.

      Attention) The upper of dd mm in the case of dd mm ss.ssss format can not be omitted.
                 12.3456" be entered in the 00'12.3456" or 0 0 12.3456

 3. Option of graphical representation

    Auto range: To enable the auto-ranging.
    Monotone:   The plot is done in the solid black when checking it. 
                The gradation is displayed at the appearance frequency when not checking it.
    Pixels:     The number of drawing pixels is specified (1 to 25).

 4. Content of display

    2drms
      Horizontal: 2drm horizontal value is displayed. 
      Altitude:   2drm value of the altitude is displayed. 
      East-West:  2drms value only of the direction of east-west is displayed.
      North-South:2drms value only of the direction of south-north is displayed. 

    Average
      Latitude:   The mean value of latitude is displayed.
      Longitude:  The mean value of longitude is displayed.
      Altitude:   The mean value of altitude is displayed. 
      DGPS:       The ratio that measures DGPS is displayed with %.

    Peak of error
      Horizontal: The peak value of the horizontal error from average value is displayed.
      Altitude:   The peak value of the Altitude error from average value is displayed.

    Statistics
      Mean values, minimum values and the maximum values of HDOP, VDOP, PDOP and the number of 
      use satellites are displayed.
      In the parentheses of "Used Sat", the number of GLONASS+QZSS+BD of using satellites is displayed.
        Ex) 16(4) : The total of the use satellite is 16 and the number of use satellites of GLONASS and QZSS and BD is 4.

    Difference between average and true
      The difference with a mean value and true coordinates is displayed.
      Horizontal:  A horizontal difference is displayed.
      Altitude:    The difference of the direction of height is displayed.
      East-West:   The difference only of the direction of east and west is displayed.
      North-South: The difference only for the south north is displayed.

    Graphical representation
      A horizontal position is plotted.
      The center is a mean value, and the azimuth becomes the N, E, S, W from the upper part 
      clockwise. 
      The scale can be changed from 1mm to 10,000km by a Up-Down button of the lower right.

 5. Output of result

    The output can be specified from the main menu.
    File -> Print form: A form screen is printed on the printer by the bit map.
    File -> Copy Form:  A form screen is copied onto the clipboard by the bit map.
    File -> Print Text: Data is printed on the printer in the text.
    File -> Copy Text:  Data is copied onto the clipboard by the text.

    Operation that the right-click of the mouse on form is also the same can be performed.

 6. Output of CSV file

    The Reduce dialog is displayed with "File" -> "Save to CSV". 
    It thins out according to the condition when the condition is set and the "Reduce" button 
    is clicked and it outputs it.
    All data is output disregarding the condition when the "All" button is clicked. 

    The difference from average at an altitude and the horizontal position is adding output by 
    "File" -> "Save to CSV with error".
      Height err: Difference from mean value in altitude (m).
      E-W err:    Difference from mean value in direction of east and west (m).
      N-S err:    Difference from mean value for the south north (m).
      Hor. err:   Difference from mean value at the horizontal position (m).

 7. Average is output to the CSV file.

    "Average condition" dialog is displayed by "File" -> "Save average to CSV".
    The latitude longitude and the altitude that averages on the condition of setting it are output to the CSV file.

    Start time : The start time of the processed data is specified (UTC).
      Day :   Rounded up less than Date.
      Houre : Rounded up less than Time.
    Final time : The finish time of the processed data is specified (UTC).
      Day :   Cut off under Date.
      Houre : Cut off under Time.
    Averaging span : Averaging period. 
    Time stepping :  Stepping interval of average start time ( 15 minutes are input by 0.25 ).
    Excessive erro is ignored : The data which became diremption more than the designation value from a mean is ignored.
                                The average from "Start time" to "Final time" is used for the mean value.

    Ex) Output setting:
        Start time= 2015/01/01 9:00:00
        Final time= 2015/01/03 9:00:00
        Averaging span= 24h
        Time stepping =  2h

        Content of output:
                Time                       Range of average
        2015/01/01 09:00:00  2015/01/01 09:00:00 to 2015/01/02 08:59:5
        2015/01/01 11:00:00  2015/01/01 11:00:00 to 2015/01/02 10:59:5
        2015/01/01 13:00:00  2015/01/01 13:00:00 to 2015/01/02 12:59:5
        ...
        2015/01/02 07:00:00  2015/01/02 07:00:00 to 2015/01/03 06:59:5
        2015/01/02 09:00:00  2015/01/02 09:00:00 to 2015/01/03 08:59:5

 8. Commandline option.

    The specified file is processed by specifying the NMEA log file.
    An arbitrary option file is applicable by the specification of the configuration file.
    The extension of the configuration file is limited to ".ini".
      Ex) NMEASTAT test.nmea

    When the blank is included in path or the file name, it is necessary to enclose it with
    double quotes(").
      Ex) NMEASTAT "C:\Documents and Settings\User\test.nmea"

 9. Drag & drop.
 
    The NMEA log file and the configuration file are processed and an arbitrary log file can be
    processed to the execution file icon or the form by dragging it.

 10. Option setting.

    Option -> Option setting
      Shading of graph
        The gradation by the occurrence rate is set (Brightest>Darkest).
        Brightest: The upper bound of brightness is specified (0-255).
        Darkest:   The lower bound of brightness is specified (0-255).
      CSV option
        The output form of the CSV output at time of the date is specified.
        Date + time,:  When the check is removed, the date and time are separate output.
      Number of decimals of display
        The digit number under the decimal point of the numerical value on a screen is specified.
        Latitude,Longitude: Digit number under decimal point in latitude longitude (0=Auto).
        Distance, 2drms:    Digit number under the decimal point of distance and 2drms (0=Auto).
        Altitude:           Digit number under decimal point of height.
        DOP:                Digit number under decimal point of DOP.
      Number of decimals of then CSV output
        The digit number under the decimal point of the numerical value of the CSV output file is specified.
        Latitude,Longitude: Digit number under decimal point in latitude longitude.
        Distance, 2drms:    Digit number under the decimal point of distance and 2drms.
        Altitude:           Digit number under decimal point of height.
        DOP:                Digit number under decimal point of DOP.
        Speed:              Digit number under decimal point of speed.
      NMEA,CSV
        Fix quality:        The measurement quality condition is specified.
        HDOP<=:             The upper bound of effective HDOP is specified.
      RTKLIB
        Quality flag:       The measurement quality condition is specified.

    Option -> Font setting
      The display font is set

11. Configuration file (NMEASTAT.ini)

   The options setting when ending is preserved in NMEASTAT.ini of the same to execution 
   file folder. 
   Two or more configuration files are preserved and it is possible to select it with 
   the command line or the drug & drop. 
   When the folder with the configuration file is read-only, it copies onto folder 
   %APPDATA%\NMEASTAT\ and it uses it. 
   %APPDATA% is a folder displayed to input by the DOS prompt as "echo %APPDATA%" <Enter>.

  1) [Option] Section
     The option setting, the reading folder, and the display position are preserved.
       DataPath:    Reading folder.
       NMEAext:     List of NMEA file extension name.
       CSVext:      List of CSV file extension name.
       RTKLIBext:   RTKLIB file extension name.
       CSV_SepTime: The format of the Time of a CSV output is specified.
                      0: The date and time are output to one column.
                      1: The date and time are output in a separate column.
       MaxColor:    Minimum value of gradation scale brightness (0 to 255).
       MinColor:    Maximum value of gradation scale brightness (0 to 255).
       PosDecimal:  Digit number below decimal point in latitude and longitude (3 to 6, 0:Auto).
       AltDecimal:  Digit number below decimal point of height (1 to 5, 0:Auto).
       TrueLat:     Latitude of true coordinates.
       TrueLon:     Longitude of true coordinates.
       TrueAlt:     Height of true coordinates.
       LeapSecond:  Difference of time of GPS time and UTC (second).

  2) [Font] Section
     Information on the display font is preserved.
     The change by the user is also possible. 

     Initial values of font specification other than Japanese.
       EngCharset=0
       EngFontName=Courier New
       EngFontSize=9

     Initial value of Japanese font.
       JpCharset=1
       JpFontName=MS Gothic
       JpFontSize=10

  3) [CSVdecimals] Section
       LatLon: Number of decimals in Latitude and Longitude.
       Alt:    Number of decimals in Altitude.
       Speed:  Number of decimals at Speed.
       DOP:    Number of decimals of HDOP, VDOP and PDOP.
       Error:  Number of decimals of difference from mean value.

  4) [CSVitem] section.
     The item name of the CSV input file can be specified.
     Two or more names can be specified by delimiting by comma (,) .
       RCR      : Record method(Time, Button, Voice).
       Date     : Date.
       Time     : Time.
       Valid    : GPS quality indication.
       Latitude : Latitude.
       NS       : North/South.
       Longitude: Longitude.
       EW       : East/West.
       Height   : Altitude.
       Speed    : Speed.
       HDOP     : HDOP.
       Nsat     : Number of satellites (Used/View).
       Geoid    : Geoide height.

  5)  [CSV_Info] section.
      The GPS name individually processed and the CSV item for the distinction are described
      (The user can add it).
      Format: GPSname=Unique CSV item
      Ex) i-gotU=Course,Type,Distance,Essential
          RTKLIB=height(m),Q,ns,sdn(m),sde(m),sdu(m),sdne(m),sdeu(m),sdun(m),age(s),ratio

  6) [CSV_Option] section.
     The content of processing to the GPS name is specified (The user can add it).
     GPS name "Default" is applied to all GPS outside specification.
     Format: GPSname=Param1,Param2,Param3,Pram4,Param5

       Param1: Date time.
         0: UTC.
         1: Local time.
       Param2: Altitude.
         0: Indetermination.
         1: Mean sea level (Geoid setting is ignored).
       Param3: Date update error.
         0: No error.
         1: With error.
       Param4: Speed unit.
         0: Km/h.
         1: mph.
         2: knot.
       Param5: Altitude unit.
         0: m.
         1: feet.
       Param6: POI is double recording.
         0: No double record.
         1: Double recording system.
       Param7: Modification coefficients at speed.
         Blank: With no compensation.
         0.001: Change speed into 1/1000.
     Ex) Default=0,0,0
         Wintec=1,1,0
         i-gotU=0,1,0,0,0,1,0.001

The notes of 2drms measurement.

  1. Measure at the place which the open sky.
  2. Use the data after 12 minute after Fix.
  3. At least 24 hours or more are required for observed time (Integral multiples of 23.934444 hours are preferable).
     Reference) http://homepage2.nifty.com/k8/gps/ErrorChart.htm


Limitations and notes.

  1) A correct value cannot be displayed by the data of the high latitude region in the vicinity
     of the pole.
  2) Long measured data at the open fixed location of the sky is necessary for calculation of 2drms.
  3) Since satellite arrangement changes by the region and latitude to be used, the value of 2drms 
     is also changed.
  4) In Garmin GLO, since the number of GSA sentences is one, the number of the satellites used of 
     GLONASS cannot be displayed.
  5) Since 2drms is the indication of the variation in an observed value, it is unrelated to accuracy 
     of position.
  6) The GPS receiver where "Static navigation" cannot turn OFF cannot perform measurement of 2drms.


Used compiler and component.

    In compiler used
      CodeGear Delphi 2007 Professional(Delphi for Win32)   Borland Software Corp.


Release note.

 * This application is the free software.
 * It does not prohibit redistribution, but *.txt and NMEASTAT.exe including the set of distribution.
 * The author takes no responsibility to any losses and obstacles which were produced by use or
   distribution of this application.


Version history.

  Ver1.28
    1. The CSV file output of the mean value that specified the span and the step was enabled.

  Ver1.27
    1. Latitude longitude format dd mm ss.sss and ddmm'ss.sss" of CSV was processed.

  Ver1.26
    1. The error at the Start-time by an illegal RMC sentence was prevented.

  Ver1.25
    1. Label of the result display was changed to Edit (Select & Copy were possible).
    2. The pop-up menu by right-clicking of the mouse was abolished.
    3. The input format 1234' 56".789 was accepted.
    4. A numeric input of the exponential notation was enabled.

 Ver1.24
    1. The Galileo sentence was supported.
    2. "Mode Indicator" of two or more characters was supported for the GNGNS sentence.

 Ver1.23
    1. When an option setup is changed, it redraws automatically.
    2. A subform display position was not fixed.

 Ver1.22
    1. The CSV file and ".pos" file of RTKLIB were supported.
    2. The Fix quality condition was added to NMEA and CSV.
    3. The setting of the HDOP upper bound was moved to an optional form.

 Ver1.21
    1. An option setting form was added.
    2. The font setting menu was added.
    3. ON/OFF of the automatic range was enabled.

 Ver1.20
    1. The user can specify true coordinates.
    2. The digit number below the decimal point in the latitude longitude and the altitude
       was able to be specified by the configuration file.
    3. The range of the graph display has been enhanced to 1mm to 10,000km.
    4. The display range of the graph was set up automatically.
    5. The drawing pixel was able to be selected from 1(1x1) to 25(5x5) pixel.

 Ver1.19
    1. The BDS(BeiDou Navigation Satellite System) sentence was supported (BDGGA, BDRMC, BDGSA).

 Vwer1.18
    1. Numerical precision shortage of the CSV output was corrected.

 Ver1.17
    1. Unjust operation when data size is excessive was corrected.

 Ver1.16
    1. ".ubx" was added to the extension name of default.
    2. The file of the unregistered extension name was tried as NMEA.

 Ver1.15 Aug. 2013
    1. Reading NMEA and the CSV file was changed to the BlockRead procedure
       (The text where the end of line contained only Cr or Lf and Null was supported).
    2. Percent display of reading the text was added (Reading is aborted with the Esc key).
    3. When limited a count range, the range of the graph indication linked.

  Ver1.14
    1. A font size "Count range" form has been adjusted.

  Ver1.13
   1. When DPI on the display was changed, the layout was maintained (The adjustment of the fontsize is necessary).
   2. An optional font was made to become to effective in "Reduce" and the "CountRange" form.

  Ver1.12
    1. The tolerance was improved to the lack of the NMEA input line.
    2. The gradation scale of the graph was added.
    3. The range of the graph gradation scale was able to be specified by the configuration file (default value: 20 to 200).

  Ver1.11
    1. Progress of 2drms was added to the CSV output in "Save to CSV with error".
    2. The range of the calculation was able to be specified at the time.

  Ver1.10
    1. The NMEA sentence where the number of items was insufficient was disregarded.

  Ver1.09
   1. "(GLONASS+QZSS)" was adding displayed in reports of the number of use satellites.
   2. The HDOP limitation function was added.
   3. The recount menu was added.
   4. "DopLimit" of the [Option] section was abolished.

  Ver1.08
    1. Processing when the longitude stepped over +-180 degrees was corrected.
    2. "N-S err" and "E-W err" of the CSV output were made with the sign.
    3. The unit of the speed of the CSV output was changed from knot to km/h.
    4. The time of the CSV output was made "Date + time" (It can specify by a configuration file).
    5. The upper bound value to be judged the mean value of each DOP and the peak value was able to be 
       specified by the configuration file (The default value is 99.0).

  Ver1.07
    1. Time was adding displayed in the maximum value of the error to the mean value in the horizontal 
       and vertical direction.
    2. An optional output of the error from the mean value at an altitude and the horizontal position 
       can be added to the CSV output.
    3. The number of decimals of the CSV output was able to be specified by the configuration file.

  Ver1.06
    1. The display of the peak value of the error from average value was added (Horizontal and Altitude).

  Ver1.05 Feb. 2013
    1. Sentence $GNGGA, $GNRMC, and $GNGNS were supported.
    2. The bug that used the HDOP frequency for the average frequency of VDOP and PDOP was corrected.

  Ver1.04 Dec. 2009
    1. It corresponds to extension name ".nma".
       The correspondence extension name was able to be specified by the configuration file.
    2. The "Reduce" form was displayed at the center of the main form.
    3. The dialog was displayed at the center of the form.

  Ver1.03 Mar. 2008
    1. A defect of MemoryStream processing was corrected.
    2. Scale preservation reading of a track graph was corrected.
    3. The indication point of Reduce dialogue was made the desktop center.

  Ver1.02 Mar. 2008
    1. The thinning out function of the CSV output was added. 
    2. In order to be able to process with NMEA2KMZ, the item name of 1st line of CSV output 
       was modified.

  Ver1.01 Feb. 2008
    1. Added a CSV file output function.
    2. Measures when the configuration file was in a read-only folder were added.
    3. The processing of the parameter of E/W in the longitude of the GGA sentence was corrected. 

  Ver1.00beta Sep. 2007 Beta editions.
