NAME
Rinchi::CIGIPP::CelestialSphereControl - Perl extension for the Common Image Generator Interface - Celestial Sphere Control data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::CelestialSphereControl;
my $sky_ctl = Rinchi::CIGIPP::CelestialSphereControl->new();
$packet_type = $sky_ctl->packet_type();
$packet_size = $sky_ctl->packet_size();
$hour = $sky_ctl->hour(123);
$minute = $sky_ctl->minute(7);
$date_time_valid = $sky_ctl->date_time_valid(Rinchi::CIGIPP->Invalid);
$star_field_enable = $sky_ctl->star_field_enable(Rinchi::CIGIPP->Disable);
$moon_enable = $sky_ctl->moon_enable(Rinchi::CIGIPP->Disable);
$sun_enable = $sky_ctl->sun_enable(Rinchi::CIGIPP->Disable);
$ephemeris_model_enable = $sky_ctl->ephemeris_model_enable(Rinchi::CIGIPP->Enable);
$date = $sky_ctl->date(5486);
$star_field_intensity = $sky_ctl->star_field_intensity(29.575);
DESCRIPTION
The Celestial Sphere Control data packet allows the Host to specify properties of the sky model.
The Date attribute specifies the current date and the Hour and Minute attributes specify the current time of day. The IG uses these attributes to determine ambient light properties, sun and moon positions (and corresponding directional light positions), moon phase, and horizon glow.
An IG typically uses an ephemeris model to continuously update the time of day. A Celestial Sphere Control packet need not be sent each minute for the sole purpose of updating the time of day unless the Host has disabled the ephemeris model with the Ephemeris Model Enable flag.
Note: If the Host freezes the simulation, it must send a Celestial Sphere Control packet with the Ephemeris Model Enable attribute set to Disable (0); otherwise, the IG will continue to update the time of day. When the Host resumes the simulation, it must explicitly re-enable the ephemeris model.
The Date/Time Valid attribute specifies whether the IG should set the current date and time to the values specified by the Hour, Minute, and Date attributes. This enables the Host to change sky model properties without affecting the ephemeris model.
EXPORT
None by default.
#==============================================================================
- new $sky_ctl = Rinchi::CIGIPP::CelestialSphereControl->new()
-
Constructor for Rinchi::CelestialSphereControl.
- sub packet_type()
-
$value = $sky_ctl->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the Celestial Sphere Control packet. The value of this attribute must be 9.
- sub packet_size()
-
$value = $sky_ctl->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 16.
- sub hour([$newValue])
-
$value = $sky_ctl->hour($newValue);
Hour.
This attribute specifies the current hour of the day within the simulation.
- sub minute([$newValue])
-
$value = $sky_ctl->minute($newValue);
Minute.
This attribute specifies the current minute of the day within the simulation.
- sub date_time_valid([$newValue])
-
$value = $sky_ctl->date_time_valid($newValue);
Date/Time Valid.
This attribute specifies whether the Hour, Minute, and Date attributes are valid. If Date/Time Valid is set to Valid (1), these values will override the IG's current date and time.
Invalid 0 Valid 1
- sub star_field_enable([$newValue])
-
$value = $sky_ctl->star_field_enable($newValue);
Star Field Enable.
This attribute specifies whether the star attribute is enabled in the sky model. The star positions are determined by the current date and time.
Disable 0 Enable 1
- sub moon_enable([$newValue])
-
$value = $sky_ctl->moon_enable($newValue);
Moon Enable.
This attribute specifies whether the moon is enabled in the sky model. The moon phase is determined by the current date.
Disable 0 Enable 1
- sub sun_enable([$newValue])
-
$value = $sky_ctl->sun_enable($newValue);
Sun Enable.
This attribute specifies whether the sun is enabled in the sky model.
Disable 0 Enable 1
- sub ephemeris_model_enable([$newValue])
-
$value = $sky_ctl->ephemeris_model_enable($newValue);
Ephemeris Model Enable.
This attribute controls whether the time of day is static or continuous. If this attribute is set to Enabled (1), the image generator will continuously update the time of day.
Disable 0 Enable 1
- sub date([$newValue])
-
$value = $sky_ctl->date($newValue);
Date.
This attribute specifies the current date within the simulation. The date is represented as a seven- or eight-digit decimal integer formatted as follows: MMDDYYYY = (month × 1000000) + (day × 10000) + year.
- sub star_field_intensity([$newValue])
-
$value = $sky_ctl->star_field_intensity($newValue);
Star Field Intensity.
This attribute specifies the intensity of the star attribute within the sky model. This attribute is ignored if Star Field Enable is set to Disable (0).
- sub pack()
-
$value = $sky_ctl->pack();
Returns the packed data packet.
- sub unpack()
-
$value = $sky_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 92:
'=item' outside of any '=over'
- Around line 370:
Non-ASCII character seen before =encoding in '×'. Assuming CP1252
- Around line 496:
You forgot a '=back' before '=head1'