1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
<sect1 id="examples">
<title>
Usage examples
</title>
<sect2 id="examp.general">
<title>
General
</title>
<para>
tbw
</para>
</sect2>
<sect2 id="examp.geo">
<title>
Geographical
</title>
<para>
tbw
</para>
</sect2>
<sect2 id="examp.astro">
<title>
Astronomical
</title>
<sect3>
<title>Coordinates transformation</title>
<para>
A commonly used task is a coordinate transformation. With the
parameters of a new
coordinate system (plane) relative to an old one,
</para>
<informaltable frame="none" rowsep="1" colsep="1">
<tgroup cols="3">
<colspec colname="col0" align="left"/>
<colspec colname="col1" align="left" colwidth="4*"/>
<colspec colname="col2" align="left" colwidth="6*"/>
<tbody>
<row>
<entry>
&OHgr;
</entry>
<entry>
longitude of the ascending node
</entry>
<entry>
angle between line of nodes and the zero point of
longitude in the old plane.
</entry>
</row>
<row>
<entry>
&ohgr;
</entry>
<entry>
argument of pericenter
</entry>
<entry>
the angle from the ascending node to the position in the new plane.
</entry>
</row>
<row>
<entry>
i
</entry>
<entry>
inclination
</entry>
<entry>
angle between the new plane and the old plane.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
you can do a transformation of an object
<parameter>object</parameter> from an old into a new coordinate
system using:
</para>
<synopsis> object - strans '&ohgr;, i, &OHgr;'</synopsis>
<para>or</para>
<synopsis> object - strans (&ohgr;, i, &OHgr;)</synopsis>
<para>
Otherwise, for a transformation of an object
<parameter>object</parameter> from the new into the old
coordinate system, use the operator <literal>+</literal>:
</para>
<synopsis> object + strans '&ohgr;, i, &OHgr;'</synopsis>
<para>or</para>
<synopsis> object + strans (&ohgr;, i, &OHgr;)</synopsis>
<example>
<title>perihelion and aphelion coordinates of a comet's orbit</title>
<simpara>
We are assuming the orbital elements of a comet are
&OHgr;=30°, i=60° and &ohgr;=90°. We get the
spherical position of perihelion and aphelion with:
</simpara>
<programlisting>
<![CDATA[sql> SELECT set_sphere_output('DEG');]]>
<![CDATA[ set_sphere_output ]]>
<![CDATA[-------------------]]>
<![CDATA[ SET DEG]]>
<![CDATA[(1 row)]]>
<![CDATA[]]>
<![CDATA[sql> SELECT spoint '(0,0)' + strans '90d,60d,30d' AS perihelion;]]>
<![CDATA[ perihelion]]>
<![CDATA[--------------]]>
<![CDATA[ (120d , 60d)]]>
<![CDATA[(1 row)]]>
<![CDATA[]]>
<![CDATA[sql> SELECT spoint '(180d,0)' + strans '90d,60d,30d' AS aphelion;]]>
<![CDATA[ aphelion]]>
<![CDATA[---------------]]>
<![CDATA[ (300d , -60d)]]>
<![CDATA[(1 row)]]>
</programlisting>
</example>
</sect3>
</sect2>
</sect1>
|