The ‘Ocean’ has several methods that can be visualized in the JavaScript console using:
query(Z('Ocean'))
More specifically, Z(‘Ocean’).velocity(vector3d) gives the velocity of the water at a given point in the ocean frame. Ocean frame is equivalent to the inertial frame. Note that the ‘velocity’ method only gives the velocity of the ocean itself (eg. the orbital velocity). To get the inflow velocity on a point, velocity of the point itself needs to be subtracted.\r\n\r\nFor instance, to get the water velocity of the origin of a predefined keel frame, Javascript commands would be:
var test = Z('Boat.Keel.Frame').pointInFrame([0,0,0], Z('InertialFrame'))Z('Ocean').velocity(test)
Then to get the inflow velocity of the keel frame origin, expressed in the inertial frame:
Z('Boat.Keel.Frame').velocityOfPointInFrame([0,0,0], Z('InertialFrame'))
Measure water velocity
Support SumToZero Changed status to publish 12 March 2024