If you have read the previous post about breaking down the yard into smaller areas and needing to make an odd number of passes on a yard, and are wondering how to do it, I hope to explain the how I came to those conclusions here.
First, the coordinate system should be made. This will be done by taking the points on the perimeter outline. The most extreme points y and x will be taken and combined after taking their absolute values based on the axis they are from. This would result in the map residing in only the positive portion of the coordinate grid plane. Not sure if it is necessary, but it may make programming easier.
Next, the yard can be broken down into smaller sections. The initial measurement would start from the 0,0 position and then would move on to measure x and y distances, finding which direction has the greatest distance to travel, and then determine the box with the greatest area with respect to travel with out having to backtrack--so start with the one rectangle shape that is connected to only one rectangle shape.
Sqrt((x2-x1)^2 + (y2-y1)^2) is the formula for distance. ---We may need this.
I would imagine that this would be done by measuring x along y and determine when x changes and tag off that area and create the other boxes (this will also be done with the y along the x...). The winning model will be the one with least amount of rectangles create with the starting position being in a rectangle only touching one other rectangle.
So the first area would start at 690,0, the second would start at 0,260, the third at 240,570, and the fourth at 870,460.
For my yard the number of changes in direction would have to be a odd number for all areas due to the starting location and the design of the yard.
Now for ole' giggle toots, we will try to describe the robot as it relates to the magical map. First we have to set some sort of units to the map. The driveway is about 20 feet wide and that is about 6 meters. So we know that every 100 units on the map represents 6 meters. The estimated width of the robot cutting portion is .5 meters or about 20ish inches for the Mercans. That means my yard is about 52x34 meters*.
*I may be grossly over or under-inflating the size of my house and or my yard for the sake of this example.
8/04/17