The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

  use Rinchi::CIGIPP::RateControl;
  my $rate_ctl = Rinchi::CIGIPP::RateControl->new();

  $packet_type = $rate_ctl->packet_type();
  $packet_size = $rate_ctl->packet_size();
  $entity_ident = $rate_ctl->entity_ident(5635);
  $articulated_part_ident = $rate_ctl->articulated_part_ident(210);
  $coordinate_system = $rate_ctl->coordinate_system(Rinchi::CIGIPP->World_Parent);
  $apply_to_articulated_part = $rate_ctl->apply_to_articulated_part(Rinchi::CIGIPP->True);
  $x_linear_rate = $rate_ctl->x_linear_rate(6.206);
  $y_linear_rate = $rate_ctl->y_linear_rate(32.738);
  $z_linear_rate = $rate_ctl->z_linear_rate(84.401);
  $roll_angular_rate = $rate_ctl->roll_angular_rate(47.174);
  $pitch_angular_rate = $rate_ctl->pitch_angular_rate(25.245);
  $yaw_angular_rate = $rate_ctl->yaw_angular_rate(36.996);

DESCRIPTION

The Rate Control packet is used to define linear and angular rates for entities and articulated parts.

The Rate Control packet is useful for models and submodels whose behavior is predictable and whose exact positions need not be known each frame by the Host. A rotating radar dish on a ground target, for example, revolves in a consistent manner, and the Host typically does not need to know its instantaneous yaw angle. Rates may also be used to enable the IG to compensate for transport delays or jitter produced by asynchronous operation. A Rate Control packet may be sent each frame in conjunction with an Entity Control packet. This provides the IG with enough information to extrapolate the entity's probable position during the next frame if necessary.

When a rate is specified for an entity or articulated part, the IG maintains that rate until a new rate is specified by the Host. If the Host changes the position and/or orientation of an entity or articulated part, the IG will perform the transformation and extrapolation will continue from that state beginning with the next frame. If the Host sets all rate components to zero, the entity or articulated part will become stationary.

If the entity to which a rate is applied is destroyed, any rates specified for that entity are annulled.

EXPORT

None by default.

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

new $rate_ctl = Rinchi::CIGIPP::RateControl->new()

Constructor for Rinchi::RateControl.

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

Data Packet Identifier.

This attribute identifies this data packet as the Rate Control packet. The value of this attribute must be 8.

sub packet_size()
 $value = $rate_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 entity_ident([$newValue])
 $value = $rate_ctl->entity_ident($newValue);

Entity ID.

This attribute specifies the entity to which the rate should be applied. If the Apply to Articulated Part flag is set to True (1), the rate is applied to an articulated part belonging to this entity. If the flag is set to False (0), the rate is applied to the whole entity.

sub articulated_part_ident([$newValue])
 $value = $rate_ctl->articulated_part_ident($newValue);

Articulated Part ID.

This attribute specifies the articulated part to which the rate should be applied. If the Apply to Articulated Part flag is set to True (1), this attribute refers to an articulated part belonging to the entity specified by Entity ID. If the flag is set to False (0), this attribute is ignored.

sub coordinate_system([$newValue])
 $value = $rate_ctl->coordinate_system($newValue);

Coordinate System.

This attribute specifies the reference coordinate system to which the linear and angular rates are applied.

When this attribute is set to World/Parent (0) and the entity is a top-level (non-child) entity, the rates are defined relative to the database. Linear rates describe a path along and above the surface of the geoid. Angular rates describe a rotation relative to a reference plane as described in Section 3.3.1.2 of the CIGI ICD.

When this attribute is set to World/Parent (0) and the entity is a child entity, the rates are defined relative to the parent's local coordinate system as described in Section 3.3.2.2 of the CIGI ICD.

When this attribute is set to Local (1), the rates are defined relative to the entity's local coordinate system. Note: This attribute is ignored if Apply to Articulated Part is set to True (1)

    World_Parent   0
    Local          1
sub apply_to_articulated_part([$newValue])
 $value = $rate_ctl->apply_to_articulated_part($newValue);

Apply to Articulated Part.

This attribute determines whether the rate is applied to the articulated part specified by the Articulated Part ID attribute. If this flag is set to False (0), the rate is applied to the entity.

    False   0
    True    1
sub x_linear_rate([$newValue])
 $value = $rate_ctl->x_linear_rate($newValue);

X Linear Rate.

This attribute specifies the X component of a linear velocity vector.

sub y_linear_rate([$newValue])
 $value = $rate_ctl->y_linear_rate($newValue);

Y Linear Rate.

This attribute specifies the Y component of a linear velocity vector.

sub z_linear_rate([$newValue])
 $value = $rate_ctl->z_linear_rate($newValue);

Z Linear Rate.

This attribute specifies the Z component of a linear velocity vector.

sub roll_angular_rate([$newValue])
 $value = $rate_ctl->roll_angular_rate($newValue);

Roll Angular Rate.

This attribute specifies the angle of rotation of the articulated part submodel about its X axis after yaw and pitch have been applied.

sub pitch_angular_rate([$newValue])
 $value = $rate_ctl->pitch_angular_rate($newValue);

Pitch Angular Rate.

This attribute specifies the angle of rotation of the articulated part submodel about its Y axis after yaw has been applied.

sub yaw_angular_rate([$newValue])
 $value = $rate_ctl->yaw_angular_rate($newValue);

Yaw Angular Rate.

This attribute specifies the angle of rotation of the articulated part about its Z axis when its X axis is parallel to that of the entity.

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

Returns the packed data packet.

sub unpack()
 $value = $rate_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 94:

'=item' outside of any '=over'

Around line 514:

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