My Tickets

Qinsy

Formats

Geo

Geo Format

Format

Example1

Example2

Example3

Example4

DMS

DDD;MM;SS.SSSSSH

71;27;07.63687N
87;07;42.02126E

27;13;31.93275N
90;01;58.04025W

7;46;46.95569S
12;01;27.44155E

56;33;01.03353N
3;13;22.98760E

DMM

DDD;MM.MMMMMMMH

71;27.1272811N
87;07.7003543E

27;13.5322125N
90;01.9673374W

7;46.7825948S
12;01.4573592E

56;33.0172255N
3;13.3831267E

DDD

±DDD.DDDDDDDDD

71.452121352
87.128339238

27.225536875
-90.032788957

-7.779709914
12.024289320

56.550287092
3.223052112

NMEA

DDDMM.MMMMMMM,H

7127.1272811,N
08707.7003543,E

2713.5322125,N
09001.9673374,W

0746.7825948,S
01201.4573592,E

5633.0172255,N
00313.3831267,E

UKOOA P2

DDDMMSS.SSSH (I3I2F6.3A1)

0712707.637N
0870742.021E

0271331.933N
0900158.040W

0074646.956S
0120127.442E

0563301.034N
0031322.988E

UKOOA Veripos

DDD MM.MMMMMMH (I2/I3 F6.6A1)

71 27.127281N
087 07.700354E

27 13.532213N
090 01.967337W

07 46.782595S
012 01.457359E

56 33.017226N
003 13.383127E

Radians

±R.RRRRRRRRRRRRRR (Degrees * PI / 180)

1.24707477512513
1.52067639149636

0.47517525909117
-1.57136860205500

-0.13578155284630
0.20986343884952

0.98698870270649
0.05625287132593

User Defined

#ddd°#0m'#0s.ss"#h (Default)

Free text, plus following format type specifiers:

#d   degrees
#m  minutes
#s   seconds
#h   Hemisphere character (N, E, S, W)
#i   Hemisphere sign (+, -)
0     Outline spaces with zero's

#d.d decimal degrees (negative when S or W)
#m.m decimal minutes
#s.s decimal seconds

Some format type examples:

#ddd    degrees, at least three characters
#0dd    degrees, 3 chars, zero outlined
#0m    minutes, zero outlined
#0s.sss    seconds, three decimal accuracy

For example, default geo format

  • DMS is the same as #0dd;#0m;#0s.sssss #h
  • DMM is the same as #0dd;#0m.mmmmmmm #h
  • DDD is the same as #0dd.ddddddddd #h
  • NMEA is the same as #d#0m#0s.ss,#h

71°27'07.64"N
 87°07'42.02"E

27°13'31.93"N
 90°01'58.04"W

7°46'46.96"S
 12°01'27.44"E

56°33'01.03"N
  3°13'22.99"E

Time

Time Format

Format

Example

HH:MM:SS

HH:MM:SS

11:18:53

HH:MM:SS.s

HH:MM:SS.S

11:18:53.1

HH:MM:SS.ss

HH:MM:SS.SS

11:18:53.12

HH:MM:SS.sss

HH:MM:SS.SSS

11:18:53.120

NMEA

HHMMSS.SS

111853.12

VisualWorksYYYYMMDDhhmmssddd

20120803114250937
(3 Aug 2012, 11:42:50.937)

OGP Px/11YYYY:MM:DD:HH:MM:SS.S2012:08:03:11:18:53.1
OGP Px/11 (variant)YYYY:JDD:HH:MM:SS.S2012:128:11:18:53.1

Local Setting for Time

__


Local Setting for Date

__


Seconds Since 1970
(aka UNIX time)

SSSSSSSSSS

1368029933

Seconds Since 1970 (s.sss)
(aka UNIX time)

SSSSSSSSSS.SSS

1368029933.120

Julian Day (001-366)

DDD

128

Time Span

Timespan < 24 hr: Same as user-defined specifier %H:%M:%S
Timespan >= 24 hr: Same as user-defined specifier #D d %H:%M:%S

11:18:53
1 d 11:18:53

User Defined

%H:%M:%S (Default)

Some format type specifiers you may use:

%H    Hour in 24-hour format (00-23)
%I    Hour in 12-hour format (01-12)
%M    Minute (00-59)
%S    Second (00-59)
%s    Millisecond (0-9)
%ss    Millisecond (00-99)
%sss    Millisecond (000-999)
%p    A.M./P.M. indicator for 12-hour clock

