NAME

Rinchi::CIGIPP::WeatherControl - Perl extension for the Common Image Generator Interface - Weather Control data packet. data packet. =head1 SYNOPSIS

use Rinchi::CIGIPP::WeatherControl;
my $wthr_ctl = Rinchi::CIGIPP::WeatherControl->new();

$packet_type = $wthr_ctl->packet_type();
$packet_size = $wthr_ctl->packet_size();
$entity_ident = $wthr_ctl->entity_ident(22740);
$region_ident = $wthr_ctl->region_ident(59769);
$layer_ident = $wthr_ctl->layer_ident(131);
$humidity = $wthr_ctl->humidity(89);
$cloud_type = $wthr_ctl->cloud_type(Rinchi::CIGIPP->None);
$random_lightning_enable = $wthr_ctl->random_lightning_enable(Rinchi::CIGIPP->Disable);
$random_winds_enable = $wthr_ctl->random_winds_enable(Rinchi::CIGIPP->Disable);
$scud_enable = $wthr_ctl->scud_enable(Rinchi::CIGIPP->Enable);
$weather_enable = $wthr_ctl->weather_enable(Rinchi::CIGIPP->Enable);
$severity = $wthr_ctl->severity(2);
$weather_scope = $wthr_ctl->weather_scope(Rinchi::CIGIPP->RegionalScope);
$air_temperature = $wthr_ctl->air_temperature(15.426);
$visibility_range = $wthr_ctl->visibility_range(89.817);
$scud_frequency = $wthr_ctl->scud_frequency(2.31);
$coverage = $wthr_ctl->coverage(84.412);
$base_elevation = $wthr_ctl->base_elevation(47.967);
$thickness = $wthr_ctl->thickness(38.301);
$transition_band = $wthr_ctl->transition_band(70.407);
$horizontal_wind_speed = $wthr_ctl->horizontal_wind_speed(45.598);
$vertical_wind_speed = $wthr_ctl->vertical_wind_speed(85.529);
$wind_direction = $wthr_ctl->wind_direction(62.819);
$barometric_pressure = $wthr_ctl->barometric_pressure(82.459);
$aerosol_concentration = $wthr_ctl->aerosol_concentration(3.569);

DESCRIPTION

The Weather Control packet is used to control weather layers and weather entities. Global weather layers have no distinct horizontal boundaries. Atmospheric affects can be observed anywhere within the vertical range of the layer. Regional weather layers occur only in areas defined by the Environmental Region Control packet (CIGI ICD Section 4.1.11). Weather entities are entities that represent meteorological phenomena.

The Layer ID attribute specifies the global or regional weather layer whose attributes are being set. If the Scope attribute is set to Global (0), the weather layer exists everywhere over the database. If this attribute is set to Region (1), the weather layer is bound to the region specified by the Region ID attribute. Up to 256 weather layers may be defined globally, and up to 256 layers may be defined within each region. The Layer ID attribute is ignored for weather entities.

The Cloud Type attribute specifies the type of cloud found within a cloud layer or entity. Each value may correspond to a specific cloud texture or model. Values one through 10 are reserved for the most common general cloud types as listed in Table 18. The remaining values can be used for mammatus clouds, Kelvin-Helmholtz cloud effects, and other specific cloud phenomena.

The vertical range of a weather layer is specified by the Base Elevation, Thickness, and Transition Band attributes. Base Elevation specifies the distance from Mean Sea Level to the bottom of the layer. Thickness is the vertical height of the layer. Transition Band specifies the vertical height of both the region above and below the layer through which visibility gradually changes from that of the layer to that immediately outside the region.

For weather entities, the Transition Band attribute can be used to specify a threshold radius for partial penetration into a cloud model. The Base Elevation and Thickness attributes are ignored for weather entities.

The Scud Enable attribute specifies whether the layer produces scud effects within the transition band. The Scud Frequency attribute defines how often scud occurs. The placement of scud (i.e., above versus below the layer) depends upon the IG implementation. Some systems allow this to be controlled via a Component Control packet.

