Matlab tool box

The current version of the Matlab tool box is 1.4.r43. You can download it by clicking on the link under Attachment at the bottom of this page, or using this link.

The most important file is script_regiolabtools.m. After unpacking the toolbox, open matlab and point the working directory to the directory in which you unpacked the toolbox. Open the script and read through it carefully. This script essentially will be your entry point of using the toolbox - below is a listing of the first couple of lines. Enter in that script your login credentials and choose between command line usage or using a GUI (or simply test both options).

The tool box furthermore contains the following files:

  • rl_bpsdecode.m: decode a Rijkswaterstaat BPS code
  • rl_decodebps.m: decode a Rijkswaterstaat BPS code
  • rl_estimatevariance.m: estimate variance from a matrix of speeds
  • rl_getregiolabdata.m: retrieve Simone or Monica data from Regiolab-Delft
  • rl_getregiolaburlstring.m: create url for retrieving Simone or Monica data from Regiolab-Delft
  • rl_HoLiFilter.m: Spatio Temporal filter
  • rl_MAX.m: anyone: please explain what this does...
  • rl_parseline.m: anyone: please explain what this does...
  • rl_pcolor.m: pseudo color plot
  • rl_plot.m: anyone: please explain what this does...
  • rl_retrievedata.m: anyone: please explain what this does...
  • rl_trajectory.m: calculate travel time estimates
  • rl_traj.m: calculate exit location and exit time
  • rl_urlread.m: fetch an URL with optional authentication
  • unique_nosort.m: returns unique values in a vector (in original order)
  • 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    
    %% Example script for the use of rl_getregiolabdata
    clear variables; clc;
     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % >>> set here your parameters of the data you would like to retrieve
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    % you have two options: use the command line version of the toolbox
    % use_gui = false; % or use the graphical user interface. 
    use_gui = true;
     
    % if you have set use_gui = true, there's nothing more you need to do, just
    % run this script. If you use the command line first set your username and
    % password in the following way (replace username and password with your
    % login codes)  
    userpwd = 'username:password;
     
    % Next you have again two choices. The first is to simply copy the
    % url string directly from the regiolab-delft.nl wizard (on the web), and to
    % set the field: use_urlstring = true, for example
    urlstring     =  'http://www.regiolab-delft.nl/drupalsubmit/simone.cgi?key=&fromdate=20101013&todate=20101013&fromtime=1500&totime=1800&aggregate=5&roadnumber=13&direction=R&mindist=11000&maxdist=16000&fromlane=0&untillane=31&dvkletter=&format=&retrieve=Submit+query';
    use_urlstring =  false; % set to true if you want to use this option
     
    % the other method is to construct the url by setting the following fields.
    % if you haven't ran the wizard on regiolab-delft yet, we recommend you try
    % this first!
    service    = 'simone';      % sensor type (obsolete)
    fromdate   = '20101101';    % start date of observation [yyyymmdd]
    todate     = '';            % end data of observation (empty = fromdate)
    fromtime   = '1500';        % start time of observation [hhmm]
    totime     = '1700';        % end time of observation (empty = fromtime)
    agg        = '5';           % aggregation over time period [min]
    mindist    = '10000';        % start position of observations [m]
    maxdist    = '18000';       % end position of observation
    roadnumber = '13';          % highway number
    direction  = 'L';           % highway direction ['R', 'L' or 'N']
    fromlane   = '0';           % start lane of observation
    tolane     = '31';          % end lane of observation
    agglane    = true;          % aggregate data over lanes
    filter     = 1;             % apply Adaptive Smoothing Method to reduce noise [logical]
    progress   = false;          % show progress bar [logical]
     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    % <<<< do not set any parameters below this line
     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%