How Accurate are UDAS True Winds? Charles L Williams, LT USN September 5, 2006 Naval Postgraduate School, Operational Oceanography and Meteorology Abstract Since inputs from UDAS are continuously used in projects at the Naval Postgraduate School, it is important to understand where these values come from. The goal of this project was to determine where UDAS gets the values to calculate true winds and if these values are valid. To due this a comparison of the raw GPS data and UDAS data was completed. A quick comparison of position data confirms that the raw GPS data is comparable to the UDAS data. Once this was completed, a comparison of ship s speed was done. This comparison showed variability that was inversely proportional to ship s speed. The raw GPS data showed significantly more variability with ship s course. Although both course and speed had variability, the ship s speed variability could be manipulated, by using a 60 second running mean, to be comparable to the UDAS data. However, this data was shown to consistently be approximately 0. 5 kts above the UDAS data. This difference was never explained. By applying the same method, the large variability of the raw GPS course data was minimized. Even with this manipulation, the GPS course data continued to be around 20 degrees different from the UDAS course over ground (COG). With further inspection of the raw GPS datastream, heading data was found. This data had low variability and is the correct data to use when converting from relative to true winds. This data was closer to the input used by UDAS, but still around 7 degrees apart. From inspecting all the raw data, the exact source used by UDAS to 1
convert to true winds was not determined. It was determined that neither course nor heading matched exactly to the conversion factor. The conversion from relative to true winds requires the ship s heading. Since the GPS Heading, and comparably UDAS Gyro, was off by several degrees, the UDAS input needs to be switched from whatever it is now, to the Heading input available in GPS. Introduction Inputs from UDAS are used in numerous projects at the Naval Postgraduate School (NPS). One of the inputs used is true winds. At the time of this paper, there was no known documentation as to how and where UDAS gets this data. It is known that UDAS measures relative winds from the instruments onboard the R/V Point Sur. Also there are two different Global Positioning System (GPS) instruments that UDAS retrieves position data from. What is not known is how the 1) Course Over Ground (COG), 2) Speed Over Ground (SOG), and 3) true winds are determined. Once this process is understood, the question of How Accurate are UDAS True Winds? can be evaluated. Data collection / Measurements In mid July 2006, the Summer Operational Oceanography and Meteorology Class went onboard the R/V Pont Sur. During the cruise, data was collected in two forms. One of these was UDAS, which automatically retrieved specified inputs every 36 seconds. The output of this data was user friendly and easily ingested into MatLab. The other form was raw GPS data retrieved directly from the Ashtech GPS receiver. Data collection of raw GPS data was less automatic. Once the computer was set up to receive 2
the GPS datastream, the data had to be manually started and stopped every 4 to 8 hours. This was done primarily to limit the size of the file, but also to allow immediate visual data inspection. During this process a few of the files were found to have errors. These errors occurred due to the information from the datastream not being saved to the file. Even after these files were thrown out, there was an abundance of data available for analysis. Data Analysis and Difficulties Once back at NPS the process of formatting the data and importing it into MatLab began. During this process it was discovered that the $ s that started each line of the GPS datastream tended to make importation nearly impossible. In hindsight, using a program such as WordPad to remove the $ s could have resolved this issue. Working through the data at the time, it was determined that importing the data into MS Excel was the best option. The problem with using MS Excel is that with the amount of rows of data in each file, MS Excel would only import the first 2.6 hours. With this in mind the fourth file (GPSO4. txt) was determined to be the best file to use. GPS04 was initiated just prior to getting on station and the datastream was subsequently cut-off immediately after leaving another station. Once the correct GPS datastream file was in MS Excel, the rows could be organize by the initial code in the line. The lines of code that were of interest in for this project were $GPGGA, $GPVTG and later $GPHDT (Adamchuk 2004). Global positioning system fixed data input is $GPGGA. This data block included UTC Time, Latitude, and 3
Longitude, among other inputs. COG and SOG inputs are retrieved from the $GPVTG block. Late in the project, and with some extra research (Baddeley 2001), it was discovered that the $GPHDT block contains heading information. Once these lines were manually extracted and correctly formatted the data analysis could begin. The file GPS04 was logged as starting near 0240Z and ending around 0655Z on the July 20, 2006. This time frame is associated with the UDAS data from the file b07202006.mdf. Since the files were of different lengths, the UDAS time had to be cropped to match the raw GPS data. Now that the exact time was known, the two data sets could be compared. The first comparison was that of position. Comparing the two UDAS position datasets and to that of the raw dataset. After analyzing this data, as seen in Figure 1, it was concluded that the raw dataset was acquired from the Ashtech GPS Receiver. Now that it was known which instrument the raw GPS data had come from, analysis of other information could begin. Since the goal of the study is to determine the accuracy of UDAS true winds, the equation to convert to true winds must be known. To convert between relative and true winds, Equation 1, obtained from Bowditch (1958), will be used. This equation is applicable for converting both direction and speed. To determine the accuracy of UDAS true winds, the variables used in the above equation must be evaluated. However, upon initial inspection of the raw GPS data, no heading information was available. The closest available variable was COG and SOG, which could be compared to the raw GPS course, both true and relative, and speed. 4
To start the analysis, a simple plot of the raw GPS data and the smoothed UDAS data was completed. This initial plot quickly made a time format complication apparent. As defined by Adamchuk (2004), the raw GPS time data came in the format hhmmss all in one column. When this is plotted there was a gap from 61-100 seconds and 61-100 minutes. After researching options in MatLab, it was determined that MatLab would convert to the hhmmss format but not from the format. The solution was to manually calculate the decimal day and convert the column inside of MS Excel. The UDAS data was much easier to work with. Using the decimalday.m file, the UDAS data could automatically be converted to the decimal day format. Now that the time was correctly formatted, it was clearly evident that there were large variabilities in the raw GPS course and speed data. As illustrated in Figure 2, one sees large variabilities that increase inversely to speed. Research done by Garcia (2002) indicates that these variabilities can be decreased by filtering out the wave period from the GPS datastream inputs. Unable to replicate the same process, a focus on establishing how UDAS COG and SOG are calculated was initiated. Of these two variables the speed was examined first because it contained the least variability. It was determined by visual inspection of Figure 2 that the Raw GPS speed measurements had variations around ±1.5 kts at low speeds and ±1 kt at higher speeds. Based on the wind instrument sampling frequency of 1 Hz, both of these variations have a minimal impact on variables that could be analyzed. 5
When analyzing the UDAS data, it was seen that UDAS takes samples every 36 seconds. If this is done with the raw GPS data the variations are much larger than seen in the UDAS data. From this information, it is deduced that there is some data manipulation of the raw GPS data prior to being input into UDAS. As seen in Figure 3, when a 60 second running mean is applied to the raw GPS data, the deviation decreases significantly. However, it becomes apparent that the GPS speed is always faster than the UDAS speed. Although this difference is noticeable, the difference was less than 0.5 kts. Without knowing exactly how UDAS calculated SOG, it can not be known why this occurs. As there were no other speed related measurements that could be drawn from the GPS datastream, this variance will have to be tolerated and the reason for the error between the two data sets will be left unidentified. The course variations were a larger problem. As visually measured from Figure 2, the range of variance in the raw GPS data was around ±100 degrees at lower speeds and ±20 degrees at higher speeds. From Garcia (2002) some of this variation was likely due to the pitch and roll of the ship induced by wave motion. As stated earlier, duplicating the method used by Garcia (2002) was not possible. With this large of variation, some form of data manipulation would be required. Using the same 60 second running mean applied in the speed analysis, it is shown that UDAS COG mirrors the true course input found in the raw GPS datastream (Figure 4). 6
However, it was found that neither UDAS nor GPS course (true or Magnetic) matched the input needed to get UDAS s difference between relative and true winds. Further investigation of the GPS datastream however, revealed a new option. One of the parameters found within the datastream is the ship s heading. The heading data has low variability (Figure 5) and does not seem to be influenced by the waves. The closest variable available from UDAS was the Gyro. Although the UDAS Gyro had similarities to the raw GPS Heading, the two data sets still diverged in a few instances. Now that the low variability of the GPS heading input has been established, the question of whether this input was used in calculating UDAS true winds must be asked. When comparing GPS Heading (or UDAS Gyro), UDAS COG and the difference between UDAS relative and true winds (Figure 6), it was determined that neither UDAS Gyro nor COG are an exact match to what was used to calculate true winds in UDAS. Results / Conclusions Although GPS data always had variability, the heading data s variability was minimal. The speed data s variability, when filtered through a 60 second running mean, was also negligible. However, the course data continued to have significant variability, which was likely added due to wave motion. To do a better analysis of the course data, wave motion must be removed. Garcia (2002) demonstrated a way to do this, but the exact period of the waves would be required to accurately remove this variability. Furthermore, the course input is not the input that should be used when calculating true Wind. From the definition in Bowditch (1958), heading is the input required to transfer 7
from relative to true winds. If the true wind data from UDAS is to be used, the conversion from relative to true winds needs to use the available GPS Heading Data. Another option, depending on how it is achieved, would be the UDAS Gyro input. From the calculations of this study, it was determined that the exact match for the input used to convert from relative winds to true winds used in UDAS was not the raw GPS Heading, UDAS Gyro, UDAS COG, raw GPS true course or raw GPS Magnetic course. Given there was no known documentation as to how UDAS calculates true winds, it can only be said that the UDAS Gyro and GPS Heading data were the closest to the input required to get the true winds the were recorded in UDAS. The UDAS Gyro input was also visually comparable to the raw GPS Heading data. Observing the large variations in the raw GPS data and the low variability in UDAS Data, the GPS data was obviously manipulated prior to being input as UDAS data. Recommendations If further research is done, the first step should be to create a manual or some other documentation that describe how and where UDAS gets its inputs. Once this is accomplished, further research into the variabilities of raw GPS course and speed inputs could be done. This research would follow Garcia (2002) and use MatLab s Signal Toolbox. If it is confirmed that UDAS does not use GPS heading, or similarly the UDAS Gyro, than UDAS should be reconfigured to use one of these inputs. How the current study was conducted, a primary course was held for approximately an hour and then the ship would slow to near zero while on station. 8
Although this is beneficial for examining high and low speeds, it is not the best method for examining course. Therefore, when collecting data for further studies, it would be beneficial to have the ship complete one or more large circles. This would enable a better analysis of course variability. These circles would also aid in the analysis of wave motion effects on GPS and UDAS data. Acknowledgements I would like to thank the crew of R/V Point Sur for there support and use of their vessel. I would also like to thank Professor Curtis Collins for being there when I had questions. He was willing to listen to the problem and help me work through it. I would especially like to thank Tarry Rago. His assistance throughout the project was crucial. Tarry setup the GPS receiver so that the data could be obtained and continued collecting data after I had left the ship. He also helped to decipher the GPS Data Stream and give vital information about UDAS. Thanks to everyone that helped me. 9
Figures: Figure 1: This is an example of a portion of the output from Raw Ashtech GPS Receiver datastream, Ship s Furuno through UDAS and Ashtech GPS Receiver through UDAS. Note the inset portion at the upper right. This is an enlarged area of the indicated portion. Figure 2: Comparison of (a) True and Magnetic course and (b) speed with UDAS (a) COG and (b) SOG over time. 10
Figure 3: Comparison between UDAS speed and raw GPS speed with a 60 second running mean applied. Notice that UDAS is always slower than the manipulated GPS data. Figure 4: Comparison of raw GPS, data looked at through a 60 second running mean, for Magnetic and True course to UDAS COG. 11
Figure 5: Plot of GPS Heading and UDAS Gyro. This plot illustrates the low variability of the raw GPS Heading input. It also shows a strong similarity to the UDAS Gyro input. Figure 6: Comparison between GPS Heading (or UDAS Gyro), UDAS COG and the difference between UDAS Relative and True winds from both the Port and Starboard wind instruments. Equation: Equation 1: Relative Wind Speed = True Wind Speed + Ship s Speed Relative Wind Direction = True Wind Direction + Ship s Heading 12
References: Garcia, Jorge F, LT USN. Use of directly obtained GPS velocity in the computation of winds and currents instead of a velocity derived from GPS position. Winter 2002. Naval Postgraduate School OC3570 (Operational Oceanography and Meteorology) paper. Bowditch, Nathaniel. American Practical Navigator: An Epitome of Navigation. 1958. U. S. Navy Hydrographic Office. Adamchuk, Viacheslav I. Untangling the GPS Data String. July, 14 2004. Precision Agriculture. Baddeley, Glenn. GPS - NMEA sentence information. 2001. http://aprs. gids. nl/nmea/. 13