I just got my tablet and have installed the software. I see there is a 250cm limit. I need 610, (20'). I figure I can write code that will count every 4th time 153 is hit. From there I can fire the relay. Where will I find this counter? A variiale name? Is this in AOG or ( I hope) in arduino?
Updated tree plant on github AgOpenGPS_Dev.
You can now do spacing up to 50m. Also uTurn in the autosteer byte cycles 1 to 0 or 0 to 1 upon trigger. All you need to do is look for a change in the uTurn byte and fire your relay or whatever. In the small left side display you can see the uturn byte cycle from 0 to 1 to 0 to 1 to..... as it triggers. If you turn off tree planting (set it to 0 ) the uturn byte will return to normal.
Be sure to set up the vehicle to have 1 section.
Here is the code for triggering in position.cs
if (vehicle.treeSpacing != 0 && section.isSectionOn) treeSpacingCounter += (distanceCurrentStepFix*100);
//keep the distance below spacing
if (treeSpacingCounter > vehicle.treeSpacing && vehicle.treeSpacing != 0)
if (treeTrigger == 0) treeTrigger = 1;
else treeTrigger = 0;
while (treeSpacingCounter > vehicle.treeSpacing) treeSpacingCounter -= vehicle.treeSpacing;
Most of the code is quite simple, other then maybe the While loop. Suppose your spacing is 100 cm. The GPS triggers at 5 or 10 hz so it goes 15, 30, 45, 60, 75, 90, 105 - bam a trigger. Now you can't just reset to 0 or you will lose that 5 cm so the spacing is subtracted and starts counting a 5 again. Vehicle class stores the spacing, display settings sets the spacing.
Go slow so the gps takes small fixes and adds up slowly.