# apparent and absolute magnitude of meteors and space debris

I have a question regarding the apparent and absolute magnitude of space debris objects or meteors reentering the earth's atmosphere. I already understand the difference between apparent and absolute magnitude. The absolute magnitude is the brightness of the object if the object is at a distance of 100km and at zenith. And the apparent magnitude is how bright the objects appears to the observer.

But how can I determine the apparent magnitude of an objects observed from an observer? The objects has the distance $$d$$, the zenith distance $$Z$$ and the height $$h$$. On the internet I found the following equation:

$$M = m +5 \log(\cos(Z))$$ $$M$$ = absolute magnitude, and $$m$$ = apparent magnitude. I posted a picture below.

But how is this equation derived? I do not understand the equation. What can I do, if the height $$h$$ of the objects does not equal 100 km?

The book where i found this is "The Observer's guide to Astronomy" (Volume 2) pages 659 to 660! The formula appears to compare the squares of distances, not taking into account the difference in extinction (which is small for small zenith distances, and for different altitudes provided they're high enough), this means $$M - m = 5log(\frac{h}{cos(Z)})-5log(h_1)=-5log(cos z) - 5log(\frac{h_1}{100})$$. Also, I believe the formula should say -5 cos z ... the meteor from the picture provided is farther away from the one at zenith and at the same altitude and should have higher (numerical value) magnitude.