Beispiel #1
0
        public void ReadAngles(string filepathAngles)
        {
            var    reader = new StreamReader(filepathAngles);
            int    i;
            int    degree, minute;
            double second;
            int    k = 0;
            double value;

            for (i = 0; i < angleNum; i++)
            {
                netAngles[i] = new NetAngle();
            }

            while (!reader.EndOfStream)
            {
                var line = reader.ReadLine();
                var buf  = line.Split(',');
                netAngles[k].parent = Int32.Parse(buf[0]);
                netAngles[k].me     = Int32.Parse(buf[1]);
                netAngles[k].child  = Int32.Parse(buf[2]);
                degree             = Int32.Parse(buf[3]);
                minute             = Int32.Parse(buf[4]);
                second             = double.Parse(buf[5]);
                value              = degree * 3600 + minute * 60 + second;
                value              = IMathNet.ToRad(value);
                netAngles[k].value = value;
                k++;
            }
            reader.Close();
        }
Beispiel #2
0
        public static double Azimuth(NetPoint startPt, NetPoint endPt)
        {
            double azimuth;
            double dx = endPt.x - startPt.x;
            double dy = endPt.y - startPt.y;

            azimuth = IMathNet.Atan_2PI(dy, dx);
            return(azimuth);
        }