Branch Coverage

blib/lib/Astro/Coord/ECI.pm
Criterion Covered Total %
branch 286 442 64.7


line true false branch
139 0 182 if ref $static{'sun'}
140 151 31 if @args
142 182 0 unless exists $self->{'almanac_horizon'}
143 0 182 if ($self->{'debug'})
187 0 1205 unless ref $B and $B->represents(__PACKAGE__) and ref $C and $C->represents(__PACKAGE__)
193 1 1204 $self->{'inertial'} ? :
195 1 1204 $self->{'inertial'} ? :
232 0 1 unless defined(my $diameter = $self->get("diameter"))
235 0 1 if ($self->get('station')) { }
251 0 0 exists $mutator{$_[1]} ? :
289 0 16905 if @_ > 2
292 0 16905 $_[2] ? :
384 0 47021 if ($self->{'debug'})
402 16896 30125 if (defined $velocity[2])
404 16895 1 unless (defined $freq)
406 0 16895 if defined $freq
411 1 16895 if (defined $freq)
419 26494 20527 if $offset
425 47021 0 if $self->{'refraction'}
477 46104 1 ref $self ? :
484 26610 19495 if ($elevation > $horizon - "0.0349065850398866")
504 0 26610 if $self->get("debug")
533 917 0 $h >= 0 ? :
560 234606 131 unless (@args)
561 0 234606 unless ref $self
571 131 0 if (@args == 1) { }
573 12 119 unless ref $self
639 141872 2118 unless (@args)
641 53640 88232 if $cache->{'fixed'}{'ecef'}
642 88232 0 if $self->{'inertial'}
648 2118 0 if @args == 3
650 2118 0 if (@args == 6) { }
722 91717 93485 unless (@args)
724 91710 7 if $cache->{'inertial'}{'eci'}
725 7 0 if $self->{'specified'}
734 93485 0 if (@args == 3 or @args == 6) { }
785 71714 1697 if (@args) { }
786 0 71714 if @args % 3
812 238 1459 if $self->{'_ECI_cache'}{'inertial'}{'ecliptic_cartesian'}
874 71714 1714 if (@args) { }
876 0 71714 if @args % 3
924 0 1 if (&looks_like_number($self))
927 0 1 unless defined $time
1028 3 4383 if @args and embodies($args[0], __PACKAGE__)
1033 4383 3 unless $body
1035 2919 1467 if (@args) { }
3 1464 elsif ($body) { }
1036 0 2919 if @args % 3
1038 0 2919 if $body
1080 0 1 unless $station ||= $self->get("station")
1141 4 0 if ($body) { }
1144 0 4 @pos < @base ? :
1151 0 0 if $self->{'_ECI_cache'}{'inertial'}{'equatorial_unreduced'}
1200 3 1 if (@pos >= 6)
1216 0 4 unless $body
1226 3 1 if (@rslt >= 6)
1248 90553 0 if (@_ > 1) { }
1293 89927 2111 unless (@args)
1295 42990 46937 unless ($self->{'_ECI_cache'}{'fixed'}{'geocentric'})
1303 0 42990 if $self->get("debug")
1321 2111 0 if (@args == 3) { }
1329 0 2111 if $self->get("debug")
1404 0 52148 @args == 1 || @args == 4 ? :
1406 0 52148 $elps ? :
1411 0 52148 if $elps
1415 50039 2109 unless (@args)
1421 48199 1840 if $self->{'_ECI_cache'}{'fixed'}{'geodetic'} and not $elps
1422 0 1840 if ($self->{'debug'})
1431 0 1840 $elps ? :
1432 0 1840 if ($self->{'debug'})
1448 3 1837 if $z < 0
1469 0 1840 $vp * $vp >= abs $P ? :
1472 1840 0 $D >= 0 ? :
1487 3 1837 if $X < 0
1499 0 1840 unless $elps
1503 0 1840 if $self->get("debug")
1533 2109 0 if (@args == 3) { }
1537 0 2109 if $elps
1555 2109 0 $rhocoslatprime ? :
1617 1 207867 unless ref $self
1620 0 207868 unless exists $mutator{$name}
1622 1597 206271 if ($accessor{$name}) { }
1628 118677 89191 wantarray ? :
1648 3 0 if @vector > 3
1666 0 6 unless my $station = $self->get("station")
1699 0 0 if (@args == 3) { }
0 0 elsif (@args) { }
1705 0 0 unless my $sun = $self->get("sun")
1719 0 0 if $self->{'_ECI_cache'}{'inertial'}{'heliocentric_ecliptic_cartesian'}
1721 0 0 unless my $sun = $self->get("sun")
1747 0 0 if (@args) { }
1748 0 0 if @args % 3
1775 0 47027 if ($self->{'debug'})
1824 16902 30125 if (@tgt > 5)
1865 0 2 unless ref $self
1869 1 1 unless (@args)
1870 0 1 unless $self->{'universal'}
1875 1 0 unless defined $self->{'local_mean_time'}
1879 1 0 if (@args == 1) { }
1881 0 1 unless $self->{'specified'}
1884 0 1 if $self->{'inertial'}
1981 1042 1043 if (@args > 1 or defined $args[0] and $args[0] =~ / [^0-9] /msx) { }
1983 1042 0 unless defined $alt
1986 0 1042 if $precision % 2
1996 4166 2084 if ($base > 10) { }
1997 0 4166 if (my $inx = index($alpha, lc $chr)) < 0
2000 2082 2084 @chars > 1 ? :
2001 0 4166 if $inx > $limit
2008 0 2084 if $chr =~ / [^0-9] /msx
2026 0 1043 unless defined $precision and $precision > 0
2052 4168 2084 $base > 10 ? :
2059 1043 0 if @rslt
2060 1043 0 if @rslt > 1
2074 4167 2084 $inx % 2 ? :
2094 1652 1676 $self->can('period') ? :
2115 0 0 unless ref $self
2119 0 0 unless $body->represents(__PACKAGE__)
2125 0 0 $want ? :
0 0 if defined $want
2130 0 0 if ($denom = abs $denom) < "1e-11"
2156 0 0 $mid_angle >= 3.141592653589793116 ? :
2216 0 1633 unless ref $self
2220 0 1633 unless $body->represents(__PACKAGE__)
2226 204 1429 unless defined $upper
2227 1423 210 $upper ? :
2241 1632 3 unless ($elev < $angle || 0) == $rise
2243 1 2 if $end - $original > $give_up
2252 13234 12697 ($elev < $angle || 0) == $rise ? :
2258 1616 16 wantarray ? :
2305 0 8 unless ref $self
2310 0 8 unless $body->represents(__PACKAGE__)
2384 0 1664 unless ref $self
2388 0 1664 unless $body->represents(__PACKAGE__)
2393 879 756 $want ? :
1635 29 if defined $want
2397 0 1664 $denom >= 0 ? :
2398 0 1664 if ($denom = abs $denom) < "1e-11"
2408 771 893 mod2pi(($body->universal($begin)->geocentric)[1] - ($self->universal($begin)->geocentric)[1]) >= 3.141592653589793116 ? :
2417 1498 166 if (defined $want and $want != $above)
2419 752 746 $opposite ? :
2429 10600 10162 mod2pi($long - $merid + $opposite) < 3.141592653589793116 ? :
2436 1656 8 wantarray ? :
2454 1458 73852 unless defined $time
2494 0 73175 if (&looks_like_number($self))
2497 73173 2 unless defined $time
2518 2 0 if $_[1]
2554 0 1461 unless $end
2559 0 1461 unless $self->get("inertial")
2562 0 1461 unless defined(my $start = $self->get("equinox_dynamical"))
2568 1 1460 if ($sta = $self->get("station") and $sta->get("inertial"))
2570 0 1 if $sta->get("station")
2576 4 1457 if $start == $end
2730 0 0 unless my $name = pop @args
2733 0 0 if (@args == 0) { }
0 0 elsif (@args == 2) { }
2734 0 0 unless $known_ellipsoid{$name}
2772 73093 46 __classisa($_[0]->represents, $_[1]) ? :
73139 73141 defined $_[1] ? :
2796 18 1962 unless ref $self
2798 0 1980 if @args % 2
2804 0 2013 unless exists $mutator{$name}
2806 0 2013 unless "CODE" eq ref $mutator{$name}
2812 7 1972 if ref $self and $self->{'specified'} and $action & 1
2856 0 182 unless defined $value
2858 0 182 if ($special{$value}) { }
182 0 elsif (&looks_like_number($value) and $value >= -1.570796326794896558 and $value <= 1.570796326794896558) { }
2898 0 1 unless defined $value
2899 1 0 unless &looks_like_number($value) and $value >= "-1.5707963267949" and $value <= "1.5707963267949"
2910 13 0 if (defined $value)
2911 0 13 unless embodies($value, "Astro::Coord::ECI")
2914 0 13 if $value->get("station")
2925 0 2 unless embodies($value, $self->SUN_CLASS)
2928 2 0 unless ref $value
2939 90 54 if $_[0]->can("rebless")
2949 0 31 unless defined $value
2952 0 31 unless exists $known_ellipsoid{$value}
2987 0 380383 if @args
2993 217456 162927 if (defined $time) { }
2996 0 162927 unless ref $self
3001 0 162927 unless defined $self->{'universal'}
3012 0 236297 unless defined $time
3014 6 236291 unless ref $self
3017 60991 175306 if defined $self->{'universal'} and $time == $self->{'universal'}
3020 174763 543 if $run_model
3030 175199 121 if ($self->{'specified'})
3031 90495 84704 if ($self->{'inertial'}) { }
3042 0 36 unless "ARRAY" eq ref $tplt
3122 84744 90150 unless $self->can("time_set")
3124 90030 120 unless ($self->{'_no_set'}++)
3125 14 90016 unless eval { do { $self->time_set; 1 } }
3128 90030 120 unless --$self->{'_no_set'}
3129 14 90136 if ($exception)
3155 14 624589 unless (ref $self)
3156 0 14 unless @$args
3163 0 624603 if ($self->{'debug'})
3172 795071 0 if defined $_
3176 0 0 unless defined $_
3185 17 624586 if @$args % 3 == 1
3187 621448 3155 if ($self->{'specified'})
3188 243015 378433 if (@$args) { }
4 378429 elsif ($self->{'_need_purge'}) { }
3212 0 7139 unless -&PIOVER2 <= $_[1] and $_[1] <= &PIOVER2
3226 0 4220 unless -&TWOPI <= $_[1] and $_[1] <= &TWOPI
3240 0 2919 unless 0 <= $_[1] and $_[1] <= &TWOPI
3267 0 74634 unless @sph_data and not @sph_data % 3
3292 1 74633 if (@sph_data)
3366 0 50182 unless @cart_data and not @cart_data % 3
3375 50181 1 $cart_pos[0] || $cart_pos[1] ? :
3378 50181 1 $range ? :
3386 16898 33284 if (@cart_data)
3424 16898 0 if ($range > 0) { }
3427 16898 0 if ($diag > 0) { }
3500 0 7 if $self->{'debug'}
3508 0 7 if $self->{'debug'}
3512 7 0 if (@data > 5)
3541 0 88232 if (abs $equi - $dyn > $EQUINOX_TOLERANCE)
3551 18309 69923 if (@ecef > 3)
3561 0 88232 unless defined wantarray
3575 21 67210 unless (embodies($args[1], "Astro::Coord::ECI"))
3577 0 21 unless embodies($args[0], "Astro::Coord::ECI")
3580 21 0 if defined $args[1]{'universal'}