Introduction
The Data Acquisition (DAQ) PC performs the following functions as part of the radar system:
- Turns the radar on and off
- Collects signals from the radar while it is running and convert those signals into radar data
- Pre-processes the radar data and convert to a portable format
- Backs up the data to a local drive
- Transmits the raw and processed data to CCE offices at OSU in Corvallis
The running system should do all these tasks automatically. This page will describe how the DAQ PC performs these functions, and how they are automated.
Relevant History
In a previous incarnation of the Newport wave radar, some of the functions listed in the Introduction were not performed by the DAQ PC. At that time, the radar was controlled by a separate laptop PC in the blockhouse, and no pre-processing or file format converting was done on-site. Thus, the only functions of the DAQ PC were to acquire data, backup to local drive and transmit to OSU. Also, in the former installation with the laptop, the command and control of the radar were performed manually on-site. This meant that the radar had to be turned on and then left running constantly, even when the radar wasn't collecting data.
Radar Command and Control
The Koden MDS-63R system is designed to be controlled via "RadarPC" software. This is marine mapping software that includes an integrated component that sends commands to the Radar Sensor Control Box (RSCB) via UDP packets. Multiple software options exist that include this capability (see here); the software that the OSU system uses is Windplot II from P-Sea.
In the past, the Newport Radar was configured and started with the P-Sea software, and then left to run indefinitely. The laptop (where the P-Sea softare was installed) was set up to automatically start up the radar after a power failure. In the near future, we hope that will be possible to start and stop the radar using batch scripts, and without the use of the P-Sea software. This is discussed below in the Wireshark section.
Control of the Radar with P-Sea Windplot II
See the separate page on P-Sea Windplot II here.
Control of the Radar Using Recorded UDP Packets (from Wireshark)
Autonomous Operation
The Newport Wave Radar System is designed to be started and left running unattended. This section outlines how this is done.
Windows Task Scheduler
The Task Scheduler that is included with Windows XP is used to automate the functions of the radar system, such that they occur in a timed loop. The following table details the tasks that are run each day. Tasks that are planned but not yet implemented are highlighted in gray.
Task Name | Description | Command | Schedule | Comments |
---|---|---|---|---|
1loadRBFs | Program the FPGA "gateware" (.RBF file) onto the DAQ board's FPGA | C:\1MarineWinXP\1loadRBFs.bat | 12 minutes after the hour, every hour, every day | |
1loadRBFs_b | Program the FPGA "gateware" (.RBF file) onto the DAQ board's FPGA, again. This is in case the first load doesn't work. | C:\1MarineWinXP\1loadRBFs.bat | 13 minutes after the hour, every hour, every day | |
2LoadPar | Load the configuration (octopus.par file) to the DAQ board. | C:\1MarineWinXP\2LoadPar.bat | 14 minutes after the hour, every hour, every day | |
collect | Command the DAQ board to collect radar data. | C:\1MarineWinXP\collect.bat | 15 minutes after the hour, every hour, every day | The duration of the collection (number of rotations) is specified in collect.bat. |
movefiles | Move the data files just collected to the current day's directory. Also copy the files to the backup drive. | C:\1MarineWinXP\movefiles.bat | 19 minutes after the hour, every hour, every day | NOTE: This should be adjusted based on the duration of the collection. If more rotations are collected, this task should be delayed until later in the hour. |
newradarupload | Use rsync (via Cygwin) to synchronize the current day's folder with the scratch drive at OSU. | C:\1MarineWinXP\radarupload.bat | 40 minutes after the hour, every hour, every day | TODO: We should rsync into the past some number of days. That way, if a network outage occured overnight, the previous day's collections would still be syncronized. |
mktoday | Make a folder for the current day's collections. | C:\1MarineWinXP\mktoday.bat | 12:00 AM every day | TODO: We may be able to do away with this if we can make movefiles.bat create the folders if they don't already exist. |
Network Configuration and Remote Access
SSH
A Cygwin SSH server is running on port 6522 of the DAQ PC. In the Services panel it is called "CYGWIN sshd". Ports 6500-6599 of the DAQ PC are accessible to the Internet through the SWAP network.This is why the SSH server is running on port 6522.
To ssh into the DAQ PC from The Internet, use the commands:
OpenSSH | ssh -p 6522 daq-user@swapgate.shipops.orst.edu |
---|---|
PuTTY | <path-to-PuTTY> -ssh -P 6522 -l daq-user swapgate.shipops.orst.edu |
It is possible to connect to the DAQ PC with Remote Desktop through SSH using SSH tunneling. To do this, first open the ssh connection with a tunnel for the Remote Desktop Protocol (note addition of the -L option):
OpenSSH | ssh -p 6522 -L 33389:localhost:3389 daq-user@swapgate.shipops.orst.edu |
---|---|
PuTTY | <path-to-PuTTY> -ssh -P 6522 -l daq-user -L 33389:localhost:3389 swapgate.shipops.orst.edu |
This makes all traffic sent from the client PC to it's local interface (localhost) at port 33389 is automatically routed to port 3389 (the RDP port) on the ssh server.
To connect with Remote Desktop (assuming Windows):
- Open the Remote Desktop client
- Set the Computer: field to "localhost:33389".
- To save on bandwidth, do the following:
- Select the Options >> button.
- On the Display tab, set the Colors to "High Color (16 bit)", or lower.
- On the Local Resources tab, set Remote computer sound to "Do not play".
- On the Local Resources tab, deselect the Printers checkbox.
- On the Local Resources tab, select the More button, and make sure no checkboxes are checked in the resulting dialog.
- On the Experience tab, select "Modem (28.8 Kbps)" for the connection speed.