Grade control

Using just open grade you have to draw your line by hand. For an auto generated grade line for Open grade to follow you would have to use something like opti surface I think.

is there also a dual version with 2x gnss?
for operating the blade at 2 different points.

1 Like

@ludo
here is a video from @BrianTee_Admin 's original Opengrade. Mine basically works the same but with more settings.

Here is a picture of my last opengrade v2.1.2
opengrade

You can change the view dist in the blue zone. (it have a little bug,sometimes you have to switch units back and forth to make the change)
You can see the dist under ground at the botton right
After the line is draw you can move the whole is the top green zone.

There are no way to generate auto lines right now.
Opengrade3D will not work for tilling, exept maybe with an hacked optisurface map :thinking:.

@jdros no dual gps or angle sensor so far and it is not in my near future plan, not enough time for all my projects! There is absolutely nothing in the code ready for this.

1 Like

I am working a little bit on OpenGrade right now. I added a “swath” saving feature.
You can save your recorded pass now. It output in a file called “swath.txt”
A list of points with:
easting, heading, northing,
altitude, (the Ground altitude(from the closest survey pt))
latitude, longitude,
cutAltitude, (the red line altitude)
realPassAltitude, (the tool altitude)
SwathNbr.
Yellow are the saved, green is the current.
So there is at least a record now if someone want lay tiles.
@KentStuff Do you know now to create an .kml from this list? It’s swathList in the code.
opengrade

Now I will try to build an auto path for the red line, with the min slope, min max and ideal depth.
Also I will add a button to switch the survey line so you can survey from one side or the other.
Both OpenGrade and OpenGrade3D have and update in their beta branch on github, there were some bugs in the last releases.

1 Like

Sort of. The points are just a lot of flags. If it is a line, then you loose the information at each point. You showed a kml file in the other thread. Post one of them here. I’d like to see how they formatted it.

1 Like

here is the thread. It could be usefull in both.

@KentStuff Yes I would like to make the same thing but It’s an shp file, I think it’s not readable with notepad.
Coverage.shp.txt (173,1 Ko)
Coverage.dbf.txt (175,8 Ko)
Coverage.shx.txt (6,9 Ko)

I made the file record the pts 1 meter apart.
It’s probably doable in .kml format, AOG also output each swath with his color so there is probably a way to give more attribute to each pts.
Or find an shapefile .shp writer?

I will try to implement my other ideas before I try this. Or maybe someone will have figured it out :wink:

1 Like

Probably can using the kml. This is the tree one because I already had it. The values are given in the program and then displayed with the tree is clicked in GE.

image

Formatted:
image

1 Like

Here is what I came up with.

Swath.kml.txt (32.9 KB)

image

I used the stringwriter and added to the kml writer.

Replace with this at the top of the file.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using System.Globalization;
using System.Drawing;
using System.Xml;
using System.Text;

And then this near the bottom of the file.

and call it from the close field.

