The Combine Forum banner

241 - 260 of 4139 Posts

·
Registered
Joined
·
5,856 Posts
Discussion Starter #243
By special Euro request, configurable tramlines based on n lines before tram.

Example 21m tramline and 3m drill would require 7 lines before tram. Can send an output high to control opener shutoff during the tram.

 

·
Registered
Joined
·
5,856 Posts
Discussion Starter #245
Not yet, i will have to do that, hopefully in this upcoming week.

On a bit of a holiday but even worse got seriously sidetracked with the concept of not only using RS232 to USB, but also using TCP. I'd like to hear thoughts on that.

The concept of using RS232 to either WIFI or ethernet converters, running a simple TCP server that rebroadcasts info again. Basically like a multiuser chat system. Huge advantages overall as it then becomes a network based CanBus style except with TCP. Fast and reliable with easy to access parts. The Arduino MKR1000 is worth looking at too. I have one and wow the stuff you can do with it is crazy with IOT and WiFI. Using onboard WiFi now can include cameras, remote arduino, whatever.

I modified AgSim to do just that and ran it on another computer, and the server with AgOpenGPS on another computer on the network. Frankly you could be anywhere in the world as you well know or as localhost all on the same machine.

Been thinking about this as RTK etc are all TCP capable so why not base AgOpen that way too? Connections number and speed would then be completely irrelevant, no intermittent bluetooth etc. Makes sense why companies are going that route for connectivity. Let alone access to the internet as well.

Still have the option for serial of course also.

The big question, is this then too complicated? Worth a discussion.

Have done some updates in AgOpen including.....

* tileable textures for field surface
* WebCam support
* New and close job are now; resume last field - new - open; in its own dialog
* exiting asks if you want to save field if one is open
* custom timeout message dialog - non modal
* custom YesNo dialog for save
* fixed AB line setting, must drive a ways before setting B point.
* Set Auto Manual buttons on to off if other turned on to be easier
* individual section buttons
* added zoom by touching left or right side of screen
* removed most divides with multiply, constants for pi/2 and 2 PI etc
* Tool now has Red for Off, Yellow for ON, and Green for Auto, matching the buttons
* Sections are in control of on off request now, not buttons. Buttons simply change button states of sections
 

·
Registered
Joined
·
4,073 Posts
I like the TCP/IP capability. If only for testing purposes on my desk.

My tablet has a wifi chipset in it that's capable of running as an access point, but stupid windows 10 disables that feature. Apparently I can use an older windows 8 driver to get that function but I haven't been brave enough to try installing that driver yet. If the tablet could be the access point, then there are several rs232 to wifi adapters that would work with it.

Alternatively wire in a full access point in the cab. Would probably reach far enough to talk to devices on the back of the implement. Would be a lot faster than canbus... and could probably be reliable.
 

·
Registered
Joined
·
4,073 Posts
Yes it's active on my latest commit. Anything that is commented it out is not used anymore. If you give me a few days I can rebase my code against your latest commits and then create a diff that makes it clear where I've made the changes.
 

·
Registered
Joined
·
318 Posts
Hi,

Just wondering which usb-rs232 adapters people are using? Are any units better/more reliable than others? I'm aware I need 2 (one for emlid reach and one for tablet). I'm mounting my emlid reach up in a plastic enclosure with cable bulkheads but there will be photos to come.

Any suggestion are appreciated.

Cheers

Mark
 

·
Registered
Joined
·
4,073 Posts
I have a Trendnet TU-S9 with a Prolific PL2303 chipset which I've used for years. Works great in Linux and Windows. Probably Android too. There are many cheap cables online that use the PL2303. They work well.

FTDI is another popular chipset, though there are fake FTDI devices out there (that work well enough) but for a while FTDI put out a driver that would ruin these counterfeit devices.

Either chipset works great with all versions of Windows and Linux, and probably android also. As of yet I haven't received my USB-OTG cord on the slow boat from China, so I haven't actually used the setup yet with my own tablet. For the tablet usb, I have seen a couple of devices that are 2 or 3 -port hubs that also have a charge port built into them (like usb-otg Y cable but with a hub built in). I may try one. But I still have hopes of making bluetooth work.
 

