Learn more about Russian war crimes in Ukraine.

Predicting earth radius

TODO: this was an attempt at round-earth vs. flat-earth using empirical data about travel times to predict curvature

Bahrain, Munich, Vladivostok, Astana

Munich-Bahrain: 4135 km Bahrain-Vladivostok: 7410 km Vladivostok-Munich: 8308 km Munich-Astana: 4202 km Bahrain-Astana: 3300 km Vladivostok-Astana: 4529 km

Arbitrarily fix Astana at (0,0). Arbitrarily fix Munich’s latitude at 0. Then we find: long for Munich (1 var), lat/long for Bahrain and Vladivostok (4 vars). to minimize error in predicted distance between all places.

There’s only one curvature which can make all these distances consistent. We first try with a flat earth and see what minimum error we get.

earth radius (1 var).

If the earth is flat, all these distances would be consistent.

Let’s start by driving from Astana to Munich. We find the distance to be 4202 kilometers. Starting with this, we can begin to model our flat world.

import tensorflow as tf
astana_lat = tf.constant(0., tf.float32) # Since the origin is arbitrary,
astana_lon = tf.constant(0., tf.float32) # we fix Astana there to reduce variables.
munich_lat = tf.constant(0., tf.float32) # Since rotation is arbitrary, we fix Munich at 0 latitude.
munich_lon = tf.Variable(10., tf.float32)
def distance_flat_earth(a_lat, a_lon, b_lat, b_lon):
    return tf.sqrt(tf.square(a_lat - b_lat) + tf.square(a_lon - b_lon))
astana_munich_distance_prediction = distance_flat_earth(astana_lat, astana_lon, munich_lat, munich_lon)
loss = tf.square(astana_munich_distance_prediction - DISTANCE_KM_ASTANA_MUNICH)
train_step = tf.train.GradientDescentOptimizer(0.1).minimize(loss)
with tf.Session() as sess:
    for _ in range(100):
    print("Final Munich lon: %s" % sess.run(munich_lon))
    print("Final Error: %s" % sess.run(loss))

What can computers do? What are the limits of mathematics? And just how busy can a busy beaver be? This year, I’m writing Busy Beavers, a unique interactive book on computability theory. You and I will take a practical and modern approach to answering these questions — or at least learning why some questions are unanswerable!

It’s only $19, and you can get 50% off if you find the discount code ... Not quite. Hackers use the console!

After months of secret toil, I and Andrew Carr released Everyday Data Science, a unique interactive online course! You’ll make the perfect glass of lemonade using Thompson sampling. You’ll lose weight with differential equations. And you might just qualify for the Olympics with a bit of statistics!

It’s $29, but you can get 50% off if you find the discount code ... Not quite. Hackers use the console!

More by Jim

Tagged . All content copyright James Fisher 2017. This post is not associated with my employer. Found an error? Edit this page.