start	end	text
0	7560	Okay, folks, I think we are back. Let me try once again sharing my screen.
13020	18680	And once again, I'm going to live dangerously and show the whole thing.
19580	28620	So, when we were talking about ideas for talks and projects and things like that,
29260	33440	one of the things that I just happened to mention, and somebody said, well, this seems like it'd be
33440	40500	an interesting little challenge type of project to do. And I'm going to talk to you about something
40500	46180	called AIS point prediction. So, here's the general idea. And if I was better at drawing
46180	52080	graphics, I could have drawn you some graphics. So, I'm going to try going out here to OpenCPN
52080	58520	to see what kind of things we've got going out here. What I really need, and I probably don't
58520	67900	have, well, actually, I probably do have, but you see these vessels out here. This vessel right here,
67900	72700	the Janus, we know is a sailboat. It looks like it's about to come in Ponce Inlet. The Sea King,
72700	77640	I don't know anything about the Sea King. It's also a Type B. That's too bad, but that's okay.
78480	87680	On AIS messages, vessels that are by Code of Federal Regulations required to transmit Class A
87680	95740	type of vessels. So, the really big ones have a lot of passengers, have a certain tonnage or
95740	102760	horsepower. They're Class A. And a Class A is going to be telling me all the information that's
102760	111120	down here. They'll be telling me a speed, course, heading, and turn rate. They'll also be communicating
112480	117020	relatively frequently. Class B vessels, the smaller ones,
118400	125740	aren't required to transmit. And in fact, in a Class B position report, there's no way to even
125740	130840	tell me about a turn rate. So, the reason I'm telling you that is so that I can tell you this.
131220	136180	My question is, and here's an example of Louisiana, which was just offshore pretty
136180	145940	recently, a tanker, offshore Daytona. So, if I know a ship's latitude, longitude,
145940	152300	speed over ground, course over ground, and turn rate, can I predict where they will be
152300	160610	the next time they give me a position report? And in some ways, this sounds like a trivial exercise.
161470	166790	I fooled around a little bit with it, not a lot. It's a really interesting exercise.
168790	177190	And the idea came to me some time ago, the idea being, you know, I'm at a particular place.
177470	184470	And suppose a bad guy spoofs their AIS latitude, longitude of a vessel. And they try to, let's say,
184470	191750	knock Louisiana off the air. And now they spoof, bing, Louisiana. Well,
192810	200490	suppose their next position report puts me five miles away. Well, there's no way that I can move
200490	212870	five miles in a minute. So, my AIS receiver could maybe flash red to say, we just got something that
212870	220830	just doesn't seem right. Now, the other thing, by the way, that this AIS message will tell us,
220830	226030	this position message, this and other things, is you'll notice that this is also giving me
226030	232350	the destination and ETA of when I plan on getting there. So, this vessel, which I saw the other day,
232350	239350	probably about four or five days ago, is expected tomorrow morning at 7 in the morning UTC to be
239350	246970	in Texas. So, it must have, well, it must have been several days ago. Anyway, so where I'm going with
246970	254870	this is this. Again, an AIS type 1, 2, or 3 message is a class A position report. And the information
254870	260470	that matters to me is it's going to give me a latitude. For those of you that are not familiar
260470	268050	with the relationship between latitude, longitude, and distance, it is vaguely as follows. One degree
268050	278030	of latitude is 60 nautical miles. One minute of latitude is one nautical mile. Longitude is about,
278030	283850	one degree of longitude is about 60 nautical miles at the equator, which is zero degrees latitude,
283850	292790	of course. But for every other, any other latitude, a degree of longitude, the linear distance
292790	300630	is going to be some function of the latitude. And think about a globe. And, of course, as you get
300630	307510	closer and closer to the North Pole, one degree of longitude gets to be almost nothing, whereas
307510	314450	one degree of longitude at the equator is 60 nautical miles. Anyway, I mentioned that later on.
314770	320190	Then we're going to have the course in degrees, zero degrees being true north. And so an actual
320190	327390	course will be somewhere between zero and 359. The speed in knots. A knot, of course, is a nautical
327390	333870	mile per hour, which translates to about 1.15 miles per hour. I'm going to have a rate of turn,
333870	339150	which is generally expressed in the number of degrees per minute, left or right. And the time
339150	346190	between transmission is going to be a function of what is your speed and what is your rate of turn.
346970	351490	And it turns out there's a standard for this, and if only the standard matched the reality,
351490	357650	life would be a good thing. But here is actually an example, and it talks about some of the
357650	363890	additional issues related to the problem. So I only care about the Class A transponder types,
363890	369130	although I'm showing you Class Bs as well. So technically speaking, if you're a Class A vessel,
369130	374670	you're at anchor, you just need to transmit every three minutes. Now, you may be saying,
374670	381770	but I'm at anchor, I'm not moving. Well, again, AIS Class A devices, you might be talking about
382010	389290	a vessel that is several hundred meters in length. If it's anchored or moored, the position
389290	396550	of the bridge might be actually composing a circle, that if that ship were to swing around
396550	405510	its anchor in a 360-degree circle, you might be talking about a radius of many hundreds of meters.
406070	417550	Well, a nautical mile is about 2,000 yards, so I might, like I said, I might have a pretty big
417550	425670	swing radius. In any case, if I'm sailing, not sailing obviously, but underway between 0 and 14
425670	432610	knots, I'm supposed to be transmitting every 10 seconds. If I am sailing at a speed of 0 to 14
432610	439170	knots and changing course, I need to be transmitting every 3.33 seconds. So that's how you read the
439170	445170	chart in terms of transmission rate. What I did is I then translated this and said, well, what's the
445170	452530	maximum distance I can travel in that amount of time? Well, if I'm going 14 knots and I'm transmitting
452530	460090	every 10 seconds, I'm only going to be traveling 77 yards. That's not very far. And you can sort of
460090	469710	see as my, as I progressed here, what I was trying to give was an idea of exactly how far might I be
469710	478870	going between transmissions. Now, I mentioned I wish the reality were, you know, match the standard.
478870	483310	Sometimes we will see vessels going by that are class A vessels and they're pretty big class A
483310	492750	vessels. And like the Louisiana, the Louisiana was going at 15 knots. Well, at 15 knots, even in a
492750	499390	straight line, they should be transmitting every six seconds. But we had like a minute, that slide
499390	506490	that I showed. So in any case, you know, so the distance or rather the rate between transmissions
506490	513170	is something else we need to take into account. So then I said, well, okay, I've got, I've got a
513170	519050	ship here. That's supposed to be a ship. And it's at some latitude and longitude, which I'm calling
519050	526090	lat zero and long zero. I know my course over ground. I know my rate of turn. And so the question
526530	531950	is, all right, well, I've got a triangle in here. I've got some angle theta. Now, this may or may
531950	540070	not be the right approach to go, by the way, but I've got some angle theta. And so at some t time
540070	547890	later on, I've got my new latitude and longitude, lat one and long one. And so I will observe that
547890	554830	I can figure out the radius of this circle because it's going to be related to the speed over ground
554830	562170	and the rate of turn. I can figure out the distance that I've traveled, that circular
562170	567970	distance, that arc, if you will. That's going to be somehow related to the velocity times the time
567970	573890	between the transmissions, the actual time. And then I've got this delta x and delta y.
573910	578650	Well, delta x is going to be a function of the angle of the circle, the speed over ground and
578650	586790	the time, which as will my delta y. But then my actual change in latitude and longitude
587470	595290	has got to be a function of the course plus theta, meaning that if I was just going due north
596050	606290	or do anything, it'd be easy. But as we start to change off of zero degrees, we start to see,
607000	613790	because again, a degree of latitude is the same everywhere in terms of linear length,
613790	618270	but the linear length of the degree of longitude is not going to be the same.
618430	631410	So like I said, we have, you know, that issue to deal with. So again, my targets that I'm going for
632510	637790	is if there's no rotation of the ship and the ship is moving in a straight line, well, that's
637790	646510	almost easy to do. If the rate of turn is not zero, my ship is turning. And so then the other
646510	654150	thing I was thinking of is not only can I, how well can I predict my next point, but, you know,
654150	659490	we just had a tropical storm down here last week, went up the east coast. And so we always look at
659490	700390	the National Hurricane Center and they give us this cone of certainty for, so that if my next
700390	708790	point is in the box, do I claim victory? And am I looking for, well, a really small box or how big
708790	714590	will I let my box be? If I'm going in a straight line, they really are sort of boxes. If my rate
714590	722530	of turn isn't zero, then the boxes actually become a cone. Am I anywhere in the right range at all?
724310	730950	So, like I said, in terms of a problem, I was just thinking that this sounds like an
730950	737450	interesting problem to tinker with. And, and there's all sorts of places to look at historical
737450	743630	information. What you need to work on, though, if you get historical information, and I could even
743630	750610	provide you some, is you need type one, type two, or type three position reports from the same vessel.
751370	758290	And, and the type one, again, because you need rate of turn. Now, I mentioned something about
758290	765270	the length of the degree of latitude and longitude. So, again, the length of the degree of latitude
765270	774210	in meters, there's, there's a formula that I know is used at a number of the government sites.
774490	778810	It was actually easy to find the formula because they have these pages where they have like a
778810	785230	JavaScript, and you can, you know, put in, you know, what your latitude is. It will tell you the
785230	789610	length of a degree of latitude in meters. Well, of course, if you right-click and look at the
789610	794090	page source, you can see their formula. But it's been used a lot, and I've seen it documented in
794170	800330	a few places. In any case, the length of the degree of longitude, again, you will also notice
800330	808790	is a function of the latitude. The length of the degree of latitude and longitude, here, here's,
808790	814110	that I produced largely from those formulas. And you will notice that a degree of latitude,
814550	821630	in terms of nautical miles, it almost doesn't matter where you are. It's about 60 miles,
821630	827490	60 nautical miles to a degree. If you look at a degree of longitude, the number of nautical miles,
827490	833950	again, at the equator, it's about 60. And then, as you go towards the poles, it increasingly gets
833950	841110	smaller and smaller, and then rapidly gets smaller once you get above about, you know, 45 degrees,
842090	846650	either north or south. And that actually, you know, makes sense. Until, of course,
846650	849970	you get to the pole, and then the degree of longitude is zero nautical miles.
852330	856070	And again, I've given you some websites where they have more information about this.
856070	864950	And that, more or less, was the challenge. And as I said, I think it's sort of an interesting
864950	874270	problem. And for a few people, I don't know where we sort of go from there. I, like I said, I talked
874270	879770	to Reid out about this, and I think he talked to a couple of other people. Interesting problem.
879770	885050	I think what we're looking for is maybe to have some intermediaries, intermediate solutions at
885050	894210	some point in the next year, maybe revisit this at Hack to C 3.0 next year. And anyway,
894210	907250	so that's where I am. So, questions? Comments? Let me go back up here. I'm no longer
908230	919890	at Hack to C Village. So, I'll sit here for a couple minutes while we go into Q&A.
