#!/usr/bin/perl ## xiuguluan_mabolasi -- Are the distances enough to make the further higher one look lower? ## Copyright : https://www.gnu.org/licenses/gpl.html ## Author : https://www.jidanni.org/ ## Created On : Tue Jun 11 00:27:33 2019 ## Last Modified By: Dan Jacobson ## Last Modified On: Tue Jun 11 03:00:50 2019 ## Update Count : 84 # https://tp69.blog/2017/08/13/curvature-of-the-earth/ # Conclusion: indeed even though higher by 20m, Xiuguluan looks 11m lower. use strict; use warnings FATAL => q(all); use Math::Trig; my $w = 10; my $radius = 6378137; my %v = ( altitude => { Mabolasi => 3785, Xiuguluan => 3805 }, distance => { Mabolasi => 76.1, Xiuguluan => 78.7 } #km ); printf "%${w}s %4s %4s\n", qw/Mountain Alti Visu/; for (qw/Xiuguluan Mabolasi/) { $v{h}{$_} = sqrt( $radius**2 + ( $v{distance}{$_} * 1000 )**2 ) - $radius; printf "%${w}s %d %d\n", $_, $v{altitude}{$_}, $v{altitude}{$_} - $v{h}{$_}; } printf "%${w}s\n", "-" x 11; printf "%${w}s %4d %4d\n", "Difference", $v{altitude}{Xiuguluan} - $v{altitude}{Mabolasi}, ( $v{altitude}{Xiuguluan} - $v{h}{Xiuguluan} ) - ( $v{altitude}{Mabolasi} - $v{h}{Mabolasi} ); # https://en.wikipedia.org/wiki/Naked_eye says we can detect one arcminute printf "%${w}s %4d+ needed\n", "Naked eye", 2 * pi * ( $v{distance}{Xiuguluan} + $v{distance}{Mabolasi} ) / 2 * 1000 / 360 / 60; print "so must use binoculars to see difference.\n"