1. A method for generating a model of an environment enabling positioning within the environment, said method comprising: receiving a plurality of distance-dependent measurements from one or more receiving units, each of said distance-dependent measurements providing information relating to a distance between a receiving unit position of the one or more receiving units and a source position and said plurality of distance-dependent measurements providing information relating to distances between receiving unit positions and source positions for a plurality of sources; receiving information relating to a plurality of geographic positions, each of said geographic positions defining a receiving unit position or a source position; forming a candidate model, which defines candidate source positions for said plurality of source positions and candidate receiving unit positions for said plurality of receiving unit positions; iteratively reducing a model error of said candidate model, wherein said model error comprises a weighted contribution from distance-dependent errors, which are based on a difference between a distance-dependent value between a candidate source position and a candidate receiving unit position and the distance-dependent measurement related to the distance between the receiving unit position and the source position, and geographic position errors, which are based on a difference between a geographic position and a candidate position for the receiving unit position or source position; and outputting, from said iterative reducing, determined locations for said plurality of sources to form said model of the environment.