Changeset 1779

Show
Ignore:
Timestamp:
09/06/10 09:56:26 (21 months ago)
Author:
spf
Message:

try to give cw/ccw info in the WP boxes [See #34]

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/site/myboat.php

    r1775 r1779  
    171171         $status_content.="<br />"; 
    172172   
     173         $cwinfo = ""; 
     174         switch ($wp['wpformat'] & (WP_CROSS_CLOCKWISE|WP_CROSS_ANTI_CLOCKWISE)) { 
     175         case WP_CROSS_ANTI_CLOCKWISE: 
     176           $cwinfo = "&#21BA;"; 
     177           break; 
     178         case WP_CROSS_CLOCKWISE: 
     179           $cwinfo = "&#21BB;"; 
     180           break; 
     181         default: 
     182           $cwinfo = ""; 
     183         } 
    173184         if ( ($wp['wpformat'] & 0xF) == WP_TWO_BUOYS ) { 
    174185            $wp_north = max ($wp['latitude1'], $wp['latitude2']); 
     
    179190            $status_content.="Gate Coords=<b>" .  
    180191              round($wp['latitude1']/1000,3) . "," . round($wp['longitude1']/1000,3) .  
    181               " <----> " . round($wp['latitude2']/1000,3) . "," . round($wp['longitude2']/1000,3) . "</b>"; 
     192              " <----> " . round($wp['latitude2']/1000,3) . "," . round($wp['longitude2']/1000,3) . " $cwinfo </b>"; 
    182193         } else { 
    183194            $wp_south = $wp_north = $wp['latitude1']; 
     
    185196   
    186197                $status_content.="Waypoint Coords=<b>" .  
    187                                 round($wp_south/1000,3) . "," . round($wp_east/1000,3) . " ($wp_laisser_au)" . "</b><br />";  
     198                                round($wp_south/1000,3) . "," . round($wp_east/1000,3) . " ($wp_laisser_au) $cwinfo" . "</b><br />";  
    188199   
    189200         }