08.06.2013 Views

Bernese GPS Software Version 5.0 - Bernese GNSS Software

Bernese GPS Software Version 5.0 - Bernese GNSS Software

Bernese GPS Software Version 5.0 - Bernese GNSS Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

19.6.5.6 Define Time Variables<br />

19.6 User Scripts<br />

With the method RUNBPE::getKeys all predefined time variables of the menu are accessible<br />

in the BPE user scripts. This method can only be used within the environment of the BPE<br />

client. The module ${X}/EXE/Gps Date.pm, on the other hand, can also be used outside<br />

a BPE script (e.g., to start a BPE). The utility allows for all types of date and time<br />

conversions. Date and time strings in different formats are accepted as input. The output<br />

format can be specified separately:<br />

gps_date("-yd 02 143", "-o %X"); # 2002-MAY-31<br />

gps_date("-ymd 2002 5 31","-o COD%W%w"); # COD11685<br />

@time = gps_date("-mjd 52417.5", "-o %Y %j %I"); # Fill three values in an array<br />

scalar(gps_date("-mjd 52417.5","-o %Y %j %I")); # 2002 143 M<br />

gps_date("-yd 02 143","-d +5","-o %y%j"); # 02148<br />

The last line of this example demonstrates the possibility to add or subtract a number of<br />

days (hours or weeks). The important difference to the predefined time variables provided<br />

by the menu is that ${X}/EXE/Gps Date.pm works independently from the session table.<br />

For the complete list of input and output options we refer to the help display shown in<br />

Figure 19.10.<br />

Usage: gps date <br />

[ -hms | -hid TIMSTR ]<br />

[ -h | -d | -w +/-INT ]<br />

[ -o OUTSTR ]<br />

[ -v ]<br />

Supported DATSTR: -ymd .. yy|yyyy mm|mon dd with delimiters [- \s]+<br />

-yd .. yy|yyyy doy|sess|doyid with delimiters [- \s]+<br />

-mjd .. ddddd[.ddddd]<br />

-wd .. wwww d with delimiters [- \s]+<br />

TIMSTR: -hms .. hh|id mm ss with delimiters [-:\s]+<br />

-hid .. hh|id work for hours only<br />

OUTSTR: -o .. any text + spec.chars<br />

Spec. chars: year = %y %Y = [00-99] [1999]<br />

month = %m %b %B %C = [01-12] [jan-dec] [JAN-DEC] [Jan-Dec]<br />

day = %d = [01-31]<br />

doy = %j = [001-365]<br />

dow = %w = [0-6] (Sun=0, Sat=6)<br />

gpsweek = %W = [0-????]<br />

modjul = %J = [?????]<br />

hour,id = %H %I %i = [00-23] [A-X] [a-x] (A=00,..,X=23)<br />

min = %M = [00-59]<br />

sec = %S = [00-59]<br />

dattim = %V %v = [YYYY-MM-DD HH:MM:SS] [YYYY-MON-DD HH:MM:SS]<br />

dat = %X %x = [YYYY-MM-DD] [YYYY-MON-DD]<br />

tim = %Z = [HH-MM-SS]<br />

seconds = %U = seconds from 1.1.1970<br />

spec = %t %n %% = "\tab" "\newline" "%"<br />

pads = %: % = "any pad","blank pad", (default="0 pad")<br />

Figure 19.10: Options for module Gps Date.pm.<br />

<strong>Bernese</strong> <strong>GPS</strong> <strong>Software</strong> <strong>Version</strong> <strong>5.0</strong> Page 407

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!