Geo-Horizon

 view release on metacpan or  search on metacpan

lib/Geo/Horizon.pm  view on Meta::CPAN

    my $param=shift();
    use Geo::Ellipsoids;
    my $obj=Geo::Ellipsoids->new($param);
    $self->{'ellipsoid'}=$obj;
  }
  return $self->{'ellipsoid'};
}

=head2 distance

The straight-line of sight distance to the horizon: This formula does not take in account radio or optical refraction which will be further the longer the wavelength.

  my $dist=$obj->distance($alt, $lat);  #alt in meters (ellipsoid units)
                                        #lat in signed decimal degrees
  my $dist=$obj->distance($alt);        #default lat => 0 (equator)
  my $dist=$obj->distance;              #default alt => 1.7

Formula from http://newton.ex.ac.uk/research/qsystems/people/sque/physics/horizon/

  Ds = sqrt(h(2R + h))



( run in 0.511 second using v1.01-cache-2.11-cpan-26ccb49234f )