Feedback for the "Map the Debris" challenge

Tell us what’s happening:
After finally giving up trying to make sense of the challenge, I found the formula here: Map the Debris... WTF? . But that made me realize that either the Wikipedia article or the challenge is giving us the wrong information.

I’m talking about the fact that the data units in the challenge and the data units in Wikipedia don’t match up. The challenge gives us the Earth’s radius and the satellite’s altitude in kilometers even though the formula needs them in meters. It also gives us the GM in km^3/s^-2 even though the formula asks for them in m^3/s^2.

That’s why I couldn’t make sense of the challenge. I was converting the data from the challenge to fit the units in the formula when I didn’t even have to.

Whichever one has the wrong information (Wikipedia or the challenge) should be updated with the correct units so no one will have to be stuck on the challenge for so long like me.

Your code so far


function orbitalPeriod(arr) {
  var GM = 398600.4418;
  var earthRadius = 6367.4447;
  return arr;
}

orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris

I agree that the challenge isn’t very clear, but the info given is correct.

GM is given in km3s-2 which is the same as km3/s2.
You divide kilometers by kilometers or meters by meters, so it does not matter if they differ a factor 1000.

2 Likes

Ah yeah that makes sense. Thanks for clearing that up for me!

And thanks for explaining the negative exponent thing too. That also tripped me up.

1 Like