User Tools

Site Tools

Translations of this page:

AgOpenGPS Dokuwiki


* Important *

This software is for discussion and learning of Precision Ag algorithms and techniques. It is not in any way to be used on any physical equipment and is meant for use by a simulator only.

Any use of AgOpenGPS on real physical equipment is not allowed and is not recommended in any way, neither off road or on road.

It is completely unsafe and has no safety limits built in or implied.

AgOpenGPS is strictly an example of C# programming for demonstration purposes only and shall not be used for any other purpose.

Ag Precision Mapping and Section Control Software

This software reads NMEA strings for the purpose of recording and mapping position information for Agricultural use. Also it has up to 8 Section Control to control implements application of product preventing over-application.

Also outputs angle delta and distance from reference line for AB line and Contour guidance.

Included is an application, and source folders, along with UDP, TCP/IP, and serial NMEA simulators.

Step by Step Software & Hardware Setup

Follow these steps below.

Software and Tablet

AgOpenGPS runs on the Windows operating system. It uses the .NET framework (4.0 minimum).

The minimum screen resolution AgOpenGPS will work with is 1366 x 768.

1920 x 1080 is preferred, and of course the higher resolutions found on the Acer transformer 300, Acer Switch 12, Microsoft Surface, or Samsung work even better.

A Touchscreen is preferred to work with AgOpenGPS.

When selecting a tablet, ensure it has at least one USB port free with its charging cord plugged in. You need to charge the tablet and use a USB port for external hardware (arduino) at the same time. Agopengps will also use Ethernet in future so keep this in mind if you upgrading.

Download software from There are some repos:

agopen: is the actuall beta version agopengps: is an old stable version

  • Click AgOpen or agopengps:
  • Click green button: Clone or download / Download zip
  • unzip

Folder Contains:

  • agopen_dev: the software
    • Application: agopengps.exe -this is the software
    • Source: -this is the source code
  • arduino libaries: -you need this to program your arduino
  • Modules: -different modules of arduino code

GPS and visual guidiance

To start you can use any GPS receiver which can output NMEA data over a usb (serial) port. For further information see the upgrading section.

Now you can go through the menus and setup the software. For simple use with fertilizer and sprayer you are ready to go.

Section Control

You need an arduino uno/nano and

a reley board

First goto and download Arduino IDE.

You need it for the USB drivers and for setup of your arduino.

You find different version to use the section controll sketch.

you can use any of the autosteer (or etherneth version)

Go to your agopengps folder /Autosteer and open autosteer.ino

open relays.ino and uncomment as much lines you need for sections

void SetRelays(void)
    //use either "relay" for sections, or "uTurn" for uTurn signals and relays
    if (bitRead(relay,0)) bitSet(PORTD, 5); //Digital Pin 5
    else bitClear(PORTD, 5); 
    //if (bitRead(relay,1)) bitSet(PORTD, 6); //Digital Pin 6
    //else bitClear(PORTD, 6); 
    //if (bitRead(relay,2)) bitSet(PORTD, 7); //Digital Pin 7
    //else bitClear(PORTD, 7); 
    //if (bitRead(relay,3)) bitSet(PORTB, 0); //Digital Pin 8
    //else bitClear(PORTB, 0); 
    //if (bitRead(relay,4)) bitSet(PORTB, 1); //Digital Pin 9
    //else bitClear(PORTB, 1); 
    //if (bitRead(relay,5)) bitSet(PORTB, 2); //Digital Pin 10
    //else bitClear(PORTB, 2); 
    //if (bitRead(relay,6)) bitSet(PORTC, 4); //analog Pin A4
    //else bitClear(PORTC, 4); 
    //if (bitRead(relay,7)) bitSet(PORTC, 5); //Analog Pin A5
    //else bitClear(PORTC, 5); 

In this code you see always were you need to connect your relay board ( pin 6-10 and a4,a5)


Basic Steering Wheel Motor with Cytron Driver

you need an arduino uno/nano.

First goto and download Arduino IDE.

You need it for the USB drivers and for setup of your arduino.

Goto your agopengps folder /Autosteer and open autosteer.ino

select port and arduino type and try to upload to your arduino.

Tutorial on or

Basic wiring diagram for arduino

you need:

as motor controller

and a motor with ~300rpm like

(motor is 24 v but runs very well at 12 v)

Stable Power Supply: DC-DC buck converter that can output 5V might also want a second converter for a stable 12V source for powering USB hubs and inclinometer.

Steering Angle Sensor (Ride Height): Delphi ER10031

or for Canadians a cheaper ($5.99) version from Princess Auto Automotive Headlight Cover Lifter Sensor

Motor Controller: Cytron Technologies MD30C or IBT_2 43A Motor Driver also known as BTS7960B

Upgrading Agopengps

Software Setup

How AGOpen works

1. GPS sends position and heading info to AOG.

2. Either Arduino with BNO055 or Brick via usb, sends heading to AOG.

3. AOG then fuses the heading with the heading calculated from the current fix position and one a couple meters back and the heading of the BNO or Brick.

4. The AB line is a point and a heading - but think of it as a line with 2 points. you take the pivot point of vehicle and measure the distance from it to the nearest point of the AB Line. You also need a point forward on the line, called the look ahead point or goal point that you intend to drive towards. Then you draw a circle using the heading of the vehicle, and the goal point where the radius is twice the distance on the other side of the ABLine twice the distance the vehicle is away. The circle is tangent to the pivot point. Using the wheelbase of the vehicle you can then calculate the required steering angle to follow that circle to your goal point.

