User:Jcreer/Direction Conventions and Conversions: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
SMS supports the following direction conventions:
SMS supports the following direction conventions:


:Cartesian::          Add definition
*''Cartesian'': The direction FROM. The origin (0.0) indicates the direction is coming from North. It increases clockwise from North (viewed from above). This is most commonly used for wind direction.
:Meteorologic:       Add definition
*''Meteorologic'': The direction TO. The origin (0.0) indicates the direction is going to the North. It increases clockwise (like a bearing) so 45 degrees indicates a direction heading towards the North East.
:Oceanographic:   Add definition
*''Oceanographic'': The Cartesian coordinate axes as a direction TO.  East, or the positive X axis, defines the zero direction. It increases in a counter clockwise direction or righthand rule. 45 degrees indicates a direction heading to the North East and 90 degrees indicates a direction heading to the North.
:Shore Normal:      "TO" convention based on a Theta(grid) which defines the grid orientation relative to the positive X axis (CCW direction). So:
*''Shore Normal'':      "TO" convention based on a Theta(grid) which defines the grid orientation relative to the positive X axis (CCW direction). So:
:{| style="max-width:300px; text-align:center;"
:{| style="max-width:300px; text-align:center;"
|-
|-
Line 18: Line 18:
|                  270        ||              South
|                  270        ||              South
|}
|}
[[File:Directionconventions.png|thumb|205 px|Example of the shore normal grid direction angle as found in the Generate Spectra dialog]]
For a shore normal grid, the direction angle is interpreted as relative to the I axis with CCW as positive.  Therefore, if Theta(grid) is 0 degrees (I axis aligned with X axis) then:
For a shore normal grid, the direction angle is interpreted as relative to the I axis with CCW as positive.  Therefore, if Theta(grid) is 0 degrees (I axis aligned with X axis) then:
                    0                       To the east
:{| style="max-width:300px; text-align:center;"
                  45                       To the north east
|-
                -45                       To the south east
|width="125px"|                  0           ||            To the east
|-
|                  45       ||                To the north east
|-
|                -45       ||                To the south east
|}


When SMS converts from  one convention to another the conversions always goes through Cartesian. For example, to convert from Oceanographic to Meteorologic, SMS converts from Oceanographic to Cartesian, and then from Cartesian to Meteorologic.
When SMS converts from  one convention to another the conversions always goes through Cartesian. For example, to convert from Oceanographic to Meteorologic, SMS converts from Oceanographic to Cartesian, and then from Cartesian to Meteorologic.

Latest revision as of 21:04, 9 December 2021

SMS supports the following direction conventions:

  • Cartesian: The direction FROM. The origin (0.0) indicates the direction is coming from North. It increases clockwise from North (viewed from above). This is most commonly used for wind direction.
  • Meteorologic: The direction TO. The origin (0.0) indicates the direction is going to the North. It increases clockwise (like a bearing) so 45 degrees indicates a direction heading towards the North East.
  • Oceanographic: The Cartesian coordinate axes as a direction TO. East, or the positive X axis, defines the zero direction. It increases in a counter clockwise direction or righthand rule. 45 degrees indicates a direction heading to the North East and 90 degrees indicates a direction heading to the North.
  • Shore Normal: "TO" convention based on a Theta(grid) which defines the grid orientation relative to the positive X axis (CCW direction). So:
Theta(grid) Direction of I axis
0 East
90 North
180 West
270 South
Example of the shore normal grid direction angle as found in the Generate Spectra dialog

For a shore normal grid, the direction angle is interpreted as relative to the I axis with CCW as positive. Therefore, if Theta(grid) is 0 degrees (I axis aligned with X axis) then:

0 To the east
45 To the north east
-45 To the south east

When SMS converts from one convention to another the conversions always goes through Cartesian. For example, to convert from Oceanographic to Meteorologic, SMS converts from Oceanographic to Cartesian, and then from Cartesian to Meteorologic.

The conversions that are:

Cartesian = 90 - Oceanographic
Cartesian = 270.0 - Meteorologic
Cartesian = ShoreNormal + GridOrientation
Meteorologic = 270.0 - Cartesian (add or subtract 360 if out of range)
ShoreNormal = Cartesian - GridOrientation (add or subtract 360 if out of range)
Oceanographic = 90.0 - Cartesian (add or subtract 360 if out of range)