A modifier whose connection to the sentence is implied or intended but not actually made explicit is said to dangle. Dangling modifiers detract from the clarity of your writing, so you should make sure your modifiers are properly connected to the words they modify. To repair a dangling modifier, add the the noun or phrase that the modifier was intended to modify and rephrase the sentence accordingly.
When traveling at the speed of sound, the moon is
approximately 320 hours away. [The moon does not travel at the speed of
An object traveling at the speed of sound will reach the
moon in approximately 320 hours.