1. A method for creating a set of spreading codes for use in a satellite navigation system comprising a constellation of satellites, wherein each satellite in the constellation employs a tiered spreading code comprising at least a primary code having N1 bits and a secondary code having N2 bits, such that the tiered spreading code has an overall repetition length of N1*N2 bits, and wherein each satellite in the constellation is allocated a different secondary spreading code from said set of secondary spreading codes, the method comprising; generating an initial set of bit patterns, wherein each bit pattern represents a potential secondary spreading code; and performing an optimization process on bit patterns within the initial set of bit patterns, whereby at least some of the bit patterns in said initial set are modified or replaced, to create a final set of bit patterns for use as the set of secondary spreading codes, wherein the optimization process utilizes a performance or cost function derived from at least one of: (a) the auto-correlation function for a bit pattern or (b) the cross correlation function between different bit patterns.