public void FileSaveFieldKML()
        {
            //get the directory and make sure it exists, create if not
            string dirField = fieldsDirectory + currentFieldDirectory + "\\";

            string directoryName = Path.GetDirectoryName(dirField);
            if ((directoryName.Length > 0) && (!Directory.Exists(directoryName)))
            { Directory.CreateDirectory(directoryName); }

            string myFileName;
            myFileName = "Swath.kml";

            XmlTextWriter kml = new XmlTextWriter(dirField + myFileName, Encoding.UTF8);

            kml.Formatting = Formatting.Indented;
            kml.Indentation = 3;

            kml.WriteStartDocument();
            kml.WriteStartElement("kml", "http://www.opengis.net/kml/2.2");
            kml.WriteStartElement("Document");

            

            //SWath  *************************************************************************
            if (ct.swathList.Count() > 0)
            {
                kml.WriteStartElement("Folder");
                kml.WriteElementString("name", "Swath");
                string Balloon = "\r<Style id=\"balloon\">";
                Balloon += "\r\t<BalloonStyle>";
                Balloon += "\r\t\t<text>";

                Balloon += "\r\t\t\t<![CDATA[<b><font size=5>Field:</font><br>" + currentFieldDirectory + "</b><br><hr><table border=\"0\"";
                Balloon += "\r\t\t\t\t<tr><td><b>Swath:</b><td><td>$[Numb]</td></tr>";
                Balloon += "\r\t\t\t\t<tr><td><b>Altitude:</b><td><td>$[alt]</td></tr>";
                Balloon += "\r\t\t\t\t<tr><td><b>Cut Altitude:</b><td><td>$[Calt]</td></tr>";
                Balloon += "\r\t\t\t\t<tr><td><b>Pass Altitude:</b><td><td>$[Palt]</td></tr>";
                Balloon += "\r\t\t\t\t<tr><td><b>Latitude:</b><td><td>$[lat]</td></tr>";
                Balloon += "\r\t\t\t\t<tr><td><b>Longitude:</b><td><td>$[lon]</td></tr>";
                Balloon += "\r\t\t\t</table>]]>";

                Balloon += "\r\t\t</text>";
                Balloon += "\r\t</BalloonStyle>";
                Balloon += "\r</Style>\r";
                kml.WriteRaw(Balloon);


                for (int i = 0; i < ct.swathList.Count; i++)
                {
                    kml.WriteStartElement("Placemark");
                    kml.WriteElementString("name", "Tree_" + i.ToString());

                    Balloon = "\r\t\t<styleUrl>#balloon</styleUrl>";
                    Balloon += "\r\t<ExtendedData>";
                    Balloon += "\r\t\t<Data name= \"Numb\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].swathNbr + "</value>";
                    Balloon += "\r\t\t</Data>";
                    Balloon += "\r\t\t<Data name= \"alt\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].altitude + "</value>";
                    Balloon += "\r\t\t</Data>";
                    Balloon += "\r\t\t<Data name= \"Calt\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].cutAltitude + "</value>";
                    Balloon += "\r\t\t</Data>";
                    Balloon += "\r\t\t<Data name= \"Palt\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].realPassAltitude + "</value>";
                    Balloon += "\r\t\t</Data>";
                    Balloon += "\r\t\t<Data name= \"lat\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].latitude + "</value>";
                    Balloon += "\r\t\t</Data>";
                    Balloon += "\r\t\t<Data name= \"lon\">";
                    Balloon += "\r\t\t\t<value>" + ct.swathList[i].longitude + "</value>";
                    Balloon += "\r\t\t</Data>";

                    Balloon += "\r\t</ExtendedData>";
                    kml.WriteRaw(Balloon);

                    



                    kml.WriteStartElement("Style");
                    kml.WriteStartElement("IconStyle");


                    kml.WriteElementString("color", "ff44ff00");
                    kml.WriteStartElement("Icon");
                    kml.WriteElementString("href", "http://maps.google.com/mapfiles/kml/shapes/open-diamond.png");
                    kml.WriteEndElement();//Icon
                    kml.WriteEndElement(); //IconStyle
                    kml.WriteEndElement(); //Style

                    //Turn this on to write number of swath for GE
                    //kml.WriteElementString("name", (i + 1).ToString());
                    kml.WriteElementString("name", " ");
                    kml.WriteStartElement("Point");
                    kml.WriteElementString("coordinates", ct.swathList[i].longitude.ToString(CultureInfo.InvariantCulture) +
                        "," + ct.swathList[i].latitude.ToString(CultureInfo.InvariantCulture) + ",0");
                    kml.WriteEndElement(); //Point
                    kml.WriteEndElement(); // <Placemark>
                }
                kml.WriteEndElement(); // <Folder>   

            }
            //End of Swath

            

            //end of document
            kml.WriteEndElement(); // <Document>
            kml.WriteEndElement(); // <kml>

            //The end
            kml.WriteEndDocument();

            kml.Flush();

            //Write the XML to file and close the kml
            kml.Close();
        }
3 Likes

Ok Thanks!
I will copy it in my code.

