QtAgOpenGPS
QtAgOpenGPS copied to clipboard
Implement click on vehicle to reverse direction
Implement click on vehicle to reverse direction. Possibly can do it directly from QML using matrix4x4 transformations.
I guess we'll need to keep in mind that this needs to be anchored to the vehicle... If it's anchored to the center of the main screen, and the vehicle is moved off to the side, the click location and the vehicle will not line up. Same with the reverse arrow in #12
I think I accidentally found the solution. The code the implements drag to pan calculates how far from the tractor the click is. So if we translate this to javascript, and then look for 0,0, that will be on the tractor. I'll create another issue to translate the click to field coordinates routines to javascript.
Also the position of the reverse arrow can be calculated by replicating all the OpenGL coordinate transformations in Javascript. Fortunately qml provides a matrix4x4 type for this purpose.
I note that the current AOG code to draw the arrow does not take panning into account. It always puts it just left of the center of the screen (it does not use field coordinates or anything like that).
Both added to qml now.