Package com.mouseviator.fsuipc.helpers.avionics

# Class NavRadioHelper

java.lang.Object
com.mouseviator.fsuipc.helpers.avionics.RadioHelper
com.mouseviator.fsuipc.helpers.avionics.NavRadioHelper

Direct Known Subclasses:
  `NAV1Helper`, `NAV2Helper`

    public abstract class NavRadioHelper
    extends RadioHelper

This abstract class contains methods/functions - ie. the functionality to get/set various data common to navigation radios in flight simulator. The classes implementing specific radios just needs to specify correct offsets to get/set respective data using respective variables.

Author:
  Murdock

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `class` | `NavRadioHelper.BackCourseFlags` | Helper class to what back course flag bits are set.
  `class` | `NavRadioHelper.CodeFlags` | Helper class to what code flags bits are set.
  `static class` | `NavRadioHelper.ToFromFlag` | An enumeration of possible return values for data request to obtain To/From flag indication.

- ## Field Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `protected int` | `backCourseFlagOffset` |
  `protected int` | `CDINeedleOffset` |
  `protected int` | `codeFlagsOffset` |
  `protected int` | `dmeDistanceOffset` |
  `protected int` | `dmeSpeedOffset` |
  `protected int` | `dmeTimeToStationOffset` |
  `protected int` | `elevationOffset1` |
  `protected int` | `elevationOffset2` |
  `protected int` | `GSFlagOffset` |
  `protected int` | `GSINeedleOffset` |
  `protected int` | `identityOffset` |
  `protected int` | `ilsGlideSlopeInclinationOffset` |
  `protected int` | `ilsInverseRunwayHeadingOffset` |
  `protected int` | `latitudeOffset1` |
  `protected int` | `latitudeOffset2` |
  `protected int` | `localiserNeedleOffset` |
  `protected int` | `longitudeOffset1` |
  `protected int` | `longitudeOffset2` |
  `protected int` | `MagVarOffset` |
  `protected int` | `nameOffset` |
  `protected int` | `OBSSettingOffset` |
  `protected int` | `radialOffset` |
  `protected int` | `signalStrengthOffset` |
  `protected int` | `ToFromFlagOffset` |
  `protected int` | `VORrelativeBearingOffset` |

  ### Fields inherited from class com.mouseviator.fsuipc.helpers.avionics.RadioHelper

  `frequencyOffset, frequencySwapValue, standbyFrequencyOffset`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `NavRadioHelper()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `IDataRequest<java.lang.Byte>` | `getBackCourseFlags()` | Returns data request to get back course flag.
  `IDataRequest<java.lang.Float>` | `getCDINeedle()` | Returns data request to get Course deviation needle indication.
  `IDataRequest<java.lang.Byte>` | `getCodeFlags()` | Returns data request to get back course flag.
  `IDataRequest<java.lang.Float>` | `getDMEDistance()` | Returns data request to get DME distance.
  `IDataRequest<java.lang.Float>` | `getDMESpeed()` | Returns data request to get DME speed.
  `IDataRequest<java.lang.Float>` | `getDMETimeToStation()` | Returns data request to get DME time to station.
  `IDataRequest<java.lang.Double>` | `getElevation1​(boolean bFeet)` | Returns data request to get VOR elevation in meters of feet.If the NAV radio is tuned to ILS, this data request will return elevation of the glide slope transmitter.
  `IDataRequest<java.lang.Double>` | `getElevation2​(boolean bFeet)` | Returns data request to get VOR elevation in meters or feet.If the NAV radio is tuned to ILS, this data request will return elevation of the localiser transmitter.
  `IDataRequest<java.lang.Byte>` | `getGSFlag()` | Returns data request to get glide slope flag.
  `IDataRequest<java.lang.Float>` | `getGSINeedle()` | Returns data request to get Glide slope needle indication.
  `IDataRequest<java.lang.String>` | `getIdentity()` | Returns data request to get the nav radio identity (ICAO code).
  `IDataRequest<java.lang.Float>` | `getILSGlideslopeInclination​(boolean bDegrees)` | Returns data request to get ILS glide slope inclination.
  `IDataRequest<java.lang.Float>` | `getILSLocaliserInverseRunwayHeading()` | Returns data request to get ILS localiser inverse runway heading in degrees.
  `IDataRequest<java.lang.Double>` | `getLatitude1()` | Returns data request to get VOR latitude in degrees.
  `IDataRequest<java.lang.Double>` | `getLatitude2()` | Returns data request to get VOR latitude in degrees.
  `IDataRequest<java.lang.Byte>` | `getLocaliserNeedle()` | Returns data request to get localiser needle indication.
  `IDataRequest<java.lang.Double>` | `getLongitude1()` | Returns data request to get VOR longitude in degrees.
  `IDataRequest<java.lang.Double>` | `getLongitude2()` | Returns data request to get VOR longitude in degrees.
  `IDataRequest<java.lang.Float>` | `getMagneticVariation​(boolean bDegrees)` | Returns data request to get VOR magnetic variation.
  `IDataRequest<java.lang.String>` | `getName()` | Returns data request to get the nav radio name.
  `ShortRequest` | `getOBSSettings()` | Returns data request to get/set OBS settings.
  `IDataRequest<java.lang.Float>` | `getRadial​(boolean bDegrees)` | Returns data request to get VOR radial.The returned value will be in degrees Magnetic for a VOR, but TRUE for an ILS LOC.
  `IDataRequest<java.lang.Integer>` | `getSignalStrength()` | Returns data request to get signal strength.
  `IDataRequest<java.lang.Byte>` | `getToFromFlag()` | Returns data request to get To/From flag.
  `IDataRequest<java.lang.Short>` | `getVORRelativeBearing()` | Returns data request to get relative bearing to VOR.

  ### Methods inherited from class com.mouseviator.fsuipc.helpers.avionics.RadioHelper

  `getFrequency, getStandByFrequency, swapFrequencies`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CDINeedleOffset

    protected int CDINeedleOffset

  - ### localiserNeedleOffset

    protected int localiserNeedleOffset

  - ### GSINeedleOffset

    protected int GSINeedleOffset

  - ### signalStrengthOffset

    protected int signalStrengthOffset

  - ### radialOffset

    protected int radialOffset

  - ### OBSSettingOffset

    protected int OBSSettingOffset

  - ### VORrelativeBearingOffset

    protected int VORrelativeBearingOffset

  - ### ToFromFlagOffset

    protected int ToFromFlagOffset

  - ### backCourseFlagOffset

    protected int backCourseFlagOffset

  - ### codeFlagsOffset

    protected int codeFlagsOffset

  - ### GSFlagOffset

    protected int GSFlagOffset

  - ### MagVarOffset

    protected int MagVarOffset

  - ### latitudeOffset1

    protected int latitudeOffset1

  - ### latitudeOffset2

    protected int latitudeOffset2

  - ### longitudeOffset1

    protected int longitudeOffset1

  - ### longitudeOffset2

    protected int longitudeOffset2

  - ### elevationOffset1

    protected int elevationOffset1

  - ### elevationOffset2

    protected int elevationOffset2

  - ### ilsGlideSlopeInclinationOffset

    protected int ilsGlideSlopeInclinationOffset

  - ### ilsInverseRunwayHeadingOffset

    protected int ilsInverseRunwayHeadingOffset

  - ### nameOffset

    protected int nameOffset

  - ### identityOffset

    protected int identityOffset

  - ### dmeDistanceOffset

    protected int dmeDistanceOffset

  - ### dmeSpeedOffset

    protected int dmeSpeedOffset

  - ### dmeTimeToStationOffset

    protected int dmeTimeToStationOffset

- ## Constructor Details

  - ### NavRadioHelper

    public NavRadioHelper()

- ## Method Details

  - ### getCDINeedle

    public IDataRequest<java.lang.Float> getCDINeedle()
    Returns data request to get Course deviation needle indication. The request will return float value, ranging from -127 (left) to 127 (right). READ ONLY!
    Returns:
      Data request to get Course deviation needle indication.

  - ### getGSINeedle

    public IDataRequest<java.lang.Float> getGSINeedle()
    Returns data request to get Glide slope needle indication. The request will return float value, ranging from -127 (up) to 127 (down). READ ONLY!
    Returns:
      Data request to get Glide slope needle indication.

  - ### getLocaliserNeedle

    public IDataRequest<java.lang.Byte> getLocaliserNeedle()
    Returns data request to get localiser needle indication. The request will return byte value, ranging from -127 (left) to 127 (right). Not tested if this always returns the same value as the `getCDINeedle()` data request. The range of values is the same. The offset used is different. READ ONLY!
    Returns:
      Data request to get localiser needle indication.

  - ### getSignalStrength

    public IDataRequest<java.lang.Integer> getSignalStrength()
    Returns data request to get signal strength. The returned value will be integer. For Localisers, seems to be either 0 or 256 For VORs varies from 0 to over 1,000,000 when really close! READ ONLY!
    Returns:
      Data request to get signal strength.

  - ### getRadial

    public IDataRequest<java.lang.Float> getRadial​(boolean bDegrees)
    Returns data request to get VOR radial.The returned value will be in degrees Magnetic for a VOR, but TRUE for an ILS LOC. READ ONLY!
    Parameters:
      `bDegrees` - Whether you want the result in degrees (True), or radians (False)
    Returns:
      Data request to get VOR radial.

  - ### getOBSSettings

    public ShortRequest getOBSSettings()
    Returns data request to get/set OBS settings. The value returned by this data request will be in degrees (0-359). Note that the returned object will be READ request by default. To make it write request, call its `IDataRequest.setType(com.mouseviator.fsuipc.datarequest.IDataRequest.RequestType)` method with parameter `IDataRequest.RequestType.WRITE`.
    Returns:
      Data request to get/set OBS settings.

  - ### getVORRelativeBearing

    public IDataRequest<java.lang.Short> getVORRelativeBearing()
    Returns data request to get relative bearing to VOR. The value returned by this data request will be in degrees (0-359). READ ONLY!
    Returns:
      Data request to get relative bearing to a VOR.

  - ### getToFromFlag

    public IDataRequest<java.lang.Byte> getToFromFlag()
    Returns data request to get To/From flag. The data request will return 0=Not active, 1=To, 2=From. You can also use `NavRadioHelper.ToFromFlag` enumeration, which defines these values, to compare the result. READ ONLY!
    Returns:
      Data request to get To/From flag.

  - ### getGSFlag

    public IDataRequest<java.lang.Byte> getGSFlag()
    Returns data request to get glide slope flag. The data request will return TRUE (non-zero) value when glide slope is alive. READ ONLY!
    Returns:
      Data request to get glide slope flag.

  - ### getBackCourseFlags

    public IDataRequest<java.lang.Byte> getBackCourseFlags()
    Returns data request to get back course flag. The data request will return some byte number representing flags set. You can pass this value to an instance of the helper class `NavRadioHelper.BackCourseFlags`, and use its methods to determine what bits are set. Or you can test them yourself, according to FSUIPC documentation of the respective offset (for NAV1=0x0C4A or NAV2=0x0C5A). READ ONLY!
    Returns:
      Data request to get back course flags.

  - ### getMagneticVariation

    public IDataRequest<java.lang.Float> getMagneticVariation​(boolean bDegrees)
    Returns data request to get VOR magnetic variation. The returned value will be in degrees or radians. READ ONLY! (Note that there are two different data sources for MagVars, and this may not agree with the airport MagVar for airport-based VORs)
    Parameters:
      `bDegrees` - Whether you want the result in degrees (True), or radians (False)
    Returns:
      Data request to get VOR magnetic variation.

  - ### getCodeFlags

    public IDataRequest<java.lang.Byte> getCodeFlags()
    Returns data request to get back course flag. The data request will return some byte number representing flags set. You can pass this value to an instance of the helper class `NavRadioHelper.CodeFlags`, and use its methods to determine what bits are set. Or you can test them yourself, according to FSUIPC documentation of the respective offset (for NAV1=0x0C4D or NAV2=0x0C70). READ ONLY!
    Returns:
      Data request to get back course flags.

  - ### getLatitude1

    public IDataRequest<java.lang.Double> getLatitude1()
    Returns data request to get VOR latitude in degrees. If the NAV radio is tuned to ILS, this data request will return latitude of the glide slope transmitter. If the NAV radio is tuned to ILS and you want to get the latitude of the localiser, use the `getLatitude2()` data request.
    Returns:
      Data request to get latitude of VOR or glide slope transmitter.

  - ### getLatitude2

    public IDataRequest<java.lang.Double> getLatitude2()
    Returns data request to get VOR latitude in degrees. If the NAV radio is tuned to ILS, this data request will return latitude of the localiser transmitter. If the NAV radio is tuned to ILS and you want to get the latitude of the glide slope transmitter, use the `getLatitude1()` data request.
    Returns:
      Data request to get latitude of VOR or localiser transmitter.

  - ### getLongitude1

    public IDataRequest<java.lang.Double> getLongitude1()
    Returns data request to get VOR longitude in degrees. If the NAV radio is tuned to ILS, this data request will return longitude of the glide slope transmitter. If the NAV radio is tuned to ILS and you want to get the longitude of the localiser, use the `getLongitude2()` data request.
    Returns:
      Data request to get latitude of VOR or glide slope transmitter.

  - ### getLongitude2

    public IDataRequest<java.lang.Double> getLongitude2()
    Returns data request to get VOR longitude in degrees. If the NAV radio is tuned to ILS, this data request will return longitude of the localiser transmitter. If the NAV radio is tuned to ILS and you want to get the longitude of the glide slope transmitter, use the `getLongitude1()` data request.
    Returns:
      Data request to get longitude of VOR or localiser transmitter.

  - ### getElevation1

    public IDataRequest<java.lang.Double> getElevation1​(boolean bFeet)
    Returns data request to get VOR elevation in meters of feet.If the NAV radio is tuned to ILS, this data request will return elevation of the glide slope transmitter. If the NAV radio is tuned to ILS and you want to get the elevation of the localiser, use the `getElevation2(boolean)` data request.
    Parameters:
      `bFeet` - Whether to get result in meters or feet.
    Returns:
      Data request to get elevation of VOR or glide slope transmitter.

  - ### getElevation2

    public IDataRequest<java.lang.Double> getElevation2​(boolean bFeet)
    Returns data request to get VOR elevation in meters or feet.If the NAV radio is tuned to ILS, this data request will return elevation of the localiser transmitter. If the NAV radio is tuned to ILS and you want to get the elevation of the glide slope transmitter, use the `getElevation1(boolean)` data request.
    Parameters:
      `bFeet` - Whether to get result in meters or feet.
    Returns:
      Data request to get elevation of VOR or localiser transmitter.

  - ### getILSGlideslopeInclination

    public IDataRequest<java.lang.Float> getILSGlideslopeInclination​(boolean bDegrees)
    Returns data request to get ILS glide slope inclination. The returned value will be in degrees or radians. READ ONLY!
    Parameters:
      `bDegrees` - Whether you want the result in degrees (True), or radians (False)
    Returns:
      Data request to get ILS glide slope inclination.

  - ### getILSLocaliserInverseRunwayHeading

    public IDataRequest<java.lang.Float> getILSLocaliserInverseRunwayHeading()
    Returns data request to get ILS localiser inverse runway heading in degrees. The NAV radio must be tuned to ILS. The value returned by the data request is 180 degrees different to the direction of flight to follow the localiser. READ ONLY!
    Returns:
      Data request to get ILS localiser inverse runway heading.

  - ### getDMEDistance

    public IDataRequest<java.lang.Float> getDMEDistance()
    Returns data request to get DME distance. The value this data request will return is in Nm (nautical miles). READ ONLY!
    Returns:
      Data request to get DME distance.

  - ### getDMESpeed

    public IDataRequest<java.lang.Float> getDMESpeed()
    Returns data request to get DME speed. The value this data request will return is in Kts. READ ONLY!
    Returns:
      Data request to get DME speed.

  - ### getDMETimeToStation

    public IDataRequest<java.lang.Float> getDMETimeToStation()
    Returns data request to get DME time to station. The value this data request will return is in seconds. READ ONLY!
    Returns:
      Data request to get DME time to station.

  - ### getName

    public IDataRequest<java.lang.String> getName()
    Returns data request to get the nav radio name. It will be max 24 characters long. READ ONLY!
    Returns:
      Data request to get radio name.

  - ### getIdentity

    public IDataRequest<java.lang.String> getIdentity()
    Returns data request to get the nav radio identity (ICAO code). It will be max 5 characters long. READ ONLY!
    Returns:
      Data request to get radio identity.