One question do you already tried to put and altitude instead of 0 in the coordinate? I will try tomorrow.

kml.WriteElementString("coordinates", ct.swathList[i].longitude.ToString(CultureInfo.InvariantCulture) +
                        "," + ct.swathList[i].latitude.ToString(CultureInfo.InvariantCulture) + ",0");
1 Like

I did way back. In its current form it is clamped to the ground. There are three: relative, absolute, and clamped to the ground. I forget exactly how to change it. It is just a tag in the code. Google kml elevation

3 Likes

Hi
I added some features to the mapping for opengrade3d.
It can now be personalized to user preference

4 Likes

Just posting a link to a video. It shows some more of the tile inlet terraces we built and finished at the end of the year.

3 Likes

Every once in awhile OpenGrade does something odd to me. It will show that it is open down on the taskbar, but clicking on it doesnt do anything. and if you double click desktop icon it says already open. Ive just been reseting the computer each time it does it ( reset not restart) Any help or clues would be appreciated. Running windows 10 on dell 7212 rugged tablet.
thanks

Is this at startup? Or when OpenGrade is already running?
Which version of OpenGrade (look in the “about” tab)?

Are you able to open the task manager and kill the process? Ctrl+Atl+Delete on a computer, harder to open on a tablet!
I made a little video about how to put task manager to desktop/taskbar for easy diagnostic
video how to put task manager to desktop
video how to put task manager to taskbar

1 Like

Your version 2.1 with the slope fix. It shows its open in taskbar but cant get it to enlarge

If you are using the one with the slope fix you are probably using the November 24 version or the v2.1.2 November 29 release.
This version had minor bugs, some related to the simulator, some to the slope calculation, you should try v2.1.3
OpenGrade releases

Maybe there will be other bugs! :grimacing: :grin:
I have not worked in real conditions since September.

Have you received your Hydraforce valve?
Walvoil will have a new valve series in May (here), Walvol SDX060
Configurable all in one bloc OC, CC, LS relief valve, pressure compensator and with a good price tag!

1 Like

OK so v2.1.3 has the slope fixed havnt tried it yet at least not in the field. No my valve keeps getting put off for some reason. starting on a big irrigation pond now

Some updates for the inos. The PWM one is the same as attached here earlier with the controls with switches and the manual/auto mode with PWM driver.

The second one is for CAN, so that you can directly run the tractor (untested as of now) hydraulic valve by sticking a Teensy board in between (you can do the same with Arduino of course but needs different CAN specific code). If the tractor lever input is less than whats commanded by OpenGrade3D, it’s in auto mode and OG3D is running the blade control. If you move the lever more than commanded by OG3D, lever wins. Going to test it next week, just cutting the cable to the valve and putting a 4-pole Deutsch connector in between. Tested on the bench today and the CAN messages look OK, the loop needs to run fast enough so CAN messages don’t pile up in the buffers.

2 Likes

Damn, I completely missed this update on the code! Adding now similar functionality to my canbus code. Target is to have no extra switches so I use one hydraulic lever for the control and the tractor propo valve instead of the blade on/off one. One day I was thinking at upgrading the blade valve to proportional and then I looked at the newer tractor with the propos in the back and had an a-ha/money saving moment :grin:

When lever is put to float, it engages auto mode. Lifting the lever by less than 20% doesn’t disengage but just overrides the values so you can momentarily lift a bit and return directly to auto. If moved beyond 20% it disengages the auto mode completely.

Have you had any chance yet to test it out on the field? I have one 17 hectare victim now waiting for the land to dry up…

No not Opengrade3D, I installed my valve/control box today, I will maybe make a quick field test in the next week but the real work will be in May.
I will make my Optisurface map tomorrow, I didn’t had enough time for this last winter! :rofl:

I will grade the yard and a little field section with Opengrade in the next days, will see how the valve react.

Be sure to use the last OpenGrade3D release, the last is v1.0.8, released today!, some had bugs.
The new one has more mapping options.
New ino too, save settings to EEPROM.

2 Likes