PWS Drifter Realtime Webpage Info

From Locl
Jump to navigationJump to search

Prince William Sound, Alaska Drifter Realtime Webpage Wiki

Page can be found at: http://pws.drifterdata.com or http://www.icess.ucsb.edu/drifter/realtime-PWS/, and it's help page here. Other deployment info can be found here.
This page is for displaying any Surface Velocity Program (SVP) in blue, Coast Guard SLDB (CG) in green, and Oil Spill Response (OSR) in red drifter tracks. The Iridium drifters will be on the normal realtime page.

File Locations

The data files must be uploaded (e.g. via ftp or sftp, for Mac one can use filezilla) to the ICESS network in this directory: /home/locl/file_sharing/PWS/. The filenames must be PWS_SVP_DATA.txt (SVP), PWS_CG_DATA.txt (Coast Guard), and PWS_OIL_DATA.txt (OSR). There are README files there to help with formatting. To not show a particular group's data, either empty the contents of the appropriate file or delete (or rename) it.

There is also a BOX_COORDINATES.txt there (and README file) for setting coordinates for a box.

File Formats

One thing to note is that fields which normally have a number must have a number, with the exception of SST which can instead have a "NaN". We really only care about 5 things (drifter_number, date/time, lat, lon, & SST), so if any of those other 4 fields are a "NaN" it should be skipped anyway since they contain critical information. As for any "non critical" columns, (e.g. "FoM" or "Batt volts" [if we set that up to be a valid column] or whatever) can contain anything since we're ignoring those columns anyway.

1) SVP. The info here still doesn't show which column will have the drifter number, so for now, I'm assuming it will be the first.
e.g.

% Pacific Gyre SVP  -   Drogue center: 10m   -  ARGOS telemetry
%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0

2) Coast Guard SLDMBs The email from Rob Cermak on Jul 9th @ 17:39 has this link
Right now, this is the format it's ready for this type format:

Shape|OBJECTID|Buoynum|ZDateTime|DateTime|Location
|1|38669|232030Z MAY 09|39956.85|20-57.453N  071-20.205W

3) Oil Spill Resp. For now it's setup to be exactly in the same format as the SVP (but with one header line instead of two)

e.g.

%  Drifter #  Date/Time (UTC)   Lat      Lon   FoM SST [C]
1234  2009/04/09 22:30:00 60.5503 -145.7611 1 5.0 

Parsing Files

The webpage code and parsing scripts all live here: /home/kirk/public_html/drifter/realtime-PWS/. The parsing scripts (those which breakdown the uploaded files) are named getdata.SVP.php, getdata.CG.php, and getdata.OSR.php. They are pretty self explanatory if they need to be edited for any reason. One thing to note is that they use regular expression (i.e. preg_match) checking to ensure that any misformatted data is skipped.

Other Notes

If for some reason, the javascript code needs to be edited, it's at /home/kirk/public_html/drifter/realtime-PWS/, and there are 2 main javascript files: ajax.js, map.js (with 'message.js' and 'YFT.js' providing less important support). Note that really, you want to edit the javascript files with __UNCOMPRESSED__ in their name (as the files w/o that in their name were compressed using this tool). If you want to use these uncompressed files, you need to edit the index.php file and set $USE_UNCOMPRESSED to 1.

Iridium Notes

These will show on the normal realtime page. If the drifter numbers to receive data for need tweaking, this file, /home/kirk/public_html/drifter/realtime/getdata.php, needs to be edited around line 425. Or to show more or less hour's worth of reports, edit the $NUM_HRS_TO_GET value on line 40 (currently set to 12).