Tree Planning

I have everything setup with GPS and have built my field boundaries. Im trying to plant trees every X feet and using the “Tree Planting Mode” but id like to have the rows pre-setup so that i can use AGOpenGPS for a straight line and the tree planting mode would just show when to plant (drill hole with auger). How would I pre-populate each row for straight line guidance with each row a certain spacing?

2 Likes

I also want to do the same thing.
I thought I’d mark the lines first in one direction and later at 90 degrees.

@kriskirkland and @Edo, I’ll be testing out some code for use with the tree planter this weekend and next week, so I’ll be able to better answer your questions then. In the mean time, if you haven’t seen this video Tree Planting in AgOpenGPS - YouTube I’d suggest watching it. Just note that the setup shown is now done in the flyout.

I’ll get back with you in a few days.

thanks, it’s interesting.
the problem is that we plant 6x6 meters. the rows must have an angle of 90 degrees to each other.
a video example:

I watched your video, Edo. It appears to me that the crosshatch that is being made is to make a “X marks the spot” to plant the tree?

I plant an a 20 ft grid, so we are using the same grid. I’m planting chestnut trees how about you?

You can make this crosshatch by setting your first AB line to 180 degrees and a second one at 90. With a RTK fix and well tuned system you will be within a tolerance that the human eye won’t pickup. You just won’t see the cross hatch on the screen until the field is done.

I have a single section 20 ft tool set up in AOG. I’ll make a headland at 30 ft, this will be where the first tree is planted. Drive to next 20 ft drill my hole and repeat till the row is done at which time the software guides the u-turn to the 20 ft offset and repeat the process. I’ll end up with the same 20 ft grid as what your video showed. I made a hole auger that hangs on the front of the tractor to drill the holes to plant in.

If I’m not answering your question please let me know.

In the screen shot below the 251 is the distance to the next tree. The grid is based on the tool width. In this one it is 10 meters. The typical ABline is the purple one on the page, the light purple is the 90 degree tree location. It is based on the refpoint of the ABline. It steps away from the refpoint the same as the ABLine only at 90 degrees. It counts up to it and then away from it. This bases it on the pivot axle but can be modified to the center of the tool or what ever. More than a few ways to calculate, but I just stole Brian’s code and turned it 90 degrees (Math.PI/2).

image

Here it has just passed and is 111 away.

image

This is the code. I put it in the CABLine.cs, about line 388 or so. The distance text writer has to be edited to write the distance info. And there are a few new variables that must be declared earlier in the CABLine.cs. But it will work if someone wants to give it a go.

                ninetyABLineP1.easting = point1.easting - (Math.Sin(abHeading + Math.PI / 2) * 1600.0);
                ninetyABLineP1.northing = point1.northing - (Math.Cos(abHeading + Math.PI / 2) * 1600.0);

                ninetyABLineP2.easting = point1.easting + (Math.Sin(abHeading + Math.PI / 2) * 1600.0);
                ninetyABLineP2.northing = point1.northing + (Math.Cos(abHeading + Math.PI / 2) * 1600.0);
                dx = ninetyABLineP2.easting - ninetyABLineP1.easting;
                //z2-z1
                dy = ninetyABLineP2.northing - ninetyABLineP1.northing;
                distanceFromRefLine90 = ((dy * pivot.easting) - (dx * pivot.northing) + (ninetyABLineP2.easting
                                        * ninetyABLineP1.northing) - (ninetyABLineP2.northing * ninetyABLineP1.easting))
                                            / Math.Sqrt((dy * dy) + (dx * dx));
                if (distanceFromRefLine90 > 0) refLineSide90 = -1;
                else refLineSide90 = 1;
                distanceFromRefLine90 = Math.Abs(distanceFromRefLine90);
                howManyPathsAway90 = Math.Round(distanceFromRefLine90 / widthMinusOverlap, 0, MidpointRounding.AwayFromZero);

                if (isABSameAsVehicleHeading)
                {
                    point1 = new vec2((Math.Cos(-abHeading + Math.PI / 2) * ((widthMinusOverlap * howManyPathsAway90 * refLineSide90) - toolOffset)) + refPoint1.easting,
                    (Math.Sin(-abHeading + Math.PI / 2) * ((widthMinusOverlap * howManyPathsAway90 * refLineSide90) - toolOffset)) + refPoint1.northing);
                }
                else
                {
                    point1 = new vec2((Math.Cos(-abHeading + Math.PI / 2) * ((widthMinusOverlap * howManyPathsAway90 * refLineSide90) + toolOffset)) + refPoint1.easting,
                        (Math.Sin(-abHeading + Math.PI / 2) * ((widthMinusOverlap * howManyPathsAway90 * refLineSide90) + toolOffset)) + refPoint1.northing);
                }

                
                ninetyABLineP1.easting = point1.easting - (Math.Sin(abHeading+Math.PI/2) * 1600.0);
                ninetyABLineP1.northing = point1.northing - (Math.Cos(abHeading + Math.PI / 2) * 1600.0);

                ninetyABLineP2.easting = point1.easting + (Math.Sin(abHeading + Math.PI / 2) * 1600.0);
                ninetyABLineP2.northing = point1.northing + (Math.Cos(abHeading + Math.PI / 2) * 1600.0);

                dx = ninetyABLineP2.easting - ninetyABLineP1.easting;
                //z2-z1
                dy = ninetyABLineP2.northing - ninetyABLineP1.northing;
                distanceFromRefLine90 = ((dy * pivot.easting) - (dx * pivot.northing) + (ninetyABLineP2.easting
                                        * ninetyABLineP1.northing) - (ninetyABLineP2.northing * ninetyABLineP1.easting))
                                            / Math.Sqrt((dy * dy) + (dx * dx));
                distanceFromRefLine90 = Math.Round(distanceFromRefLine90 * 1000.0, MidpointRounding.AwayFromZero);
