Exemplo n.º 1
0
 public void reverse()
 {
     Bear     = CalcClass.Ang360(Bear - 180);
     BearErr  = (-1) * BearErr;
     ED       = (-1) * ED;
     EDErr    = (-1) * EDErr;
     Reversed = true; //reverse base
 }
Exemplo n.º 2
0
 private void txtBear_TextChanged(object sender, EventArgs e)
 {
     if (txtBear.Text.Trim() == "")
     {
         bf.sfs.BearManual = -1;
         bf.sfs.BearErr    = 0;
         bf.HAFLErr        = bf.sfs.BearErr;
         lblBearErr.Text   = "0";
     }
     else
     {
         bf.sfs.BearManual = CommonStr.ConvertDMSToDec(txtBear.Text);
         bf.sfs.BearErr    = CalcClass.CalcAngErr(bf.sfs.Bear, bf.sfs.BearManual);
         bf.HAFLErr        = bf.sfs.BearErr;
         lblBearErr.Text   = CommonStr.ConvertDecToDMS(bf.sfs.BearErr);
     }
 }
Exemplo n.º 3
0
        public int Read_Val_GUI(int ibcid)
        {
            bf.BCID = ibcid;

            bf.BSID = 0; // join will only need a st and fs
            bf.STID = st.pcid;
            bf.FSID = fs.pcid;
            bf.HAFL = 0;
            bf.HAFR = 0;
            CalcClass.CalcJoinBear(st.coord, fs.coord, bf.sfs, "deg");
            bf.CID         = 0;                                           //Class
            bf.EID         = 0;                                           //Errors
            bf.AUID        = GlobalLogon.AUID;
            bf.BLogID      = -1;                                          // get this later
            bf.LP          = Math.Max(st.LP, fs.LP);                      //make a line peg if one peg is a lp
            bf.CCnt        = 0;                                           //Calc Cnt
            bf.Grade       = 0;
            bf.GradeTypeID = 0;                                           // no grade
            bf.sbs.EDErr   = 0;                                           // no bs
            bf.sbs.HDErr   = 0;                                           // no bs
            bf.HAFLErr     = 0;                                           // calc bearing diff ????
            bf.HAFRErr     = 0;                                           // no ha
            bf.sfs.HDErr   = 0;                                           // calculated, no err
            bf.sfs.EDErr   = 0;                                           // calculated, no err
            bf.BSCnt       = 0;                                           // no bs
            bf.ArcCnt      = 0;                                           // no arc
            bf.FSCnt       = 1;                                           // fs
            bf.BaseID      = dmMain.Get_BaseIDbyPegIDs(bf.STID, bf.BSID); // find BaseID ???
            bf.MTID        = fs.MTID;                                     // take the fs mine and trav

            if (bf.sfs.BearManual > -1)
            {
                bf.CCID     = 2;                 // join with manual bearing
                bf.HAFLErr  = bf.sfs.BearErr;
                bf.sfs.Bear = bf.sfs.BearManual; //Manual Entered Bearing- Seen as the correct one
            }
            else
            {
                bf.CCID     = 1; // calculated join
                bf.sfs.Bear = bf.sfs.BearJoin;
            }

            return(1);
        }
Exemplo n.º 4
0
 public bool Reversed     = false; //reverse base
 public double Bear180()
 {
     return(CalcClass.Ang360(Bear - 180));
 }