Learning CAN-FIX
Moderators: John Nicol, birkelbach
-
birkelbach
- Posts: 193
- Joined: 04 Sep 2012, 14:42
Re: Learning CAN-FIX
I agree, John. The real question is whether or not the added complexity is worth it? I don't want to spend a lot of time chasing the outlying use cases. I'd hate to make it difficult on the 9,999 out of 10,000 that build single or twin engine airplanes, to cater to the one that builds a four engine plane. We have the ability to add as many engines as the installer wants by simply adding more buses.
There is always going to be some piece of data that we never conceived of, regardless of what we do. There is plenty of room in the ID distribution for adding new types of data.
There is always going to be some piece of data that we never conceived of, regardless of what we do. There is plenty of room in the ID distribution for adding new types of data.
Re: Learning CAN-FIX
What's the complexity you are concerned about? I may be bad at describing some of this, but it seems pretty easy to me. Can you give an example of where it would be complex?
Dave
Dave
-
birkelbach
- Posts: 193
- Joined: 04 Sep 2012, 14:42
Re: Learning CAN-FIX
Maybe I don't understand exactly what you are trying to say with all of this. It seems to assume that each device is powered on at the same time and I don't think that's realistic in an airplane. I don't turn my autopilot, radio and transponder on until the engine is running. How do you handle restarts if they are necessary? I've had to restart the EFIS in my airplane, in flight, once. Each 'phase' is added complexity. It may not be "complex" in the sense that it's difficult to understand but it is "more" complicated than not doing it and pre-defining what the identifiers mean.at power up, each node waits about 1000ms* (* configurable) before doing anything to make sure all nodes have completed their POSTs. Then, there is an 'offer phase' wherein each unit broadcasts one 'offer packet' for each data point it can produce and then it shuts up and waits for the 'command phase'. It also listens to the other node's offers and if it is interested in something, it will send a directed command frame to the producer during the command phase telling it to publish the interesting data. This way, only necessary data is transmitted. An offer packet is the same as a data packet except it has an 'offer' flag set instead of the 'data' flag and it has no 'to' address (making it a bcast). That way the priority mechanism of CAN is used to arbitrate the exact order that offers are announced. When all offers are made the wire will go silent. After 500ms* of silence, all nodes enter the 'command phase' and start sending any directed commands accumulated during the offer phase. Command packets are the
same as data frames except they have the 'command' flag set and have a 'to' address. Again, the priority mechanism of CAN is used to arbitrate the exact order of commands. After all commands have been sent, the wire will go silent again. After 500ms* of silence all nodes would enter normal operation and start directed data frames to those nodes that sent them a command. (I say directed because that would save all nodes the trouble of decoding all of every frame, we could easily bitmask the node's MAC with the 'to' field and if it doesn't match, drop the frame. It would increase traffic, but decrease the load on 'lesser' nodes)
Any increase in complexity needs to be justified. I guess I'm just not seeing what we gain from all this. I admit that there are some deficiencies in the existing implementation but it seems that we should try to find creative ways to deal with them instead of throwing it all out and starting over. A lot of thought and a fair amount of testing has gone into what we already have. If the deficiencies can't be overcome with incremental changes then okay, let's throw it out and start over; but shouldn't we have a really good reason for doing that?
Re: Learning CAN-FIX
You are absolutely right... I was assuming they would all come on at the same time... bad monkey... bad!
I have a fix for that...
My goal here is to have predefined identifiers for data and commands without locking those identifiers to specific nodes. That is, the most significant portion of the identifier (Identifier A) is all about urgency, system and data type, not about where it came from. Nodes don't care that they are talking to VHF #1 exactly, they only care that they are talking to the VHF node with the lowest address. Number oneness or number twoness is determined by which node of a given system type has the lowest address. By keeping an internal list of nodes that can do VHF things (discovered when the node was powered on) a node can go to VHF #2 or #3 simply by choosing the proper index in its array of addresses.
I have lost track of something too... why is it that version 0.4 can't have a random number of engine monitors? or GPSs?
Dave
My goal here is to have predefined identifiers for data and commands without locking those identifiers to specific nodes. That is, the most significant portion of the identifier (Identifier A) is all about urgency, system and data type, not about where it came from. Nodes don't care that they are talking to VHF #1 exactly, they only care that they are talking to the VHF node with the lowest address. Number oneness or number twoness is determined by which node of a given system type has the lowest address. By keeping an internal list of nodes that can do VHF things (discovered when the node was powered on) a node can go to VHF #2 or #3 simply by choosing the proper index in its array of addresses.
I have lost track of something too... why is it that version 0.4 can't have a random number of engine monitors? or GPSs?
Dave
-
birkelbach
- Posts: 193
- Joined: 04 Sep 2012, 14:42
Re: Learning CAN-FIX
Mostly because we don't think it's necessary. There are very few homebuilt aircraft that have more than one engine, let alone four. I think the same thing can be said for GPS's and radios although the numbers may be different. Personally, I'm more worried about data that we haven't thought about more than I am not assigning room for enough of them. A couple of examples are when John said the words "Hybrid Engine" and "ADS-B," another is when you said "Vibration Monitor." These are the things that I worry about. Adding two (or four) more engines is as easy as putting in another bus.I have lost track of something too... why is it that version 0.4 can't have a random number of engine monitors? or GPSs?
If I were building a four engined airplane, I'm pretty sure that it'd be full IFR capable and have quite a number of redundancies built in. I'd want two airspeeds on two buses with two air data computers connected to two pitot tubes. Put one in the left wing and the other in the right wing. While I'm over there I can catch the two engines on each wing. These would be on two different buses so, no conflicts. I would imagine that any EFIS built for this application would have four or more CAN ports on them. CAN ports are simple and cheap to add.
The same argument can be made for GPS's and VHF radios. We have room for four of each of these. If you have a need for 8 then you probably have enough of a need for redundancy that you don't want them all on the same bus anyway. Now that I think about it I wonder if 4 is to many. There may be an argument for GPS's being able to talk to each other so perhaps we leave these at 4?
I guess my thinking is that, we have limitations in the protocol design but not necessarily in the system design.
Re: Learning CAN-FIX
I agree... I think the system design (use of CAN, use of multiple buses) is terrific. The issue is really the protocol design in that it has a fixed inventory.
Please don't think I am suggesting we toss 0.4 and start over... I'm not suggesting that at all. There is an enormous amount of detail in there; hours and hours of thought about what data should be produced for each and every system and element. That definitely should live on in any case!
I think that 0.4 could be used in two ways: 1) as envisioned by you or, 2) with all of the data details ported over to ride in the extended protocol.
Or maybe both... in the spirit of open source, maybe you continue work on CAN-FIX as you see it, simple/fast/cheap, and I make the other bargain and create CAN-FIX.e which would be more extensible at the cost of greater complexity. The two standards would not compete, they would be two fruits of the same tree in that they both use the same hardware standard and I continue to try and help you solve issues in CAN-FIX and you do the same in CAN-FIX.e (as in, 'what if you don't turn on everything at once?'). That way, folks can go with CAN-FIX now with the knowledge that they can move to CAN-FIX.e in the future if they ever need it... it isn't and either/or proposition for them.
Thoughts?
Dave
Please don't think I am suggesting we toss 0.4 and start over... I'm not suggesting that at all. There is an enormous amount of detail in there; hours and hours of thought about what data should be produced for each and every system and element. That definitely should live on in any case!
I think that 0.4 could be used in two ways: 1) as envisioned by you or, 2) with all of the data details ported over to ride in the extended protocol.
Or maybe both... in the spirit of open source, maybe you continue work on CAN-FIX as you see it, simple/fast/cheap, and I make the other bargain and create CAN-FIX.e which would be more extensible at the cost of greater complexity. The two standards would not compete, they would be two fruits of the same tree in that they both use the same hardware standard and I continue to try and help you solve issues in CAN-FIX and you do the same in CAN-FIX.e (as in, 'what if you don't turn on everything at once?'). That way, folks can go with CAN-FIX now with the knowledge that they can move to CAN-FIX.e in the future if they ever need it... it isn't and either/or proposition for them.
Thoughts?
Dave
-
birkelbach
- Posts: 193
- Joined: 04 Sep 2012, 14:42
Re: Learning CAN-FIX
I guess I don't see the problem with the 'fixed inventory.' There's plenty of room in the distributions to add other types of data in the future and we've been bogged down talking about engines and radios but there will never need to be more than one airspeed, altitude, aircraft position, etc. And that kind of data is the majority of what is going to be passed around.
It won't hurt my feelings if there is a parallel track of development, but it seems more productive if we pool our efforts instead of fragmenting them. This is open source after all. Have you thought about taking on another protocol altogether, like say TCP/IP? CAN-FIX could be used for the low level device comms and NET-FIX (to spend 2 seconds thinking of a name) could be for higher level system connect or higher bandwidth data. Converting between the two would be trivial. It's just a thought.
You did get me to thinking about the extended identifier. I spent some time last night with a spreadsheet trying to see if I could get it to work. I think I may have something that will fix some of the issues in 0.4. I still need to go through the distribution and see what needs to change. I'll probably start a new topic later today with my ideas. It may be the 'happy medium.' At first glance I think it will quadruple the number of identifiers that we have to use as well as putting more information (index, destination node, source node, etc) into the CAN identifier and consequently, in the arbitration field. I also had a bit left over to use as a Report/Set flag. So that setting a parameter and reporting it are two different identifiers, with setting having priority. Stay tunned.
It won't hurt my feelings if there is a parallel track of development, but it seems more productive if we pool our efforts instead of fragmenting them. This is open source after all. Have you thought about taking on another protocol altogether, like say TCP/IP? CAN-FIX could be used for the low level device comms and NET-FIX (to spend 2 seconds thinking of a name) could be for higher level system connect or higher bandwidth data. Converting between the two would be trivial. It's just a thought.
You did get me to thinking about the extended identifier. I spent some time last night with a spreadsheet trying to see if I could get it to work. I think I may have something that will fix some of the issues in 0.4. I still need to go through the distribution and see what needs to change. I'll probably start a new topic later today with my ideas. It may be the 'happy medium.' At first glance I think it will quadruple the number of identifiers that we have to use as well as putting more information (index, destination node, source node, etc) into the CAN identifier and consequently, in the arbitration field. I also had a bit left over to use as a Report/Set flag. So that setting a parameter and reporting it are two different identifiers, with setting having priority. Stay tunned.
Re: Learning CAN-FIX
I very much like the idea of an IP implementation of FIX, basically a transport layer protocol to ride on top of IP like TCP or UDP. Call it FIX/IP...
In truth, I was hoping you would suggest something like that when I became concerned about the amount of bandwidth even low-res implementations of FIS-B could consume. CAN has a max b/w if 1Mbps and if the payload of each frame is full, 50% of each frame is overhead, cutting the maximum throughput to 500Kps. Payloads that aren't full make the overhead even worse. No problem for the stated aims of CAN-FIX, but not so good for a protocol that wants to include wx graphics from FIS-B or even higher res sources.
I'll start reading through some of the other transport layer protocols and see if I can get any ideas.
I will certainly stay tuned and would be glad to review 0.5 if you are willing to risk me playing 52-card pickup with your protocol definition again.
Dave
In truth, I was hoping you would suggest something like that when I became concerned about the amount of bandwidth even low-res implementations of FIS-B could consume. CAN has a max b/w if 1Mbps and if the payload of each frame is full, 50% of each frame is overhead, cutting the maximum throughput to 500Kps. Payloads that aren't full make the overhead even worse. No problem for the stated aims of CAN-FIX, but not so good for a protocol that wants to include wx graphics from FIS-B or even higher res sources.
I'll start reading through some of the other transport layer protocols and see if I can get any ideas.
I will certainly stay tuned and would be glad to review 0.5 if you are willing to risk me playing 52-card pickup with your protocol definition again.
Dave
-
birkelbach
- Posts: 193
- Joined: 04 Sep 2012, 14:42
Re: Learning CAN-FIX
Hey, it's all good. I like 52 card pickup, it makes me question my assumptions. I know some good will come of it. If nothing else the audience learned something about the reasoning and the trade-offs.
CAN is indeed [fairly] low bandwidth. It's made to send small amounts of data reliably. Exactly what we want for airspeed, altitude and EGT, but not well suited for radar images, weather data, audio/video or any other stream based communication. There is room in the airplane for more than just CAN.
CAN is indeed [fairly] low bandwidth. It's made to send small amounts of data reliably. Exactly what we want for airspeed, altitude and EGT, but not well suited for radar images, weather data, audio/video or any other stream based communication. There is room in the airplane for more than just CAN.
Re: Learning CAN-FIX
Well that was quick... after reading over the details of UDP, I really can't see a reason to use anything else. It is:
Using UDP also means that every laptop, tablet and phone comes ready to plug into the FIX/IP bus (even wirelessly); all you need is a piece of software to listen to UDP port 3490 and report what it sees. This software could be anything from a terminal type app to a full blown EFIS.
Comments encouraged!
Dave
- Unreliable : but no more so than CAN, it pretty much relies on the fact that data will be repeated and that the loss of any one frame is not that bad
Not Ordered : Because we are not routing over multiple segments, there really is no concern about subsequent frames arriving out of order
Lightweight : Noting but a port number to worry about (I am thinking 3490 since 349 spells FIX on the dial pad)
Datagrams : build a payload up to 65,507 bytes long, broadcast it on the FIX port, and it pops out of everything's UDP stack pretty as you please
Using UDP also means that every laptop, tablet and phone comes ready to plug into the FIX/IP bus (even wirelessly); all you need is a piece of software to listen to UDP port 3490 and report what it sees. This software could be anything from a terminal type app to a full blown EFIS.
Comments encouraged!
Dave