A method for configuring a channel encoding during a transfer of data packets from a transmitting apparatus towards a receiver apparatus , which are both in a traffic environment and of which at least one moves, wherein, by a control device of the transmitting apparatus : environmental data , which describes a predetermined environmental character of the traffic environment , and position data , which describes a relative position of the transmitting apparatus and the receiver apparatus to each other, are ascertained, based on the environmental data and the position data , by means of a predetermined radio link model , it is predicted by a prediction if a data packet , currently to be sent, of the data packets can be successfully decoded and/or reconstructed in the receiver apparatus with a currently adjusted encoding configuration of the channel encoding , and if the prediction does not signal success, it is switched to an extended encoding configuration , which generates a greater redundancy than the current encoding configuration , and the data packet to be sent is encoded with the extended encoding configuration and sent, characterized in that : the radio link model includes that a decision relating to an existence of a direct line of sight is generated, and if the existence of the direct line of sight is signaled, a parameter of a calculating rule for a distance-dependent success probability (E) relating to decoding and/or reconstructing the data packet is adjusted, wherein the existence of the line of sight is ascertained in the radio link model by means of an artificial neural network , which is trained to associate statement data relating to a probability of the existence of the line of sight with the ascertained environmental data and position data . environmental data , which describes a predetermined environmental character of the traffic environment , and position data , which describes a relative position of the transmitting apparatus and the receiver apparatus to each other, are ascertained, based on the environmental data and the position data , by means of a predetermined radio link model , it is predicted by a prediction if a data packet , currently to be sent, of the data packets can be successfully decoded and/or reconstructed in the receiver apparatus with a currently adjusted encoding configuration of the channel encoding , and if the prediction does not signal success, it is switched to an extended encoding configuration , which generates a greater redundancy than the current encoding configuration , and the data packet to be sent is encoded with the extended encoding configuration and sent, characterized in that : the radio link model includes that a decision relating to an existence of a direct line of sight is generated, and if the existence of the direct line of sight is signaled, a parameter of a calculating rule for a distance-dependent success probability (E) relating to decoding and/or reconstructing the data packet is adjusted, wherein the existence of the line of sight is ascertained in the radio link model by means of an artificial neural network , which is trained to associate statement data relating to a probability of the existence of the line of sight with the ascertained environmental data and position data . <EOS>