Most real-world behaviors are performed with incomplete information. Odor-guided locomotion, an ecologically important behavior essential to an animal's survival, is an example of such a behavior. Different odors activate different patterns of olfactory receptor neuron (ORN) classes providing information about which odor is present but does not provide any navigational information. In this study, we investigate the sensorimotor transformation that relates ORN activation to locomotion changes in Drosophila by optogenetically activating different combinations of ORN classes and measuring the resulting changes in locomotion. Three features describe this sensorimotor transformation: First, locomotion depends on both the instantaneous firing frequency (f) and its change (df); the two together serve as short-term memory that allows the fly to automatically adapt its motor program to sensory context. Second, the mapping between f-df and locomotor parameters such as speed or curvature is distinct for each pattern of activated ORNs. Finally, the sensorimotor mapping changes with time after odor exposure allowing integration of information over a longer timescale.