1 Like

exactly I create the point X to drill. i’m planting poplars … can you make the hole directly with the drill? which receivers do you use?

Great!
can you make a video when you will use it?

Here is a short video of it running. As it moves along, the horizontal line is tool width spacings from the A point of the ABLine.

Just rename the file and drop the .txt,

TreeGrid.avi.txt (1.6 MB)

Good.
Have you tested it in the field?
What do you want to plant?

I’ve not tested. Just thought it may be useful at a later date. I want to get the AOG-Survey to read points in a square grid. Also, lots of Pecan groves destroyed down here by Hurricane Michael. May can be a help as we replant the local groves.

@KentStuff Have you made any more progress? Id like to test your changes, would you be available to chat via discord (or other means) ?

No, been busy working. Need to make a few adjustments. Then I will post the program. I may go back to the latest code to add it. My edit is much different with the survey and contour in the ABdraw form.

Great, i would like to try the program with the drill this winter

Working with a new tree planter design.

Using the ABDraw, It builds a grid of points from a reference point A. Right now it is still at north and south layout. Working on allowing a rotation along an ABLine.

Each tree has its own point and data.

image

image

3 Likes

Update:
It will autoplant to the center of the field or pick the A point and it will layout columns and rows per the grid. It will rotate to an angle. It will save points to a file and read that file upon opening the field. It will only plant inside the geofence (based on the settings). Highlights the closet tree. Now for the driving to the trees and activating the tool.

Here is the GitHub link to the program. Unzip the Program4 folder. AOG-Tree.exe

image

image

image

5 Likes

@KentStuff,
I’m watching this with great interest. Great job!!

Modified the ABDraw Arr list to include the trees. Now you can pick the ABline based on the trees.

Here it is driving the ABLine/TreeLine. Notice the tree that it is over is green. It is highlighting the u-turn skipping two rows and falling back into the third row.

image

Here is the ABDraw with both the lines following the trees.

image

More Changes:

Now it tells how far you are from the tree in that line. Right now ABline must be drawn and running autosteer. In the screen shot below it is 229 cm from the tool center to the green tree.

image

Now it’s 340 cm past the same tree.

image

Still have a problem of getting to always measure the same side. Some times it is reversed. When the ABLine is 90 degrees from this one, the arrow is backward. I know it has something to do with the sin and cos. but haven’t been able to correct it yet.

Here is the latest program file on github:

It now writes to the KML file for goole earth and shows up as trees.

image

3 Likes

@KentStuff, taking this to Google earth is NICE!!

Thanks. The kml file allows anyone with the file with or without AOG to find the location. Other apps can use the data.

While in Google Earth you can click on any tree or other object and save that file separate and send to someone else.