|$set = Astro::Coord::ECI::TLE::Set->new ()||This method instantiates a new set. Any arguments are passed to the add() method.|
|$set->add ($member ...);||
This method adds members to the set. The initial member may be any
initialized member of the Astro::Coord::ECI::TLE class, or any subclass
thereof. Subsequent members must be the same class as the initial
member, and represent the same NORAD ID. If not, an exception is thrown.
If a prospective member has the same effective date as a current member,
the prospective member is silently ignored. If a member does not have an
effective date, the epoch is used as a proxy for the effective date.
The first member added becomes the current member for the purpose of delegating method calls. Adding subsequent members does not change the current member, though it may be appropriate to call select() after adding.
|@sets = Astro::Coord::ECI::TLE::Set->aggregate ($tle ...);||
This method aggregates the given Astro::Coord::ECI::TLE objects into
sets by NORAD ID. If there is only one object with a given NORAD ID, it
is simply returned intact, <B>notB> made into a set with one member.
If you should for some reason want sets with one member, do
before you call aggregate(). Actually, any value that Perl will interpret as true will work. You might want a local in front of all this.
Optionally, the first argument may be a hash reference. The hash contains options that modify the function of this method. The only option at the moment is
which causes the object best representing the given time to be selected in any Astro::Coord::ECI::TLE::Set objects.
|$set->can ($method);||This method checks to see if the object can execute the given method. If so, it returns a code reference to the subroutine; otherwise it returns undef.|
|$set->clear ();||This method removes all members from the set, allowing it to be reloaded with a different NORAD ID.|
|$value = $set->get( $name );||
This method returns the value of the named attribute.
If the attribute name is tle, it returns the concatenated TLE data of all TLEs in the set. Otherwise it simply returns the named attribute of the selected Astro::Coord::ECI::TLE object.
|$time = $set->max_effective_date(...);||
This method extends max_effective_date in Astro::Coord::ECI::TLE
appropriately for sets of elements.
If there are arguments, their maximum is taken, the appropriate member element is set, and max_effective_date() is called on that element, passing the date used to select the element. If there are no arguments, max_effective_date() is called on the current element, with no arguments. If the set has no members, the maximum of the arguments is returned (or undef if there are no arguments).
|@tles = $set->members ();||This method returns all members of the set, in ascending order by effective date.|
If the set has a current member, this method returns true if the current
member represents the given class, or the class name of the current
member if no argument is given.
If the set has no current member, an exception is thrown.
Normally we would just let AUTOLOAD take care of this, but it turned out to be handy to be able to call UNIVERSAL::can on this method.
This method selects the member object that best represents the given
time, and returns that member. If called without an argument or with an
undefined argument, it simply returns the currently-selected member.
The best representative member for a given time is chosen by considering all members in the set, ordered by ascending effective date. If all epochs are after the given time, the earliest effective date is chosen. If some epochs are on or before the given time, the latest effective date that is not after the given time is chosen.
The best representative algorithm tries to select the element set that would actually be current at the given time. If no element set is current (i.e. all are in the future at the given time) we take the earliest, to minimize peeking into the future. This is done even if that members backdate attribute is false.
|$set->set ($name => $value ...);||This method iterates over the individual name-value pairs. If the name is an attribute of the objects model (that is, if is_model_attribute () returns true), it calls set_selected($name, $value). Otherwise, it calls set_all($name, $value). If the set has no members, this method simply returns.|
|$set->set_all ($name => $value ...);||This method sets the given attribute values on all members of the set. It is not an error to call this on an object with no members, but neither does it accomplish anything useful.|
|$set->set_selected ($name => $value ...);||This method sets the given attribute values on the currently-selected member of the set. It is an error to call this on an object with no members.|
|$valid = $set->validate($options, $time ...);||
This method calls validate() on each of the members of the set,
removing from the set any members that fail to validate. The number of
members remaining in the set is returned.
The $options argument is itself optional. If passed, it is a reference to a hash of option names and values. See validate in Astro::Coord::ECI::TLE for the details.
Each member of the set will be validated at the time it would first be used for computations (if that is defined) and at the time its successor in the set (if any) would first be used for computation. In addition, each member will be validated at any of the $time arguments that happens to fall between these two times.
If a member is removed, validate() will call itself recursively to ensure that the new set is still valid.
Bugs can be reported to the author by mail, or through <http://rt.cpan.org/>.
Thomas R. Wyant, III (wyant at cpan dot org)
Copyright (C) 2005-2016 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
|perl v5.20.3||ASTRO::COORD::ECI::TLE::SET (3)||2016-01-06|