5. That steering angle is sent to the arduino, and the distance away from the AB Line (although the calcs are already done, it isn;t really needed but rather is used to turn steering control off and on.

6. The arduino sends the roll side to side ( the DOGS2) to AOG and then AOG changes the antenna position to match the movement of the antenna as it leans over.

7. The other job of the arduino is make sure the steering angle sensor value equals the steering setpoint set by AOG. The PID loop keeps moving the steering wheels to match that value sent.

8. The majority of the calcs and smarts are in AOG. The modules, like auto steer module, only have to control specific tasks - which makes them significantly easier to build.

9. There is a lot more going on in AOG, like boundaries, UTurn, OpenGL, GUI, and all the machine control stuff for AgraBot.

Button Functions

Keyboard Functions


  • L - Rest
  • K - Speed up
  • J - Stop
  • H - slow down
  • B . turn left
  • M - turn right
  • N - Zero steering


  • F - new Job
  • A - Autosteer
  • D - Section Auto On/off
  • A - Autosteer

First Test

Open agopgengps.exe, it is found in the application folder and has a little blue icon.

GPS simulator simulates NMEA GPS signals and will open automatically. You can tell by watching the GPS info box. The latitude will read and longitude will read and will say PPS fix. You can enter local simulator coordinates by going to the File menu at the top Left of the screen. This will require a restart of the program however.

If you want to connect a GPS receiver; config>ports will open the ports dialog box, from there you can select which com port your receiver is plugged into.

Creating Field Boundaries and Headlands

Boundary determines the outside edge of the field. If using Auto section control the sections will not work outside the field boundary. You shouldn't be driving outside the field boundary as there are often hedgerows and trees;-)

Headland is for controlling U-Turn functions. The headland can only be created after a field boundary is created.

Starting a Field Hit Start or File>Start Field then >Create New. Enter what you want to call the field. Then click start again then>Boundary.

Option A (driving) If you are driving around the outside of the field click >Outer then depending on if you are driving around the field clockwise or counterclockwise click the question mark/arrow button to change which side of tractor the boundary is being drawn (default is right side). Then click >Go. Then click >Record and drive around the outside edge of the field. When you've completed your lap around the field click >Done. Now your Boundary is complete.

Option B (Google Earth) If you want to create a boundary using Google Earth… Click> Google Earth and then once Google Earth opens click >add polygon or >add path. The pop-up window that appears has to stay open while you are drawing a polygon or path. Once you've outlined your field boundary, title it in the pop-up window and click >OK>File>Save>Save Place As. Save as KML file and not the default KMZ to your desired location. Then go back to AgOpenGPS and click >Load KML and voila your boundary is ready to go.

Creating a Headland This can only be done after a boundary is created. And you must be in AB or AB Curve mode for this to work.

Click >Start>Headland then choose how many tool widths you want in your headland and what percentage you would like your headland to be. In this window you can also edit the headland manually. Click > check mark icon and you're all set.


If something went wrong (eg. incorrect settings) and AgOpenGPS won't start properly.

There is a setting file which is stored in


Just delete the whole directory and start again.


AOG: Quite simply Ag Open GPS, an open source computer program for field guidance, navigation, and mapping started by Farmer Brian Tee

Arduino: refers to an open-source electronics platform or board and the software used to program it. (Techopedia)

BNO055: an IMU made by Adafruit

Brick: In these threads we're talking about a specific IMU made by TinkerForge

DOG2: An inclinometer made by TE connectivity

GitHub: A website where programmers can post their Open Source Code and collaborate with one another on certain projects.

IMU: Inertial Measurement Unit is an electronic device that measures and reports a body's specific force, angular rate, and sometimes the magnetic field surrounding the body, using a combination of accelerometers and gyroscopes, sometimes also magnetometers. IMUs are typically used to maneuver aircraft, including unmanned aerial vehicles (UAVs), among many others, and spacecraft, including satellites and landers. Recent developments allow for the production of IMU-enabled GPS devices. An IMU allows a GPS receiver to work when GPS-signals are unavailable, such as in tunnels, inside buildings, or when electronic interference is present.[1] A wireless IMU is known as a WIMU.[2][3][4][5] (Wikipedia)

Inclinometer: an instrument for measuring angles of slope (or tilt), elevation or depression of an object with respect to gravity. (Wikipedia)

L2: One of two frequencies sent out to a rover from an RTK enabled base station to correct positional inaccuracies in GPS location. L1 is the other frequency. L5 is another frequency to be released.

Non Reaction: With non-reaction steering units there is no corresponding movement of the steering wheel when the driver is not steering the vehicle.

OC: Open center steering units have open connection between pump and tank in the neutral position. In open center steering systems, pumps with fixed displacement are used.

Reaction Steering: With reaction steering units any external forces acting on the steered wheels result in a corresponding movement of the steering wheel when the driver is not steering the vehicle.

RTK: stands for Real Time Kinematics satellite navigation is a technique used to enhance the precision of position data derived from satellite-based positioning systems (global navigation satellite systems, GNSS) such as GPS, GLONASS, Galileo, and BeiDou. It uses measurements of the phase of the signal's carrier wave, rather than the information content of the signal, and relies on a single reference station or interpolated virtual station to provide real-time corrections, providing up to centimetre-level accuracy. With reference to GPS in particular, the system is commonly referred to as Carrier-Phase Enhancement, or CPGPS.[1] It has applications in land survey, hydrographic survey, and in consumer unmanned aerial vehicle navigation. (Wikipedia)

WAAS: Wide Area Augmentation System is a correction to the GPS signals implemented primarily in aviation. This is known internationally as an SBAS system.

WAS: Wheel Angle Sensor A wheel angle sensors job is to know the exact location of the steering wheels

XTE: Cross track error. The distance away from an AB line. =

other Wikis

Pictures Gallery pictures:start

start.txt · Last modified: 2018/11/06 20:00 by dokuwikiadmin