Categories
R

Finally measuring Earth using trigonometry

Eratosthenes measured the world using shadows cast in two different cities at the same time. I’ve been wanting to replicate it for over  decade. Today I did. 5 volunteers from San Diego to Nashville all have the same style of pencil of the same length. Everyone is to measure the shadow on it at noon CST.  Today only 2 could do it. From the data, I have computed the following:

circumference_earth – 32744.22 miles
> real_circumference_earth<-24901 miles

Error:    0.3149762

So a rough, but useful first attempt. The R code I’m using is:

#computing circumference of earth

library(dplyr)
library(tidyr)
library(ggplot2)
library(animation)
library(readr)
setwd("~/Copy/R/climate change/")

real_circumference_earth<-24901
data<-as.data.frame(read_delim("earth shadow data.csv", ","))
data<-data[,-1]
pencil<- 19.0
avg_data<-(colMeans(data))
str(data)
avg_data
angle_mt<-180-90-atan(pencil/avg_data[1])/(2*pi/360)
angle_tc<-180-90-atan(pencil/avg_data[2])/(2*pi/360)
net_angle_tc<-angle_tc-angle_mt
angle_mt
angle_ratio_to_tc<-360/abs(net_angle_tc)
distance_trevor<-651.0
earth_circ_per_tc<-distance_trevor*angle_ratio_to_tc
earth_circ_per_tc
err_per_tc<-(earth_circ_per_tc-real_circumference_earth)/real_circumference_earth*100
err_per_tc