Changeset 250
- Timestamp:
- 04/20/09 14:22:42
- Files:
-
- scout/trunk/cdl_fixed_point.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
scout/trunk/cdl_fixed_point.pl
r246 r250 1 #Revisions 2 #Rev: 1.1.1.0 3 #Fixed up passing unitialized values for north/east current and mag/dir. Symptom was values being reported as 0 when really they were missing. 4 1 5 sub fixed_point() { 2 6 … … 2564 2568 @VectorDataVal = get_mag_and_dir( $ECurrentDataVal, $NCurrentDataVal, 1 ); 2565 2569 } 2570 #DWR v1.1.1.0 2571 #Initialize the array elements with NULL so if the data is either missing we correctly put the missing data flag. 2572 my $mag = 'NULL'; 2573 my $dir = 'NULL'; 2574 my $len = @VectorDataVal; 2575 if( $len == 2 ) 2576 { 2577 $mag = @VectorDataVal[0] * 100.0;#Convert to cm_s-1 2578 $dir = @VectorDataVal[1]; 2579 } 2566 2580 obsKMLSubRoutines::KMLAddObsToHash( 'current_to_direction', 2567 2581 $KMLTimeStamp[$k], 2568 @VectorDataVal[1],2582 $dir, 2569 2583 1, 2570 2584 $strPlatformID, … … 2576 2590 obsKMLSubRoutines::KMLAddObsToHash( 'current_speed', 2577 2591 $KMLTimeStamp[$k], 2578 ( @VectorDataVal[0] * 100.0 ), #Convert to cm_s-12592 $mag, 2579 2593 1, 2580 2594 $strPlatformID, … … 2590 2604 # $strUnits = obsKMLSubRoutines::CleanString( $sea_surface_northward_current[$i]{'units'} ); 2591 2605 #} 2606 #DWR v1.1.1.0 2607 #Fixed bug where data was missing, so $NCurrentDataVal would be NULL, but multiplying it by 100.0 would result in 0 so it appeared 2608 #to be a real observation 2609 if( $NCurrentDataVal != 'NULL' ) 2610 { 2611 $NCurrentDataVal * 100.0; #DWR convert to cm_s-1 2612 } 2592 2613 obsKMLSubRoutines::KMLAddObsToHash( 'northward_current', 2593 2614 $KMLTimeStamp[$k], 2594 $NCurrentDataVal * 100.0, #DWR convert to cm_s-12615 $NCurrentDataVal, #DWR convert to cm_s-1 2595 2616 1, 2596 2617 $strPlatformID, … … 2605 2626 # $strUnits = obsKMLSubRoutines::CleanString( $sea_surface_eastward_current[$i]{'units'} ); 2606 2627 #} 2628 #DWR v1.1.1.0 2629 #Fixed bug where data was missing, so $NCurrentDataVal would be NULL, but multiplying it by 100.0 would result in 0 so it appeared 2630 #to be a real observation 2631 if( $ECurrentDataVal != 'NULL' ) 2632 { 2633 $ECurrentDataVal * 100.0; #DWR convert to cm_s-1 2634 } 2635 2607 2636 obsKMLSubRoutines::KMLAddObsToHash( 'eastward_current', 2608 2637 $KMLTimeStamp[$k], 2609 $ECurrentDataVal * 100.0, #DWR convert to cm_s-12638 $ECurrentDataVal, #DWR convert to cm_s-1 2610 2639 1, 2611 2640 $strPlatformID,
