Logo Search packages:      
Sourcecode: nautic version File versions  Download package

void Pos_Dialog::WritePosition ( wxPaintDC *  dc ) [private]

longitude

position longitude

Definition at line 313 of file Pos_dialog.cpp.

{
      double lon_d,lat_d,d_min;
      int deg, min, sec;
      wxString strlon, strlat,strcomt;
///longitude
      lon_d = Lon_d;
      if(lon_d < 0)
            lon_d = lon_d * (-1);
      deg = floor(lon_d);
      d_min = (lon_d - deg) * 60;
      min = floor(d_min);
      sec = (d_min - min) * 60;
      if(Lon_d >= 0)
      strlon = wxString::Format(_("E %02d : %02d : %02d"),deg,min,sec);
      if(Lon_d < 0)
      strlon = wxString::Format(_("W %02d : %02d : %02d"),deg,min,sec);

      dc->DrawText(strlon,280,610);
//latitude
      lat_d = Lat_d;
      if(lat_d < 0)
            lat_d = lat_d * (-1);
      deg = floor(lat_d);
      d_min = (lat_d - deg) * 60;
      min = floor(d_min);
      sec = (d_min - min) * 60;
      if(Lat_d >= 0)
      strlon = wxString::Format(_("N %02d : %02d : %02d"),deg,min,sec);
      if(Lat_d < 0)
      strlon = wxString::Format(_("S %02d : %02d : %02d"),deg,min,sec);
      dc->DrawText(strlon,30,280);
      /// position longitude
      lon_d = longitud;
      if(lon_d < 0)
            lon_d = lon_d * (-1);
      deg = floor(lon_d);
      d_min = (lon_d - deg) * 60;
      min = floor(d_min);
      sec = (d_min - min) * 60;
      strcomt = _("Position:");
      if(Lon_d >= 0)
      strlon = wxString::Format(_("Lon: E %02d : %02d : %02d"),deg,min,sec);
      if(Lon_d < 0)
      strlon = wxString::Format(_("Lon: W %02d : %02d : %02d"),deg,min,sec);
      dc->DrawText(strcomt,30,580);
      dc->DrawText(strlon,30,595);
      //latitude position
      
      lat_d = latitud;
      if(lat_d < 0)
            lat_d = lat_d * (-1);
      deg = floor(lat_d);
      d_min = (lat_d - deg) * 60;
      min = floor(d_min);
      sec = (d_min - min) * 60;
      if(Lat_d >= 0)
      strlon = wxString::Format(_("Lat : N %02d : %02d : %02d"),deg,min,sec);
      if(Lat_d < 0)
      strlon = wxString::Format(_("Lat : S %02d : %02d : %02d"),deg,min,sec);
      dc->DrawText(strlon,30,610);


}

Generated by  Doxygen 1.6.0   Back to index