So I went online to find out how you can calculate the temperature of a planetary body based on the size and temperature of its star, and the body's distance from its star. That brought about this solution:
function calcBodyTempSolar(starTemp, starRadius, bodySemiMajorAxis) { //MAGIC math. Determines approx. body temp based on the body's distance from it's star.
return starTemp*Math.sqrt(starRadius/(2 * bodySemiMajorAxis)) * Math.pow(.7, 1/4)}
Next I thought "If I can know how hot a planet will be at a given distance, can I reverse that to determine the "Habitable Zone"?"
I reversed the equation above, but I'm getting the wrong numbers.
(Math.pow(starTemp/(254.58 * Math.pow(0.7, 1/4)), 2) * (starRadius/2))/AU
Running the above equation gives me the wrong number. I have input the proper temperature of earth* but it isn't giving me the right answer. (should be 1, is 1.428...)
*if earth had no atmosphere.
The source of the equations above, is here: https://www.astro.princeton.edu/~strauss/FRS113/writeup3/
I'm thinking that I simply reversed the first equation wrong. But I'm not sure. Any math people here to weigh in?