Costas signals are widely used in modern radar systems as frequency coded. The Costas-code-based waveform can achieve a nearly thumbtack shape of the ambiguity function (AF). However, the highest AF's sidelobe levels (SLLs) of Costas waveform equals just 1/N times of its main lobe level height, where N is the length of the Costas code. In this study, the authors suggest a generalised Costas waveform as a 'burst' of weighted pulses having variable time spacing between them, calling it as weighted variable time spacing Costas (WVTSC). They computed the AF analytical formulas of the designed WVTSC. They developed an adaptation model to adapt the WVTSC to target scattering coefficients, using the interior-point algorithm. The adaptive WVTSC yields much better Doppler cut and improved delay cut in the main lobe area of the AF, in the sense of SLL reduction. Moreover, they constructed an optimisation model resulting in optimal variable time spacing between the sub-pulses. The optimised WVTSC also yields considerable improvement in the AF's recurrent SLLs, using the genetic algorithm. The adapted optimised WVTSC design is proven, through simulation, to have better sidelobe performance than that of the initial waveform, without influencing the original delay-Doppler resolution, and without need to increase N.