upoints.baken.Baken

Package upoints :: Module baken :: Class Baken |
[hide private]
[frames] | no frames]

# Class Baken

     object --+
              |
    point.Point --+
                  |
                 Baken

Class for representing location from baken data files

Since: 0.4.0

Instance Methods | [hide private]
__init__(self, latitude, longitude, antenna=None, direction=None, frequency=None, height=None, locator=None, mode=None, operator=None, power=None, qth=None) Initialise a new Baken object |
_set_locator(self, value) Update the locator, and trigger a latitude and longitude update |
`str` |
__str__(self, mode=`'``dms``'`) Pretty printed location string |
Inherited from `point.Point`: `__dict__`, `__eq__`, `__hash__`, `__ne__`, `__repr__`, `__unicode__`, `bearing`, `destination`, `distance`, `final_bearing`, `forward`, `inverse`, `midpoint`, `sun_events`, `sunrise`, `sunset`, `to_grid_locator` Inherited from `point.Point` (private): `_set_location` Inherited from `object`: `__delattr__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Instance Variables | [hide private]
| locator Location's locator string
| antenna Location's antenna type
| direction Antenna's direction
| frequency Transmitter's frequency
| height Antenna's height
| latitude Location's latitude
| longitude Locations's longitude
| mode Transmitter's mode
| operator Transmitter's operator
| power Transmitter's power
| qth Location's qth
Inherited from `point.Point`: `rad_latitude`, `rad_longitude`, `timezone`, `units`

Properties | [hide private]
| _locator
Inherited from `point.Point` (private): `_angle`, `_latitude`, `_longitude`, `_rad_latitude`, `_rad_longitude` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, latitude, longitude, antenna=None, direction=None, frequency=None, height=None, locator=None, mode=None, operator=None, power=None, qth=None) (Constructor) |
Initialise a new Baken object
    >>> Baken(14.460, 20.680, None, None, None, 0.000, None, None, None,
    ...       None, None)
    Baken(14.46, 20.68, None, None, None, 0.0, None, None, None, None, None)
    >>> Baken(None, None, "2 x Turnstile", None, 50.000, 460.000, "IO93BF",
    ...       "A1A", None, 25, None)
    Baken(53.2291666667, -1.875, '2 x Turnstile', None, 50.0, 460.0,
          'IO93BF', 'A1A', None, 25, None)
    >>> obj = Baken(None, None)
    Traceback (most recent call last):
    ...
    LookupError: Unable to instantiate baken object, no latitude or
    locator string
Parameters: `latitude` (`float` or coercible to `float`) - Location's latitude `longitude` (`float` or coercible to `float`) - Location's longitude `antenna` (`str`) - Location's antenna type `direction` (`tuple` of `int`) - Antenna's direction `frequency` (`float`) - Transmitter's frequency `height` (`float`) - Antenna's height `locator` (`str`) - Location's Maidenhead locator string `mode` (`str`) - Transmitter's mode `operator` (`tuple` of `str`) - Transmitter's operator `power` (`float`) - Transmitter's power `qth` (`str`) - Location's qth Raises: `LookupError` - No position data to use Overrides: object.__init__

### _set_locator(self, value) |
Update the locator, and trigger a latitude and longitude update
    >>> test = Baken(None, None, "2 x Turnstile", None, 50.000, 460.000,
    ...              "IO93BF", "A1A", None, 25, None)
    >>> test.locator = "JN44FH"
    >>> test
    Baken(44.3125, 8.45833333333, '2 x Turnstile', None, 50.0, 460.0,
          'JN44FH', 'A1A', None, 25, None)
Parameters: `value` (`str`) - New Maidenhead locator string

### __str__(self, mode=`'``dms``'`) (Informal representation operator) |
Pretty printed location string
    >>> print(Baken(14.460, 20.680, None, None, None, 0.000, None, None,
    ...             None, None, None))
    14°27'36"N, 020°40'48"E
    >>> print(Baken(None, None, "2 x Turnstile", None, 50.000, 460.000,
    ...             "IO93BF", "A1A", None, 25, None))
    IO93BF (53°13'45"N, 001°52'30"W)
Parameters: `mode` (`str`) - Coordinate formatting system to use Returns: `str` Human readable string representation of Baken object Raises: `ValueError` - Unknown value for mode Overrides: object.__str__

Instance Variable Details | [hide private]

### locator Location's locator string Get Method: unreachable(self) Set Method: unreachable(self, value)