def _calculate_application_risk(module):
    """
    Function to calculate Software risk due to application type.  This
    function uses a similar approach as RL-TR-92-52 for baseline fault
    density estimates.  The baseline application is Process Control
    software.  Every other application is ranked relative to Process
    Control using the values in RL-TR-92-52, Worksheet 0 for average fault
    density.

    Baseline (low) application risk (A) is assigned a 1.
    Medium risk is assigned a 2.
    High risk is assigned a 3.

    Application risks are defined as:

    +-------+------------------------------+----------+
    |       |                              | Relative |
    | Index |          Application         |   Risk   |
    +-------+------------------------------+----------+
    |   1   | Batch (General)              |   Low    |
    +-------+------------------------------+----------+
    |   2   | Event Control                |   Low    |
    +-------+------------------------------+----------+
    |   3   | Process Control              |   Low    |
    +-------+------------------------------+----------+
    |   4   | Procedure Control            |  Medium  |
    +-------+------------------------------+----------+
    |   5   | Navigation                   |   High   |
    +-------+------------------------------+----------+
    |   6   | Flight Dynamics              |   High   |
    +-------+------------------------------+----------+
    |   7   | Orbital Dynamics             |   High   |
    +-------+------------------------------+----------+
    |   8   | Message Processing           |  Medium  |
    +-------+------------------------------+----------+
    |   9   | Diagnostics                  |  Medium  |
    +-------+------------------------------+----------+
    |  10   | Sensor and Signal Processing |  Medium  |
    +-------+------------------------------+----------+
    |  11   | Simulation                   |   High   |
    +-------+------------------------------+----------+
    |  12   | Database Management          |  Medium  |
    +-------+------------------------------+----------+
    |  13   | Data Acquisition             |  Medium  |
    +-------+------------------------------+----------+
    |  14   | Data Presentation            |  Medium  |
    +-------+------------------------------+----------+
    |  15   | Decision and Planning Aids   |  Medium  |
    +-------+------------------------------+----------+
    |  16   | Pattern and Image Processing |   High   |
    +-------+------------------------------+----------+
    |  17   | System Software              |   High   |
    +-------+------------------------------+----------+
    |  18   | Development Tools            |   High   |
    +-------+------------------------------+----------+

    :param module: the :py:class:`rtk.software.CSCI.Model` or
                   :py:class:`rtk.software.Unit.Model` data model to calculate.
    :return: False if successful or True if an error is encountered.
    :rtype: bool
    """

    if module.application_id == 0:
        module.a_risk = 0.0
    elif module.application_id in [5, 6, 7, 11, 16, 17, 18]:
        module.a_risk = 3.0
    elif module.application_id in [4, 8, 9, 10, 12, 13, 14, 15]:
        module.a_risk = 2.0
    else:
        module.a_risk = 1.0

    return False