-
Key: TCI11-32
-
Legacy Issue Number: 17004
-
Status: open
-
Source: SimVentions ( Mr. Matthew Wilson)
-
Summary:
Having an Angle class would be very useful. This would free you from potential errors about worrying whether a double represents degrees or radians. This worry is particularly troublesome, since interface components present angles as degrees, whereas processing is most frequently done in radians. When dealing with unstructured primitive values, it’s an easy mistake to make. An Angle class would allow both to operate in whatever unit was most convenient by providing getters for each unit type.
In addition to unit safety checking, it also makes property editors (for example, for tables and forms) far simpler to construct. The simplest way to specify an editor or renderer is to set the default cell editor or renderer. This facilitates minimal coupling between UI implementations and the data being presented. If the data is stored and presented as doubles, this approach is not possible because an editor that works for a unit of distance is probably not appropriate to also work for a unit of angle. Since GeodeticPosition contains both, this problem is likely to come up very frequently. The problem can be worked around by explicitly setting a particular column’s editor or renderer, but this strongly couples the display capability to the ordering of the displayed TableModel.
A sample implementation of Angle is provided in the reference implementation. If Angle is added, the following properties should be changed to an Angle:
Rectangle
o Orientation property
Geodetic Position
o Latitude property
o Longitude property
ViewEyeProperties
o Orientation property
AGREED -
Reported: TCI 1.0b2 — Thu, 19 Jan 2012 05:00 GMT
-
Updated: Wed, 1 Feb 2023 21:57 GMT
TCI11 — Add an Angle Class to the Standard
- Key: TCI11-32
- OMG Task Force: TACSIT Controller Interface (TCI) 1.1 RTF