May 25, 2007

OSS hits the beach in Florida

Author: Robert D. Currier

Driving to your favorite beach only to find it covered with dead fish is no fun. Scientists at Mote Marine Laboratory in Sarasota, Florida, have eliminated the guessing game by using Linux and open source software to give surf seekers some cool online tools for picking the best beach.

The beaches of southwest Florida are among the best in the nation. Soft white sand, warm water, and low surf combine to make a beach outing with the family a popular pastime. Unfortunately for beachgoers, the Gulf of Mexico can also provide a not-so-pleasant experience: a red tide bloom.

Red tide is caused by microscopic algae and can turn a beautiful beach into a stinking wasteland of dead fish and murky brown water. The blooms are unpredictable and may occur without notice. With a slight shift in water currents or wind direction, a previously clean beach can be rendered unusable in a few hours.

Mote researchers have teamed up with the Sarasota County lifeguards to build a real-time beach conditions reporting system that allows the public to view current conditions at their favorite strip of sand.

The lifeguards patrol the six public beaches of Sarasota County seven days a week and are able to make on-the-spot assessments of dead fish, water color, respiratory irritation, wind direction, and surf conditions. While the reports are subjective, with no measurements taken, they provide an eyewitness account of current beach conditions.

Reporting in

The beach conditions reporting system is built from four components: a number of BlackBerry 7250 handhelds, a Web site with an embedded Google Maps display, a MySQL database, and a data entry form using PHP and HTML.

We chose the BlackBerry 7250 because it was advertised as shipping with GPS capabilities. Our initial design called for an application on the BlackBerry to acquire a GPS fix and use the position info to validate the transaction. We wanted to be certain that the reports for Siesta Key Beach were coming from Siesta Key and not from the local Starbucks. Unfortunately, we discovered that "built-in GPS" didn't mean the BlackBerry had true GPS functionality. The 7250 has "assisted GPS," which allows emergency services to locate a caller, but doesn't provide latitude and longitude.

The lack of true GPS meant that it wasn't worth the investment in time to develop a native BlackBerry application. However, we decided to take advantage of the Blackberry's built-in Web browser and use a submission form hosted on our Web server. Security is provided by an .htaccess file.

Navigating a complex Web page while walking on the beach can be difficult, so we chose to keep the form simple and easy to use. Lifeguards choose their location and select the appropriate radio buttons for numbers of dead fish, respiratory irritation, water color, wind direction, and surf conditions. A click on the submit button and the information is stored in a MySQL database.

The MySQL database is the core of the system. Hosted on a Dell 2850 running CentOS 4, the database has three tables. A locations table stores the latitude and longitude of each beach and is queried to generate the placemarkers for the Google Map display. The reports table has a field for each radio button on the submission form. Finally, the survey table contains the results of our user survey, which asks the public how helpful they felt the beach reporting system is and whether they would like to see the service in use all year, not just during the red tide season.

We use Google Maps to present the data. Its interface is familiar to most people and the API is well documented. JavaScript embedded in the main Web page queries the MySQL database and retrieves the latitude and longitude of each beach. The locations are passed to Google Maps and a placemarker is inserted on the map at each reporting location. Clicking on the placemarker pops up an infobox that gives the current reported conditions: name of the beach, the date and time of the last report, number of dead fish, water color, wind direction, surf conditions, and what beach flag is flying. Everything that a prospective beachgoer needs to know is only one click away.

Big bang, low bucks

The beach reporting system has been well-received by the public. Since going live last September 1, the site has averaged 1,200 hits per day, been written up in local newspapers, and covered by the regional television network affiliates. Not bad for a system that was built in just a few days for minimal money using open source software.

Bob Currier is a data technology specialist at Mote Marine Laboratory in Sarasota, Florida. He recently retired from a 20-year career at Duke University, where he served as director of data and telecommunications. His credits include features, reviews, and opinion pieces in Network World,, Smart Computing, and PC Computing.


  • Open Source
Click Here!