Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-11473

Add SpherePoint(long, lat, unit) constructor

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      1
    • Epic Link:
    • Sprint:
      Alert Production F17 - 9, Alert Production F17 - 10
    • Team:
      Alert Production

      Description

      Implement RFC-367 by adding a SpherePoint(double longitude, double latitude, AngleUnit unit) constructor.

      This will simplify DM-11162: Replace all use of Coord and subclasses with SpherePoint.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment -

            I removed the unused and unsafe SpherePoint(double const lonLatRad[2]) constructor and added SpherePoint(double longitude, double latitude, AngleUnit unit) and a test.

            Show
            rowen Russell Owen added a comment - I removed the unused and unsafe SpherePoint(double const lonLatRad [2] ) constructor and added SpherePoint(double longitude, double latitude, AngleUnit unit) and a test.
            Hide
            krzys Krzysztof Findeisen added a comment - - edited

            The new constructor promises to validate input but doesn't; also, it does not establish the class invariant that _longitude is always in the range [0, 2π) (which I will admit I should have documented).

            Show
            krzys Krzysztof Findeisen added a comment - - edited The new constructor promises to validate input but doesn't; also, it does not establish the class invariant that _longitude is always in the range [0, 2π) (which I will admit I should have documented).
            Hide
            rowen Russell Owen added a comment -

            I renamed the test method (and added an explanatory comment to the expected failure within it).

            Show
            rowen Russell Owen added a comment - I renamed the test method (and added an explanatory comment to the expected failure within it).

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Reviewers:
                Krzysztof Findeisen
                Watchers:
                Krzysztof Findeisen, Russell Owen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel