Offset after copying AB lines from one field to another

@KentStuff if you want some more ideas of something to try, I’ve been thinking a neat feature would be to sort the list of ab lines and ab curves by “distance from current position to the position of the original ab line or ab curve.” This way when I am in a field with lots of ab lines or curves, I can simply hit the cycle lines button and it will cycle through the lines starting with the line closest to my current position.

1 Like

That’s a great idea! Then when we’re driving around the outside, the next AB is only one button press away.

It works, but not as you would expect. In the image below, all the ABLines were drawn in ABDraw form. Generally the right side was picked then the left. The A point is on the left boundary. So if driving the left boundary, then it works OK. But, if you were driving the right boundary, you will have a terrible time selecting which is closest. I have all the reference lines turned on in this picture.

Edit:
So measuring to the closest reference line, not the orign point works much better.

@m_elias What I have found most frustrating is to cycle the line and it turns the wrong way. It should be able to turn right or left by default. Currently it turns to the least resistance. In the picture below, if driving the boundary on the right side, and approaching the dark red line, it will turn to the right out of the field. The second line is not that way, least resistance is into the field. I’ve built a hack for the ABLine, but not for the curve. I’ll try to dig it up and post it.

image

Here is the sorted program if you want to try it. I’ll keep it up for a few days then delete it.

Edit:
Use this one it sorts to the closest line but not the one you are on.

Another edit:
Now if you cycle through within 5 seconds, it will scroll through them in order of the distance. After 5 seconds with no click it will re-sort them. @customfordfan “It is getting better and more usable. Starting to see where it could be very usable for small crops in small groups.”

AgOpenGPS_sort-Timer.zip

3 Likes

I’d be turning AutoSteer off briefly while maneuvering the corner.

Which version of AoG do you use? A release or the master?

I start with a current master and hack it to do what we need.

Sounds cool! I’ll have to find some time to try it out. Does it work with ab curves? We farm on the contour and so one field can have 15 ab curves. It would be super neat if I could find them by location

It is just abline right now. I’ll see if I can work on curves.

Tried the ab line sorting. Looks great! Good work!

Here is the one with curves to try. I shortened the head and tail extensions. Give it a try and see if it works in the field.

AgOpenGPS_sort_Timer_curve.zip

Well I tried it in the simulator, and it works great! I wont be able to try it in the field until fall harvest, but if it works as well in the field as it works in the simulator, that would be an absolutely amazing feature, and super useful for our farm! Maybe something @BrianTee_Admin would consider adding into the next release?

Most likely will be switching to dot net 5.0

Another adventure in learning.

Well, back to school. Be easy on us.

Been doing some homework. Are you planning on a fresh build or a port over update to 5.0. Are you planning on taking it all the way to android compatible? I’ve tried to bring them up to 5.0, with only some success with AgDia, and AgIO. AgOpenGps gets part of the way. Then visual studio decides the it doesn’t have 5.0. I’ve attempted to start with a new 5.0 base and start imparting each of the components. That is over my head at this point. I’ve got them moved over, but they are not linked to a common program. Just curious.

The dotnet 5 branch has the latest code. I’ve been running into some issues where stuff - like charting (Steer Angle Graph) is no longer supported and some of the menuing as well. There are some open source fixes but am unsure if any of this is worth it. It only makes it much harder for others to program their own ideas.

Last thing i want is make something difficult even more difficult.

2 Likes

Took a tour though the code and running it a bit. I see some of the conflicts. ABDraw is too big. Contour edit is too big. It appears just minor things. Code is not that much more difficult than it was. Looks like my biggest mistake was “net5.0-windows7.0” I was missing the -windows7.0. Nice start!

I wanted to quote this above. But I give it two thumbs up.

1 Like


@KentStuff , I’ve spent the last several days using your version with the lines sorted by distance, and it is absolutely fantastic for how we farm. It would be awesome to see this in a future release, unless there is a reason some people would not like it. The only issue I had is the one pasted below. This happened when driving 2 miles around the section to get to the back side of a field, so maybe it was related to this?

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at AgOpenGPS.CABCurve.GetCurrentCurveLine(vec3 pivot, vec3 steer) in C:\Users\Brad\Documents\AgOpenGPS-master(20210620)\AgOpenGPS-master\SourceCode\GPS\Classes\CABCurve.cs:line 381
   at AgOpenGPS.FormGPS.UpdateFixPosition() in C:\Users\Brad\Documents\AgOpenGPS-master(20210620)\AgOpenGPS-master\SourceCode\GPS\Forms\Position.designer.cs:line 567
   at AgOpenGPS.FormGPS.ReceiveFromAgIO(Byte[] data) in C:\Users\Brad\Documents\AgOpenGPS-master(20210620)\AgOpenGPS-master\SourceCode\GPS\Forms\UDPComm.Designer.cs:line 120
   at AgOpenGPS.FormGPS.<>c__DisplayClass656_0.<ReceiveAppData>b__0() in C:\Users\Brad\Documents\AgOpenGPS-master(20210620)\AgOpenGPS-master\SourceCode\GPS\Forms\UDPComm.Designer.cs:line 306
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4420.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AgOpenGPS
    Assembly Version: 5.1.7.0
    Win32 Version: 5.1.7
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/AgOpenGPS.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4400.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenTK.GLControl
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.2336.6514-pre
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/OpenTK.GLControl.DLL
----------------------------------------
OpenTK
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.2336.6514-pre
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/OpenTK.DLL
----------------------------------------
Control.Draggable
    Assembly Version: 1.0.7235.37687
    Win32 Version: 1.0.7235.37687
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/Control.Draggable.DLL
----------------------------------------
RepeatButtonControl
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/RepeatButtonControl.DLL
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Windows.Forms.DataVisualization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4200.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Keypad
    Assembly Version: 4.3.10.0
    Win32 Version: 4.3.10.0
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/Keypad.DLL
----------------------------------------
ColorPicker
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/sgfar/Downloads/AgOpenGPS_sort_Timer_curve/AgOpenGPS_v5/ColorPicker.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.```

That is cool. Looks like it may have sorted and then looked for A when A was now B and B was C.

if (A > B) { C = A; A = B; B = C; }

I’m not sure how to fix it. But let me know if it happens again.

@KentStuff @BrianTee_Admin my dad has been using the sorted_lines version for the last couple weeks spreading chicken litter with no issues. I have not found a good way to reuse contour lines made in past operations, so this version gives me the option to reuse lines from previous operations. I really think other people would benefit from having this feature in the main release. Once you spend the time to make all the needed lines for a particular field, you never again have to open up the a/b line or a/b curve menu again. Any line you need takes only one button press of the cycle lines function (maybe two or three in worst case scenario). If for some reason you are wanting to use a line that was made on the other side of the field, you can still open the menu and choose it like normal. Thanks for all your work!

1 Like