·
Registered
Joined
·
5,856 Posts
Discussion Starter #254
Thought i better include a brief description of frustum culling since it will be quite obvious there is some matrix math in the draw routine that is definitely not obvious.

The frustum...


is described quite well in the picture above. Six planes near, far, top, bottom, left, right, make up the "box" that is the viewing description of our view we see from the monitor. This whole box is called the frustum. We make lots of triangles with AgOpenGPS so in order to keep frame rates high enough - especially for tablets - there is no point in sending triangles to be drawn in openGL if they aren't going to appear anyway. So each frame a matrix of the view and projection matrices are made and then they are concatenated (multiplied) to form an array of clipping planes that define where these planes are in this particular frame.

So now we have the definitions of these planes we can easily determine whether or not a sphere or box or even a point is on the inside of the frustum or the outside. Send it to the graphics pipeline if its inside, ignore it if its outside. By using the point to plane distance equation - distance = A * X + B * Y + C * Z + D

we can quickly determine which side of the plane the point is on by just looking at the sign of the result. If negative its outside, if positive its inside. So draw or don't draw accordingly.

To make the math easier we know that our triangles lie in the x and z plane so we only need to compare against the near, far, right, and left planes because nothing is above or below our view. Also we don't need to worry about the y value because the whole field is on the same plane and all the y values are the same.

This technique is used of course in gaming where huge complex scenes are made, but you can only see a small portion of the actual whole scene. So you only send the visible portion down the graphics pipeline.






 

·
Registered
Joined
·
380 Posts
On a bit of a holiday but even worse got seriously sidetracked with the concept of not only using RS232 to USB, but also using TCP. I'd like to hear thoughts on that.
I feel that incorporating compatibility with TCP sockets is the way of the future. When I started my GPS mapping/steering/whatever software project/experiment back in 2012 I incorporated socket connections and I quickly found out just how handy they are. Like Brian said, you can literally connect to any GPS stream from anywhere in the world with an internet connection and a little port forwarding. It's invaluable for bench testing and quite reliable (especially with TCP). It's a concept that took me a bit to grasp but it's become my preferred medium of communication for connected devices. It is essentially what all modern computer network capable devices use for Client-Server style communication. I don't know why ISOBUS even exists and USB for that matter should just be a computer network topology.
 

·
Registered
Joined
·
4,073 Posts
Yeah it's handy for sure. USB is a packet protocol of course. I think the disadvantages to TCP/IP in this context include latency (a bad or broken connection leads to automatic retries until timeout) and having to deal with reestablishing a connection when something goes wrong. Also TCP/IP has to deal with IP addresses and how to discover the addresses of things and what those things are.

A light-weight error-correcting protocol over top of UDP might be more appropriate than the heavy connection-based TCP/IP sessions for replacing isobus-style communication. Though actually canbus is just a protocol itself that can go over top of any stream-based transport. Canbus could go over UDP or TCP/IP. Or over some other system built on top of ethernet.

And honestly the last thing we really need is for companies to make their tractors all use IP on the main buses. Sooner or later some intern is going to have the bright idea to hook the whole thing to the live Internet for various purposes and suddenly we'll have hackers breaking into ECMs! I kind of jest here... the move to IP in the automotive world is already happening with little thought to security and consequences of being connected to the Internet.

It is hard to beat the file I/O-like interface to TCP/IP sockets from a programmer's point of view.
 

·
Registered
Joined
·
5,856 Posts
Discussion Starter #258
Made a quick video to show some possibilities and what is done so far...

It is kind of an important crossroads for many equipment and auto manufacturers - and lets face it, fridges are already ip connected, TV's, stereos, cars, and coffee makers. I don't think ag manufacturers will get away from canbus and existing equipment methods. There is just way too much money to made from existing locked up and secret technologies that farmers have no trouble spending tens of thousands of dollars for. The last thing they want is for guys like us to run Wireshark on "Their" network, but who knows really.

 

·
Registered
Joined
·
4,073 Posts
Good question. If you run as a server, then the same code could service connections from a couple of different devices (NMEA GPS as well as Arduino).

Thinking about an IP-based farm data bus, however, it might make the most sense for each data source to be a server and the consumer would be a client. That way multiple clients could interface with the same device, such as a GPS source.
 
241 - 260 of 4139 Posts
Top