The Horizontal Wind Speed, Vertical Wind Speed, and Wind Direction attributes define the wind velocity within the weather layer or entity. These can be used to specify surface winds or winds aloft, depending upon the base elevation and thickness of the layer or the altitude of the weather entity. The Random Winds Enable attribute causes the IG to create gusts of random duration and frequency. A typical effect of weather layers is the suspension of liquid or solid particles in the air. The density of this particulate matter is specified by the Aerosol Concentration attribute. The most common aerosol is liquid water, but ice crystals, sand, and dust are also common. Weather layers may also be used to create smoke, combat haze, and other man-made airborne contaminants. Each layer can contain zero or one type of mutable aerosol; multiple aerosols in a given space must be implemented as separate weather layers.

Where weather layers overlap, atmospheric effects should be combined as as described in the CIGI ICD.

EXPORT

None by default.

#==============================================================================

new $wthr_ctl = Rinchi::CIGIPP::WeatherControl->new()

Constructor for Rinchi::WeatherControl.

sub packet_type()
$value = $wthr_ctl->packet_type();

Data Packet Identifier.

This attribute identifies this data packet as the Weather Control packet. The value of this attribute must be 12.

sub packet_size()
$value = $wthr_ctl->packet_size();

Data Packet Size.

This attribute indicates the number of bytes in this data packet. The value of this attribute must be 56.

sub entity_ident([$newValue])
$value = $wthr_ctl->entity_ident($newValue);

Entity ID. (Weather Entities)

This attribute specifies the entity to which the weather attributes in this packet are applied.

Note: Entity ID/Region ID is ignored if Scope is set to Global (0).

sub region_ident([$newValue])
$value = $wthr_ctl->region_ident($newValue);

Region ID.

This attribute specifies the region to which the weather layer is confined.

Note: Entity ID/Region ID is ignored if Scope is set to Global (0).

sub layer_ident([$newValue])
$value = $wthr_ctl->layer_ident($newValue);

Layer ID.

This attribute specifies the weather layer to which the data in this packet are applied. This attribute also determines the type of aerosol contained within the layer.

Values 0 through 9 are defined as standard weather layer types. Values beyond this range are defined in the IG configuration.

Note: This attribute is ignored if Scope is set to Entity (2).

sub humidity([$newValue])
$value = $wthr_ctl->humidity($newValue);

Humidity.

This attribute specifies the humidity, measured in percent, within the weather layer/entity.

sub cloud_type([$newValue])
$value = $wthr_ctl->cloud_type($newValue);

Cloud Type.

This attribute specifies the type of clouds contained within the weather layer. If the value of Layer ID does not correspond to a cloud layer, Cloud Type should be set to None (0).

None            0
Altocumulus     1
Altostratus     2
Cirrocumulus    3
Cirrostratus    4
Cirrus          5
Cumulonimbus    6
Cumulus         7
Nimbostratus    8
Stratocumulus   9
Stratus         10
Other1          11
Other2          12
Other3          13
Other4          14
Other5          15
sub random_lightning_enable([$newValue])
$value = $wthr_ctl->random_lightning_enable($newValue);

Random Lightning Enable.

This attribute specifies whether the weather layer or entity exhibits random lightning effects. The frequency and severity of the lightning varies according to the Severity attribute.

Disable   0
Enable    1
sub random_winds_enable([$newValue])
$value = $wthr_ctl->random_winds_enable($newValue);

Random Winds Enable.

This attribute specifies whether a random frequency and duration should be applied to the local wind effects.

Disable   0
Enable    1
sub scud_enable([$newValue])
$value = $wthr_ctl->scud_enable($newValue);

Scud Enable

This attribute specifies whether weather layer produces scud effects within its transition bands.

Disable   0
Enable    1
sub weather_enable([$newValue])
$value = $wthr_ctl->weather_enable($newValue);

Weather Enable.

This attribute specifies whether a weather layer/entity and its atmospheric effects are enabled.

Disable   0
Enable    1
sub severity([$newValue])
$value = $wthr_ctl->severity($newValue);

Severity.

This attribute specifies the severity of the weather layer/entity.

sub weather_scope([$newValue])
$value = $wthr_ctl->weather_scope($newValue);

Weather Scope.

