Brian M. Ames
and 1 contributors

NAME

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

  use Rinchi::CIGIPP::WaveControl;
  my $wave_ctl = Rinchi::CIGIPP::WaveControl->new();

  $packet_type = $wave_ctl->packet_type();
  $packet_size = $wave_ctl->packet_size();
  $region_ident = $wave_ctl->region_ident(57556);
  $entity_ident = $wave_ctl->entity_ident(19952);
  $wave_ident = $wave_ctl->wave_ident(240);
  $breaker_type = $wave_ctl->breaker_type(Rinchi::CIGIPP->Plunging);
  $scope = $wave_ctl->scope(Rinchi::CIGIPP->GlobalScope);
  $wave_enable = $wave_ctl->wave_enable(Rinchi::CIGIPP->Enable);
  $wave_height = $wave_ctl->wave_height(83.07);
  $wave_length = $wave_ctl->wave_length(12.084);
  $period = $wave_ctl->period(54.785);
  $direction = $wave_ctl->direction(24.212);
  $phase_offset = $wave_ctl->phase_offset(69.289);
  $leading = $wave_ctl->leading(26.815);

DESCRIPTION

The Wave Control packet is used to specify the behavior of waves propagating across the surface of a body of water. Examples include simulated swells and wind chop.

The basic waveform is defined by a wave height, wavelength, period, and direction of propagation. Wave height refers to the vertical distance between the wave's crest and trough. The wavelength is the distance from one crest to the next or from one trough to the next.

The Phase Offset attribute specifies a phase angle to be added to the IG's reference phase. This is useful for modeling the interference patterns produced within a multiple-wave system. The Leading attribute determines the cross-sectional shape of the wave. This value is the phase angle at which the crest of the wave occurs. For a sinusoidal wave, this angle is zero (0) degrees. As the value increases, the trough flattens and the crest moves toward the front of the wave.

EXPORT

None by default.

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

new $wave_ctl = Rinchi::CIGIPP::WaveControl->new()

Constructor for Rinchi::WaveControl.

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

Data Packet Identifier.

This attribute identifies this data packet as the Wave Control packet. The value of this attribute must be 14.

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

Data Packet Size. This attribute indicates the number of bytes in this data packet. The value of this attribute must be 32.

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

Entity ID. (Entity-based Surface Conditions)

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

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

Region ID. (Regional Surface Conditions)

This attribute specifies the region to which the surface attributes are confined. Note: Entity ID/Region ID is ignored if Scope is set to Global (0).

sub wave_ident([$newValue])
 $value = $wave_ctl->wave_ident($newValue);

Wave ID.

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

sub breaker_type([$newValue])
 $value = $wave_ctl->breaker_type($newValue);

Breaker Type.

This attribute specifies the type of breaker within the surf zone. This may be one of the following values:

Plunging - Plunging waves peak until the wave forms a vertical wall, at which point the crest moves faster than the base of the breaker. The wave will then break violently into the wave trough.

Spilling - Spilling breakers break gradually over a great distance. White water forms over the crest, which spills down the face of the breaker.

Surging - Surging breakers advance toward the beach as vertical walls of water. Unlike with plunging and spilling breakers, the crest does not fall over the front of the wave.

    Plunging   0
    Spilling   1
    Surging    2
sub scope([$newValue])
 $value = $wave_ctl->scope($newValue);

Scope.

This attribute specifies whether the wave is defined for global, regional, or entity-controlled maritime surface conditions. If this value is set to Regional (1), the wave properties are applied only within the region specified by Region ID. If this value is set to Entity (2), the properties are applied to the area defined by the moving model specified by Entity ID.

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

Wave Enable.

This attribute determines whether the wave is enabled or disabled. A disabled wave does not contribute to the shape of the water's surface.

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

Wave Height.

This attribute specifies the average vertical distance measured in meters from trough to crest produced by the wave. Wave Height is centered on Sea Surface Height.

sub wave_length([$newValue])
 $value = $wave_ctl->wave_length($newValue);

Wavelength.

This attribute specifies the distance from a particular phase on a wave to the same phase on an adjacent wave.

sub period([$newValue])
 $value = $wave_ctl->period($newValue);

Period.

This attribute specifies the time required for one complete oscillation of the wave.

sub direction([$newValue])
 $value = $wave_ctl->direction($newValue);

Direction.

This attribute specifies the direction in which the wave propagates measured in degrees from true north.

sub phase_offset([$newValue])
 $value = $wave_ctl->phase_offset($newValue);

Phase Offset.

This attribute specifies a phase offset for the wave.

sub leading([$newValue])
 $value = $wave_ctl->leading($newValue);

Leading.This attribute specifies the phase angle at which the crest occurs.

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

Returns the packed data packet.

sub unpack()
 $value = $wave_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.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 89:

'=item' outside of any '=over'

Around line 556:

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