%j    Julian Day (001-366)
%d    Day (01-31)
%m    Month (01-12)
%b    Month name (abbreviated)
%B    Month name (full)
%y    Year without century (00-99)
%Y    Year with century

%X    Time representation for current locale
%x    Date representation for current locale
%c    Date and time representation for locale

%w    Weekday (0-6; Sunday is 0)
%a    Weekday name (abbreviated)
%A    Weekday name (full)
%U    Week of year, with Sunday as first day of week (00-53)
%W    Week of year, with Monday as first day of week (00-53)
%z, %Z    Either the time-zone name, or time zone abbreviation
%%    Percent sign

Advanced format type specifiers:

#X    XML dateTime (W3C Simple Type Scheme)
#J    Seconds Since 1970 (1-1-1970 00:00)
#D   Days Since 1970 (1-1-1970 00:00)
        Useful for user-defined formatting of a timespan.
        Days are not rounded, e.g. 1-1-1970 23:59 will be 0
#M   Seconds Since Midnight (0-86399)
#G   GPS Week Seconds (0-604799)
#W   GPS Week Number
#Y    Decimal Year with second resolution (8 decimals)

%s    Millisecond (0-9)
%ss    Millisecond (00-99)
%sss    Millisecond (000-999)

Format Examples:

NMEA time is by default formatted as:
%H%M%S.%ss

Seconds Since 1970 (s.sss) is by default formatted as:
#J.%sss


Number

Number Format


x

No decimals.
Normally used for integer values
Note that decimal values will be rounded, e.g. 0.1592 will be formatted as 0

x.x

One decimal accuracy
Values will be rounded automatically, e.g. 0.1592 will be formatted as 0.2

x.xx

Two decimal accuracy
Values will be rounded automatically, e.g. 0.1592 will be formatted as 0.16

x.xxx

Three decimal accuracy
Values will be rounded automatically, e.g. 0.1592 will be formatted as 0.159

x.xxxx

Four decimal accuracy
Values will be rounded automatically

User Defined

%d      (Default for integers)
%.2lf   (Default for floats)
Values will be rounded automatically
The user defined format specifier consists of optional and required fields and has the following form:

%[flags] [width] [.precision] type

Each field is a single character or a number signifying a particular format option.
The simplest format specification contains only the percent sign and a type character.

Full Technical Explanation

Resume:

  • Use %d for an integer type.
  • Use %f (or %lf) for a floating number type.
  • Use %e for scientific notation for a floating number type.
    E.g. 0.1234567 will be formatted as 1.235e-001 when using specifier %6.3e
  • See also additional advanced format type specifier here below.

Advanced format type specifiers:

  • #i or #I
    Sign character of the value ('+', '-' or ' ' when zero)
  • #B
    Binary representation of the (integer) value
    For example a value of 123 will be formatted as 1111011
  • Use %e__ for a scientific notation with two digits instead of three.
    For example 0.1234567 will be formatted as 1.235e-01 when using specifier %6.3e__

  • Use #STA for Station+Offset (USA) notation when your item is a Line Offset KP result.
    Notice that the default format specifier has no decimals in the Offset part
    #STA_   Station+Offset (1 decimal)
    #STA__  Station+Offset (2 decimals)
    #STA___ Station+Offset (3 decimals)


Example:

Suppose your output has to be a fixed string, always six characters long, the sign character must be visible and the accuracy must be two decimals.  So the outcome should look like ±xx.xx.

In order to achieve this you could use the following user-defined format specifier:

%+06.2lf

Explanation:

  • %lf means it is a (long) float number, and not an integer (otherwise you should use %d). Instead of %lf you may also use %f.
  • the 2 behind the dot means always two decimal accuracy.
  • the 6 in front of the dot means the entire number will be at least six characters long, including the sign and the decimal separator.
    Notice that when the value is larger, the number of characters will be greater.
  • the 0 in front of the 6 means that empty spaces will be filled with zeros.
  • the + sign means that the sign (+ or -) will always be visible.


Text

Text Format


Normal Text
User Defined

Some format type examples:

%s    normal text

%18s    at least 18 chars wide, right aligned

%-12s    at least 12 chars wide, left aligned

%5.5s    maximum 5 characters wide (i.e. text can be truncated)

#S    normal text, but all in UPPERCASE

#s    normal text, but all in lowercase

Comment

Text Format
Normal TextEnter your own free plain text
Binary

Enter one or more ASCII character codes (1..255), comma or space separated

For example enter '2' for <STX>, '3' for <ETX>, '13, 10' for <CR><LF> character

New LineSame as Binary, but without possible field delimiter. Default pre-formatted as <CR><LF>