Archival tagging provides a unique way to study the spatial dynamics and habitat of pelagic fish. This technique generates lagrangian data of a particular type in marine ecology: although highly informative about processes at different scales (e.g. horizontal movements versus diving behaviour), such data are impaired by location errors and the lack of combination with actual environmental variability. The present paper introduces a framework for modelling bluefin tuna movement in relation to its habitat, using records of light, depth and temperature from archival tags. Based on data assimilation concepts and methods, we show how an explicit formulation of the observation process and the statistics of external variables (e.g. ambient temperature) can improve precision in geolocation. The proposed method is tested on synthetic data: significant reduction (40 to 50%) in the initial root-mean square error is achieved under different noise scenarios. Assimilating sea surface temperature also allows to perform on-line estimation of a range of observation biases. The performance of the model greatly benefits from the adequate formalisation of different variability sources, and allows potentially to reveal interactions between the fish and its habitat. Using this probabilistic approach, we, however, show that some patterns of interest (e.g. foraging in surface fronts) can hardly be retrieved in a context of large observational and environmental noise.