Removal of Vectors in Maritime Geospatial Analysis

Jordan Taylor
4 min readAug 30, 2023

--

Moving objects on the surface of the water are subject to various environmental forces such as wind and current. A method of removing these forces from a moving object in order to estimate a baseline course and speed is offered for consideration.

Introduction

In navigational mathematics, application of environmental forces to a vessel’s baseline course and speed enables shipboard personnel to determine their estimated future position (Bowditch, 2019).

Vessel automated information systems (AIS) transponders transmit a vessel’s course and speed over ground that can be collected and subject to analysis by shore personnel (IMO, 2015). AIS-transmitted speed over ground is the speed of the vessel inclusive of environmental forces.

Removal of environmental forces from AIS-derived speed over ground, by reverse engineering a long-established navigational technique, may serve to better reflect a vessel’s baseline speed for benefit of shoreside analysts.

Method

A bulk carrier containing petroleum coke is enroute from Benicia, California to Qingdao, China during the month of May. The vessel’s position is 42° 00.0’ N and 142° 00.0’ W.

In a prior article, we established that the vessel is experiencing a seasonal current in the direction of 090° at one-half knot. The seasonal current vector is removed from the vessel’s AIS-derived speed over ground of 12.5 knots and course of 295°. What is the resultant course and speed?

Step 1: Package Import

Python will be used to express the solution. Within an integrated development environment import Python’s math package and relevant functions.

from math import radians, sin, cos, atan2, degrees, sqrt

Step 2: Convert Degrees to Radians

Conversion of degrees to radians is necessary to enable a standard unit of measurement for application to trigonometric formulas.

initial_direction_rad = radians(initial_direction)
applied_direction_rad = radians(applied_direction)

Step 3: Calculate the North and East components of Direction and Speed

In this solution presented, the trigonometric identity of each vector is reflective of 0° along the X-axis and 90° along the Y-axis.

object_east = sin(initial_direction_rad) * initial_speed
object_north = cos(initial_direction_rad) * initial_speed
speed_east = sin(applied_direction_rad) * applied_speed
speed_north = cos(applied_direction_rad) * applied_speed

Step 4: Calculate the Resultant Vector

Calculate the resultant east and north components of the object’s vector.

resultant_east = object_east - speed_east
resultant_north = object_north - speed_north

Step 5: Calculate the Resultant Direction and Speed

In the example below, line one calculates the angle in radians of the resultant vector. Line two converts the angle to degrees, normalized between 0° and 360°. Line three calculates the magnitude of the resultant speed.

resultant_direction_rad = atan2(resultant_east, resultant_north)
resultant_direction_deg = degrees(resultant_direction_rad) % 360
resultant_speed = sqrt(resultant_east ** 2 + resultant_north ** 2)

Result

Using the example of the bulk carrier, the vessel’s AIS-derived vector and environmental vector entering parameters are applied as so:

initial_direction = 295
initial_speed = 12.5
applied_direction = 90
applied_speed = .5

resultant_direction, resultant_speed = vector(initial_direction, initial_speed, applied_direction, applied_speed)

The resultant vector is 294° at 13.0 knots. This result is approaching the value of the vessel’s baseline speed. The outcome is intuitively correct, as the vessel is heading into the seasonal current enroute to China.

Therefore, the AIS-derived speed reflects the vessel being subject to the current, which is traveling at a roughly reciprocal direction to the vessel’s heading. However, the vessel operator is adjusting the vessel’s heading to the left (~294°) and is turning for greater speed (~13 knots) to accomodate for the force and direction of the current.

This outcome does not include other environmental forces such as wind and biofouling, however removal of these vectors would be handled in a similar manner.

Final Code Example

from math import radians, sin, cos, atan2, degrees, sqrt
def vector(initial_direction, initial_speed, applied_direction, applied_speed):
# Convert degrees to radians
initial_direction_rad = radians(initial_direction)
applied_direction_rad = radians(applied_direction)

# Calculate the east and north components of the initial object's direction and speed
object_east = sin(initial_direction_rad) * initial_speed
object_north = cos(initial_direction_rad) * initial_speed
speed_east = sin(applied_direction_rad) * applied_speed
speed_north = cos(applied_direction_rad) * applied_speed

# Calculate the resultant vector
resultant_east = object_east - speed_east
resultant_north = object_north - speed_north

# Calculate the resultant direction and speed
resultant_direction_rad = atan2(resultant_east, resultant_north)
resultant_direction_deg = degrees(resultant_direction_rad) % 360
resultant_speed = sqrt(resultant_east ** 2 + resultant_north ** 2)

return round(resultant_direction_deg, 4), round(resultant_speed, 4)

# Example usage
initial_direction = 295
initial_speed = 12.5
applied_direction = 90
applied_speed = .5

resultant_direction, resultant_speed = vector(initial_direction, initial_speed, applied_direction, applied_speed)

Conclusion

Over a dozen iterations the average processing time for vector removal is 0.0007 seconds. Tests were conducted on a 3.2 GHz Intel i5 with 8GB of RAM at 1,867 MHz.

Examples of use cases for the above exercise is for application to technical, commercial, and operational management. Specific examples include estimated time of arrival at a port, emissions profiles, and owner compliance with the speed clause of a charter party (ASBATANKVOY, n.d.).

References

A 1106 29. (2015, December 14). ClassNK. Retrieved August 29, 2023, from https://www.classnk.or.jp/hp/pdf/activities/statutory/ism/imo/imo_a1106-29.pdf

BOWDITCH, N. (n.d.). AMERICAN PRACTICAL NAVIGATOR. Maritime Safety Information. Retrieved August 29, 2023, from https://msi.nga.mil/api/publications/download?key=16693975/SFH00000/Bowditch_Vol_2_LoRes.pdf&type=view

math — Mathematical functions — Python 3.11.5 documentation. (n.d.). Python Docs. Retrieved August 30, 2023, from https://docs.python.org/3/library/math.html

TANKER VOYAGE CHARTER PARTY. (n.d.). Shipping Forum. Retrieved August 30, 2023, from https://shippingforum.files.wordpress.com/2012/08/asbatankvoy.pdf

--

--

Jordan Taylor

Merchant marine officer with a B.S. in Marine Transportation and a M.S. in Transportation Management.