Ejemplo n.º 1
0
        //Function to convert polar coordinates to Cartesian using the Coord structure (for Polar Alignment function)

        internal static eqmodvector.Coord EQ_pl2Cs_Polar(eqmodvector.Coord obj, double poffset)
        {
            eqmodvector.Coord       result = new eqmodvector.Coord();
            eqmodvector.CartesCoord tmpobj = eqmodvector.EQ_Polar2Cartes(obj.x, obj.Y - poffset, EQMath.gTot_step, EQMath.RAEncoder_Home_pos, EQMath.gDECEncoder_Home_pos);

            result.x = tmpobj.x;
            result.Y = tmpobj.Y;
            result.z = 1;

            return(result);
        }
Ejemplo n.º 2
0
        // Function to Normalize the Virtual Horizon Measurement data

        internal static eqmodvector.Coord EQNormalize_Polar(double Alt, double Az, double vhoriz)
        {
            // Transform Alt/Az data based on the horiz value

            // 90 degrees from the virtual horizon
            eqmodvector.Coord       result = new eqmodvector.Coord();
            eqmodvector.CartesCoord crt    = eqmodvector.EQ_Polar2Cartes(vhoriz + (EQMath.gTot_step / 4d), Alt, EQMath.gTot_step, 0, 0);

            // 180 degrees from the virtual horizon
            eqmodvector.CartesCoord crt2 = eqmodvector.EQ_Polar2Cartes(vhoriz + (EQMath.gTot_step / 2d), Az, EQMath.gTot_step, 0, 0);

            // Return the normalized data
            result.x = (crt.x + crt2.x) * -1;
            result.Y = crt.Y + crt2.Y;


            return(result);
        }
Ejemplo n.º 3
0
        //Implement an Affine transformation on a Polar coordinate system
        //This is done by converting the Polar Data to Cartesian, Apply affine transformation
        //then return the transformed coordinates

        internal static eqmodvector.Coord EQ_plAffineCartes(eqmodvector.Coord obj)
        {
            eqmodvector.Coord result  = new eqmodvector.Coord();
            eqmodvector.Coord tmpobj2 = new eqmodvector.Coord();

            eqmodvector.CartesCoord tmpobj1 = eqmodvector.EQ_Polar2Cartes(obj.x, obj.Y, EQMath.gTot_step, EQMath.RAEncoder_Home_pos, EQMath.gDECEncoder_Home_pos);

            tmpobj2.x = tmpobj1.x;
            tmpobj2.Y = tmpobj1.Y;
            tmpobj2.z = 1;

            eqmodvector.Coord tmpobj3 = eqmodvector.EQ_Transform_Affine(tmpobj2);

            result.x = tmpobj3.x;
            result.Y = tmpobj3.Y;
            result.z = 1;


            return(result);
        }