This attribute specifies whether the weather is global, regional, or assigned to an entity. If this value is set to Regional (1), the layer is confined to the region specified by Region ID. If this value is set to Entity (2), the weather attributes are applied to the volume within the moving model specified by Entity ID.

GlobalScope     0
RegionalScope   1
EntityScope     2
sub air_temperature([$newValue])
$value = $wthr_ctl->air_temperature($newValue);

Air Temperature.

This attribute specifies the temperature, measered in degrees Celsius (°C), within the weather layer/entity.

sub visibility_range([$newValue])
$value = $wthr_ctl->visibility_range($newValue);

Visibility Range.

This attribute specifies the visibility range, measured in meters, through the weather layer/entity. This might correspond to Runway Visibility Range through ground fog, for example.

sub scud_frequency([$newValue])
$value = $wthr_ctl->scud_frequency($newValue);

Scud Frequency.

This attribute specifies the frequency of scud within the transition bands above and/or below a cloud or fog layer. A value of 0% produces no scud effect; 100% produces a solid effect.

sub coverage([$newValue])
$value = $wthr_ctl->coverage($newValue);

Coverage.

This attribute specifies the amount of area coverage for the weather layer.

sub base_elevation([$newValue])
$value = $wthr_ctl->base_elevation($newValue);

Base Elevation.

This attribute specifies the altitude of the base (bottom) of the weather layer. This attribute is ignored if Scope is set to Entity (2).

sub thickness([$newValue])
$value = $wthr_ctl->thickness($newValue);

Thickness.

This attribute specifies the vertical thickness of the weather layer. The altitude of the top of the layer is equal to this value plus that specified by Base Elevation. This attribute is ignored if Scope is set to Entity (2).

sub transition_band([$newValue])
$value = $wthr_ctl->transition_band($newValue);

Transition Band.

This attribute specifies the height of a vertical transition band both above and below the weather layer. This band produces a visibility gradient from the layer's visibility to that immediately outside the transition band. This attribute is ignored if Scope is set to Entity (2).

sub horizontal_wind_speed([$newValue])
$value = $wthr_ctl->horizontal_wind_speed($newValue);

Horizontal Wind Speed.

This attribute specifies the local wind speed parallel to the ellipsoid-tangential reference plane.

sub vertical_wind_speed([$newValue])
$value = $wthr_ctl->vertical_wind_speed($newValue);

Vertical Wind Speed.

This attribute specifies the local vertical wind speed.

Note: A positive value produces an updraft, while a negative value produces a downdraft.

sub wind_direction([$newValue])
$value = $wthr_ctl->wind_direction($newValue);

Wind Direction.

This attribute specifies the local wind direction.

Note: This is the direction from which the wind is blowing.

sub barometric_pressure([$newValue])
$value = $wthr_ctl->barometric_pressure($newValue);

Barometric Pressure.

This attribute specifies the atmospheric pressure, measured in millibars (mb) or hectopascals (hPa), within the weather layer or entity. The units are interchangeable.

sub aerosol_concentration([$newValue])
$value = $wthr_ctl->aerosol_concentration($newValue);

Aerosol Concentration.

This attribute specifies the concentration of water, smoke, dust, or other particles suspended in the air.

This attribute is provided primarily for sensor applications; any visual effect is secondary and is IG- and layer-dependent.

Note: The type of aerosol depends upon the layer ID of a weather layer, or the entity type of a weather phenomenon entity.

sub pack()
$value = $wthr_ctl->pack();

Returns the packed data packet.

sub unpack()
$value = $wthr_ctl->unpack();

Unpacks the packed data packet.

sub byte_swap()
$obj_name->byte_swap();

Byte swaps the packed data packet.

SEE ALSO

Refer the the Common Image Generator Interface ICD which may be had at this URL: http://cigi.sourceforge.net/specification.php

AUTHOR

Brian M. Ames, <bmames@apk.net>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Brian M. Ames

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 138:

'=item' outside of any '=over'

Around line 555:

Non-ASCII character seen before =encoding in '(°C),'. Assuming CP1252

Around line 926:

You forgot a '=back' before '=head1'