Exemple #1
0
        public CVehicle(FormGPS _f)
        {
            //constructor
            mf  = _f;
            ast = new CAutoSteer();

            isPivotBehindAntenna = Properties.Vehicle.Default.setVehicle_isPivotBehindAntenna;
            antennaHeight        = Properties.Vehicle.Default.setVehicle_antennaHeight;
            antennaPivot         = Properties.Vehicle.Default.setVehicle_antennaPivot;
            antennaOffset        = Properties.Vehicle.Default.setVehicle_antennaOffset;

            wheelbase        = Properties.Vehicle.Default.setVehicle_wheelbase;
            minTurningRadius = Properties.Vehicle.Default.setVehicle_minTurningRadius;
            isSteerAxleAhead = Properties.Vehicle.Default.setVehicle_isSteerAxleAhead;

            slowSpeedCutoff = Properties.Vehicle.Default.setVehicle_slowSpeedCutoff;

            goalPointLookAheadSeconds         = Properties.Vehicle.Default.setVehicle_goalPointLookAhead;
            goalPointLookAheadMinimumDistance = Properties.Vehicle.Default.setVehicle_lookAheadMinimum;
            goalPointDistanceMultiplier       = Properties.Vehicle.Default.setVehicle_lookAheadDistanceFromLine;
            goalPointLookAheadUturnMult       = Properties.Vehicle.Default.setVehicle_goalPointLookAheadUturnMult;

            stanleyDistanceErrorGain = Properties.Vehicle.Default.stanleyDistanceErrorGain;
            stanleyHeadingErrorGain  = Properties.Vehicle.Default.stanleyHeadingErrorGain;

            maxAngularVelocity = Properties.Vehicle.Default.setVehicle_maxAngularVelocity;
            maxSteerAngle      = Properties.Vehicle.Default.setVehicle_maxSteerAngle;

            isHydLiftOn = false;

            trackWidth = Properties.Vehicle.Default.setVehicle_trackWidth;

            stanleyIntegralGainAB = Properties.Vehicle.Default.stanleyIntegralGainAB;
            stanleyIntegralDistanceAwayTriggerAB = Properties.Vehicle.Default.stanleyIntegralDistanceAwayTriggerAB;

            purePursuitIntegralGain = Properties.Vehicle.Default.purePursuitIntegralGainAB;
            vehicleType             = Properties.Vehicle.Default.setVehicle_vehicleType;

            hydLiftLookAheadTime = Properties.Vehicle.Default.setVehicle_hydraulicLiftLookAhead;
        }
Exemple #2
0
        // Constructor, Initializes a new instance of the "FormGPS" class.
        public FormGPS()
        {
            //winform initialization
            InitializeComponent();

            //build the gesture structures
            SetupStructSizes();

            //create a new section and set left and right positions
            //created whether used or not, saves restarting program
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                section[j] = new CSection(this);
            }

            //  Get the OpenGL object.
            OpenGL gl     = openGLControl.OpenGL;
            OpenGL glBack = openGLControlBack.OpenGL;

            //create the world grid
            worldGrid = new CWorldGrid(gl, this);

            //our vehicle made with gl object and pointer of mainform
            vehicle = new CVehicle(gl, this);

            //our NMEA parser
            pn = new CNMEA(this);

            //create the ABLine instance
            ABLine = new CABLine(gl, this);

            //new instance of contour mode
            ct = new CContour(gl, this);

            //new instance of contour mode
            curve = new CABCurve(gl, this);

            //new instance of auto headland turn
            yt = new CYouTurn(gl, glBack, this);

            //module communication
            mc = new CModuleComm(this);

            //perimeter list object
            periArea = new CPerimeter(gl);

            //boundary object
            bnd = new CBoundary(gl, glBack, this);

            //boundaries array
            for (int j = 0; j < MAXBOUNDARIES; j++)
            {
                bndArr[j] = new CBoundaryLines(gl, glBack, this);
            }

            //headland object
            hl = new CHeadland(gl, this);

            //headlands array
            for (int j = 0; j < MAXHEADS; j++)
            {
                hlArr[j] = new CHeadlandLines(gl, this);
            }

            //rate object for dual flowmeters
            rcd = new CDualRate(this);

            //headland entry/exit sequences
            seq = new CSequence(this);

            //nmea simulator built in.
            sim = new CSim(this);

            //all the autosteer objects
            ast = new CAutoSteer(this);

            //all the attitude, heading, roll, pitch reference system
            ahrs = new CAHRS(this);

            //A recorded path
            recPath = new CRecordedPath(gl, this);

            //A generated Path
            genPath = new CGenPath(gl, this);

            //start the stopwatch
            swFrame.Start();

            //resource for gloabal language strings
            _rm = new ResourceManager("AgOpenGPS.gStr", Assembly.GetExecutingAssembly());
        }