{'fraction_non_alphanumeric': 0.027563259940847847, 'fraction_numerical': 0.025078047978968124, 'mean_word_length': 4.620339374350687, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The RMS Survey: Resolving kinematic distance ambiguities towards a sample of compact HII regions using HI absorption

We present high-resolution HI data obtained using the Australia Telescope Compact Array to resolve the near/far distance ambiguities towards a sample of compact HII regions from the Red MSX Source (RMS) survey. The high resolution data are complemented with lower resolution archival HI data extracted from the Southern and VLA Galactic Plane surveys. We resolve the distance ambiguity for nearly all of the 105 sources where the continuum was strong enough to allow analysis of the HI absorption line structure. This represents another step in the determination of distances to the total RMS sample, which with over 1,000 massive young stellar objects and compact HII regions, is the largest and most complete sample of its kind. The full sample will allow the distribution of massive star formation in the Galaxy to be examined.


INTRODUCTION
Massive stars (M ⋆ > 8 M ⊙ ) are responsible for most of the energetic phenomena in the Universe. They deposit large amounts of radiation, kinetic energy and enriched material into the interstellar medium during their lives. They may trigger further star formation in their surrounding environment. These feedback processes play an important role in regulating star formation within the surrounding environment, possibly triggering the formation of future generations of stars, and ultimately driving the evolution of their host galaxy (Kennicutt 2005). The specific mechanics of how and where they form is highly uncertain however. A large scale systematic survey aimed at identifying and characterising the properties of the massive young stellar objects (MYSOs) and compact/ultracompact Hii regions is required to address these issues. The Red MSX Source (RMS; Urquhart et al. 2008b) Survey is designed to return a large, well-selected sample of young massive stars suited to just this purpose.
The RMS survey consists of approximately 2000 MYSO candidates spread throughout the Galaxy (|b| < 5 o ) that were tion of molecular lines such as from CO, CS or NH 3 , which can be obtained relatively straightforward (e.g., Urquhart et al. 2007bUrquhart et al. , 2008aUrquhart et al. , 2011b. While the source velocity measurement and distance determination in the outer Galaxy is simple, a problem arises when calculating the kinematic distances of sources with Galactic radii less than that of the Sun -inside the solar circle. Within the solar circle there are two possible solutions for every radial velocity, corresponding to two radial distances. These radial distances are equally spaced on either side of the tangent point, one on the near side of the object's orbit and the other on the far side (see Fig. 1 for schematic diagram). Only sources actually located at the tangent point avoid this ambiguity. This effect is known as the kinematic distance ambiguity (KDA) and can result in luminosities being calculated with values that are orders of magnitude in error. However, as young, massive sources reach the main sequence whilst still embedded in their natal molecular cloud it is possible to resolve the KDA to these sources.
There are a number of methods discussed in the literature that can be applied to do this. For HII regions which have strong radio continuum emission the basic principle behind solving their KDA is that interstellar lines such as H 2 CO (formaldehyde, see e.g., Downes et al. 1980;Araya et al. 2001Araya et al. , 2002a, or Hi absorb (e.g., Kolpak et al. 2003) the continuum free-free emission of the Hii region. As radial velocities increase to a maximum at the tangent point along any line of sight, interstellar absorption at velocities higher than that of the Hii region implies that the Hii region lies at the far distance. If, on the other hand, the radial velocities of the absorption lines are smaller than the object's velocity, then the object is located at the near distance. A measure of the object's radial velocity can be obtained using CO emission from the surrounding cloud or radio recombination emission lines. This method was used by Fish et al. (2003) and Kolpak et al. (2003) to determine the distances to 20 and 49 UC Hii regions respectively. A similar method using H110α radio recombination line emission (for the object's radial velocity) and H 2 CO absorption was used by Araya et al. (2002b), Watson et al. (2003) and Sewilo et al. (2004).
For MYSOs which -by definition -do not yet have strong radio free-free emission (see e.g. Figure 6 in Hoare & Franco 2007), we can not use absorption against the target's radio continuum emission. Methods do exist that use Hi selfabsorption against any Galactic background emission instead (e.g., Jackson et al. 2002;Busfield et al. 2006), but these are much less certain (Anderson & Bania 2009).
The RMS survey has identified a sample of ∼1300 MYSO candidates and UC Hii regions in approximately equal numbers and located throughout the Galaxy. In this paper we focus on resolving the KDA towards a large sample of UC Hii regions (∼100) located primarily in the fourth quadrant of the Galaxy using the method described previously.
In the next section we briefly describe a set of targeted high resolution 21 cm radio observations towards ∼80 relatively bright Hii regions identified from our previous radio observations (i.e., Urquhart et al. 2007a). We complement these high resolution observations with lower resolution archival Hi data extracted from the Southern and VLA Galactic Plane Surveys (SGPS; McClure-Griffiths et al. 2005 and VGPS;Stil et al. 2006, respectively); an overview of these surveys is presented in Sect. 2.2. In Sect. 3 we compare the velocity of the Hi absorption seen in the two data sets with molecular line data obtained towards the RMS sources to resolve the kinematic distance ambiguities towards these UC Hii regions. We discuss the Galactic distribution of our sample of young massive stars with respect to the positions of the spiral arms and Galactic bar in Sect. 4. In Sect. 5 we summarise our results and present our conclusions.
2 Hi DATA

Description of set up and procedures
Observations were made using the Australia Telescope Compact Array (ATCA) between the 24th and 28th of January 2008 (Project code C1772; Lumsden et al. 2007). The ATCA is located at the Paul Wild Observatory, Narrabri, New South Wales, Australia and consists of 6×22 m antennas, 5 of which lie on a 3 km east-west railway track with the sixth antenna located 3 km farther west. This allows the antennas to be positioned in several configurations with baselines ranging in length from 30 metres up to 6 km.
A 6-km array configuration was used to achieve an effective spatial resolution for our sources of about 10 ′′ at 21 cm. The correlator was set up to make simultaneous continuum and spectral line observations at 21 cm; the continuum observations used a bandpass of 128 MHz centred at a frequency of 1384 MHz, while the spectral line observations used 8 MHz of bandwidth with 512 spectral channels centred at 1422 MHz to detect neutral hydrogen (Hi) absorption. With an 8 MHz bandwidth and 512 channels the spectral line observations provides a velocity range of approximately 1600 km s −1 with a channel resolution of ∼3.3 km s −1 .
In total 69 fields were observed which include 85 compact Hii regions identified by the RMS survey. We have chosen targets in the range 27-200 mJy to observe from the list of . Fields were grouped by position into small blocks of between 8-10 sources; these were observed in snapshot mode, which consisted of 5-6 cuts of 10 minutes (∼60 minutes total on-source integration) separated over a 10-12 hour period to provide good uvcoverage. To correct for fluctuations in the phase and amplitude of these data, caused by atmospheric and instrumental effects, each block was sandwiched between two short observations of a nearby phase calibrator (typically 2-3 minutes depending on the flux density of the calibrator). To allow the absolute calibration of the flux density and bandpass the primary flux calibrator 1934−638 was observed once each day. The theoretical continuum and spectral line sensitivity of these observations is 0.1 mJy beam −1 and 8 mJy beam −1 channel −1 , however, due to the limited uv-coverage the dynamic range limits the final sensitivity to a few times this. The field names and positions are presented in Table 1 along with the parameters of the restoring beam and 1σ r.m.s noise measurements obtained from emission free regions in the final continuum maps of each field.

Data reduction
The calibration and reduction of these data were performed using the MIRIAD reduction package (Sault, Teuben & Wright 1995) following standard ATCA procedures. Maps were made of the continuum emission out to the the FWHM of the primary beam (i.e., ∼30 ′ at 21 cm). The image pixel size was chosen to provide ∼3 pixels across the synthesised beam (in this case 2 ′′ ). A robust weighting of 0.5 was used in the deconvolution as it produces images with the same sensitivity as natural weighting, but with a much improved beam-shape and lower sidelobe contamination. These maps were CLEANed using up to a few thousand cleaning components, or until the residuals were less than three times the theoretical noise value.
These images were then examined for compact, high surface brightness sources using a nominal 4σ r.m.s detection threshold, where σ r.m.s refers to the image r.m.s. noise level. No emission was detected within six fields, with multiple sources detected in 12 fields and a single source being detected in the remaining 52 fields. In Table 1 we indicate the fields with no detected radio emission by appending a ⋆ to the field name. In Fig. 2 we present emission maps for a sample of the radio detections and tabulate the source parameters in Table 2.
Spectral cubes were subsequently created of 1.5 ′ ×1.5 ′ regions around each continuum source using the same parameters used for the continuum images, however, only a few hundred cleaning components were used to CLEAN each spectral channel. Finally, we produced an Hi spectrum for each continuum source by spatially averaging the Hi data within the 10 per cent contour of the emission region. Due to their minimum baselines interferometric observations effectively filter out emission from large angular scales. The shortest baseline for these observations was 337 m and in snapshot mode are only sensitive to angular scales 1 ′ , and thus, no background subtraction is necessary for these data.
From inspection of the Hi spectra we set three criteria the data needed to satisfy before the spectra were deemed usable for resolving kinematic distance ambiguities: 1) dips in the Hi spectra are only considered significant if they fall more than 4σ r.m.s below the mean spectral continuum level as determined from absorption free regions of the spectra; 2) the continuum level is greater than 30 mJy beam −1 channel −1 to ensure a 4σ r.m.s detection of the continuum and 3) absorption must be present at the same velocity as the Hii region's host cloud to ensure the source is genuinely associated with cold interstellar gas. The last of these criteria stems from the assumption that the HII region is still deeply embedded within its natal molecular cloud, which should produce an absorption at   a similar velocity in the 21 cm spectrum to that of the molecular line velocity (±10 km s −1 ); if this is not the case it may be that the molecular cloud and radio emission have been incorrectly associated. In total the Hi data towards 53 Hii regions satisfied these selection criteria; a sample of the continuum maps and Hi spectra are presented in Figs. 2 and 3, respectively.

Archival Data Sets: SGPS and VGPS data
We complement our targeted high-resolution observations with lower-resolution, Hi continuum-included data extracted from the Southern Galactic Plane Survey (SGPS; McClure-Griffiths et al. 2005) and the VLA Galactic Plane Survey (Stil et al. 2006, VGPS). The SGPS combines interferometric observations conducted with the Compact Array and Parkes single-dish data to cover two regions; SGPS I l=253-358 • and SPGS II l=5-20 • with a Galactic latitude coverage of |b| 1.5 • , an angular resolution of ∼2 ′ , and an r.m.s. sensitivity of ∼1 K. The VGPS covers the range of Galactic longitudes from 18 • to 67 • in the Galactic first quadrant. The latitude coverage increases with longitude from |b| < 1.3 • to |b| < 2.3 • . 21 cm data was taken using the VLA and the Green Bank Telescope which were subsequently combined to produce data cubes with 1 ′ ×1 ′ ×1.56 km s −1 resolution, with velocity channels of 0.824 km s −1 .
To identify RMS sources associated with 21 cm radio emission we extracted continuum emission maps from the archives and searched for positional coincidences between the RMS and radio sources. Continuum-included Hi spectra were subsequently extracted towards all RMS sources found to be associated with 21 cm emission, spatially integrating over the radio emission region to obtain a source averaged Hi spectrum towards each source. Unlike the targeted observations discussed in the previous section these data include short spacing information and therefore include a contribution from the large-scale background emission that has been removed from the source-averaged spectra.
Following Anderson & Bania (2009) the background contribution was estimated by averaging the emission found within four regions located as near as possible to the continuum source taking care to avoid any other nearby continuum sources. These regions were chosen to surround the target source to compensate for any gradients that may be present in the background emission. The source averaged spectra were determined from a small region centred on the strongest continuum emission. The final spectra were produced by subtracting the background emission from the source-averaged spectra. In Fig. 4 we present a sample of the background subtracted Hi spectra obtained towards RMS sources from the SGPS and the VGPS.

Receiver noise and emission fluctuation
There are two important sources of noise that need to be considered when determining the reliability of any particular absorption feature; these are the receiver noise and Hi emission fluctuations. We have estimated the receiver noise by calculating the standard deviation using the absorption free channels in each spectra. We set a threshold value to be 4 times the standard deviation (4σ r.m.s ) and require the absorption to be larger than this to be considered significant. This threshold value is shown on the plots presented in Figs. 3 and 4 by a dashed horizontal line.
The second source of noise is due to Hi emission fluctuations. These are present on all angular scales (Green 1993) and can result in positive and negative wiggles in the observed spectrum, particularly where the Hi emission is bright, which can confuse the analysis. To estimate the emission fluctuations in the background we have calculated the standard deviation of the off-source spectra as a function of velocity (cf. Anderson & Bania 2009). The emission fluctuations are a strong function of baseline length and therefore we might expect them to be lower for our targeted observations than for the archival SGPS and VGPS data, and this is indeed the case. In fact we found the emission fluctuations for the targeted observations to be much smaller than the threshold value derived from the receiver noise and so can be neglected. However, the emission fluctuations estimated for the archival data are in many cases comparable to the receiver noise and so need to be considered; these are shown on the plots presented in Fig. 4 by the yellow horizontal line. In these cases, since the emission fluctuations are not independent of the receiver noise, we require that the depth of the absorption feature must be larger than 4 times the receiver noise (i.e., σ r.m.s ) and larger than the background emission fluctuations present in the spectrum to be considered reliable.

RESULTS AND ANALYSIS
In total we have identified 122 Hii regions with strong continuum emission displaying significant Hi absorption -53 highresolution, ATCA-targeted observations and 69 drawn from the SGPS and VGPS data sets. The two data sets have 17 sources in common. The majority of the Hii regions targeted in these observations were too weak to provide a significant continuum in the lower resolution survey data that are instead dominated by Hi emission and therefore do not satisfy our criteria for inclusion here. Therefore the total number of discrete sources in the combined data sets is 105. In this section we describe the method used to resolve the distance ambiguities towards these Hii regions.
We have calculated distances for all sources that have been assigned a unique kinematic velocity using the Brand & Blitz (1993) Galactic rotation curve and assuming the distance to the Galactic centre to be 8.5 kpc and the radial velocity at the position of the Sun to be 220 km s −1 . In Table 3 we present the source names, velocity, kinematic distances, assigned distance and bolometric luminosity -the distance assignments will be discussed in the next section. In the following two subsections we test the reliability of these results by comparing the distance solutions obtained for the sources for which both high-and low-resolution data are available and with distances assigned by previous studies reported in the literature (see last column of Table 3 for references).

Resolving the Kinematic Distance Ambiguity
We have based our kinematic distance ambiguity resolutions for this sample of Hii regions on work presented by Kolpak et al. (2003). These authors measured the source velocity (v S ), the velocity of the tangent point (v T ) and the velocity of the highest velocity of absorption (v A ) of a sample of Northern hemisphere Hii regions and found their sources fell into two distinct groups; those where the v T -v S ≃ 0 and showed no dependence on v T -v A , and those where v T -v S increases with increasing v T -v A . These two groups are consistent with expectations for Hii regions located at the far and near distance respectively.
Using the Kolpak et al. (2003) method requires only measuring the three velocities. Making the assumption that the Hii region is still embedded within its natal molecular cloud, we can use 13 CO emission to determine the source velocity (i.e., Urquhart et al. 2007bUrquhart et al. , 2008a. We determine the velocity of the tangent point using the empirical relationship between the Hi termination velocities and Galactic longitude derived by McClure-Griffiths et al. (2005). Finally, we measure the absorption velocity by estimating the stan-dard deviation of the Hi spectrum from absorption free channels, and measuring the minimum velocity where the absorption dips is larger than 4σ r.m.s and larger than the value of Hi emission fluctuations -for sources located in the Northern Galactic Plane this becomes the maximum velocity. In Table 3 we present the measured velocity components for each Hii region.
In Figs. 3 and 4 we present plots of the 21 cm continuum spectrum towards each source where significant Hi absorption is seen. On these plots the velocity of the tangent point, the source velocity and the absorption velocity are indicated by the blue, red and green vertical lines, respectively. The grey horizontal and yellow line show the 4σ r.m.s threshold level determined from the receiver noise and the Hi emission fluctuations below which absorption is considered significant (see Sect. 2.3 for details). The grey shaded region shows the possible deviation of the source velocity from pure circular rotation due to streaming motions (±10 km s −1 ; Burton 1971;Stark & Brand 1989). Of these we find three where the source velocity is within 10 km s −1 of the tangent velocity and since this is smaller than the uncertainly introduced by the streaming motions, we have placed these sources at the distance of the tangent.
To determine the correct distance assignments Kolpak et al. produced a simulation with 10,000 Hii regions the results of which are included in Fig. 5; the diagonal and horizontal shaded regions show the expected locations in the velocity parameter space of sources at the near and far distances, respectively. The dark grey bands mark the region of parameter space where 90 per cent of the simulated sources were located, and the lighter grey region outlines a 10 km s −1 extension to the simulated data to allow for streaming motions. Sources located in the diagonal shaded region of the plot can be assigned a near distance with a high degree of confidence, and sources located in the horizontal shaded region of the plot can be assigned a far distance with a high degree of confidence. The darker triangular region located towards the lower left quadrant of the plot indicates the overlapping region of parameter space where the distance assignments are inherently more uncertain. This region is divided by a dashed line with sources located above the line being assigned to the near distance, and sources located below being assigned a far distance, however, both with a lower degree of confidence.
Using the plot presented in Fig. 5 we are able to assign distances to 95 Hii regions depending on their association with the various regions discussed in the previous paragraph. We place 59 at the far distance, 33 at the near distance and three at the tangent. In Table 3 we present derived distances and distance assignments; we denoted lower confidence assignments by appending a '?' to the distance assignment.
We find 10 sources that are located between the grey horizontal and diagonal bands of the plot; we indicate these sources by placing an ellipsis in the KDS column of Table 3. The available velocity data are not sufficient to resolve the distance ambiguity for these sources, and additional information has been sought before a distance can been assigned. In the following subsection we will discuss the results of a literature search which has allowed us to resolve the distances to eight of these sources, two at the far distance and six at the near distance. The distance allocations for these eight sources are indicated on the plot presented in Fig. 5 by the up and down arrows, respectively. We were unable to find any additional information for the remaining two sources (i.e., G338.9173+00.3824, G340.2768−00.2104) and consequently no distance has been assigned.

Notes on specific sources
In the previous subsection we identified ten sources that are located in a region of the plot presented in Fig. 5 that makes allocating a distance problematic. We have conducted a literature and SIMBAD search to find complementary information and/or associations with known giant molecular cloud (GMC) complexes to help break the distance ambiguities towards these sources. As a result of this analysis we were able to associate seven sources with one of four well known complexes. In this subsection we present a summary of this review and the assigned distance.

W31-South Complex: G010.1615−00.3623
The Hi spectrum shows clear evidence of distinct absorption between the tangent and source velocities; this would suggest this source is located at the far distance, however, the absorption stops far short of the velocity of the tangent which makes a distance determination problematic. Sewilo et al. (2004) observed H110α and H 2 CO towards this source using the NRAO Green Bank Telescope and obtained similar velocities. They placed this source at the far distance but noted that the non-detection of Hi absorption at the tangent point velocity presented a problem. Fortunately, there have have been a number of spectroscopic studies that have determined distances to W31; both Blum, Damineli & Conti (2001) and Furness et al. (2010) determined similar distances of 3.4 kpc and ∼3.3 kpc, respectively. More recently Moisés et al. (2011) determined the distances to W31-South and W31-North to be 3.55 and 2.39 kpc using spectrophotometric measurements. These distances are in reasonable agreement with the near kinematic solution of 2.5±1.6 kpc.
The position and velocity of G010.1615−00.3623 would place it in W31-South complex of molecular clouds and bright Hii re- Table 3. Summary of measured source, tangent and absorption velocities, kinematic distances and results of our kinematic distance ambiguity analysis. Notes: 1) We indicate the ten sources that are located in a region of Fig. 5 that make a distance ambiguous by an ellipsis in the KDA solution column (Col. 10). 2) Distances that have been assigned using information taken from the literature are discussed in Sect. 3.2 and shown in bold in Col. 11. 3) If a more reliable distance is available for a particular source or complex we have adopted this value. We identify these sources by adding a superscript to the distances given in Col. 11; the superscript indicates the reference from which the distance is drawn. References: (1)   Notes: 1) We indicate the ten sources that are located in a region of Fig. 5 that make a distance ambiguous by an ellipsis in the KDA solution column (Col. 10). 2) Distances that have been assigned using information taken from the literature are discussed in Sect. 3.2 and shown in bold in Col. 11. 3) If a more reliable distance is available for a particular source or complex we have adopted this value. We identify these sources by adding a superscript to the distances given in Col. 11; the superscript indicates the reference from which the distance is drawn. References: (1) Sewilo et al. (2004), (2) Haynes et al. (1979) gions and we have therefore allocated a distance of 3.55 kpc to this source.

RCW 106 Complex
Comparing the angular projection and velocities of our sample we find 10 sources are embedded within this giant molecular cloud associated with the RCW 106 star forming region (l ∼333 • , b ∼−0.5 • ). Bains et al. (2006) mapped the molecular structure of the whole complex using 13 CO. Examination of these data reveals all of these sources are associated with this complex (i.e., they are all connected in lbv space). This sample includes two sources we have so far been unable to allocate a distance for; these are G332.5438−00.1277 and G332.6450−00.6036. Of the remaining eight sources we have placed six at the near distance and two at the far distance (i.e., G332.1544-00.4487 and G333.6032−00.2184). The far distance allocation was determined using the lower resolution Hi data which is less reliable (see discussion Sect. 3.3 for more detail) than the high resolution data and therefore it is more likely that this complex is located at the near distance. The small differences in radial velocity across the complex (of order a few km s −1 ) results in a range of near kinematic distances of 3.3-3.8 kpc, which is consistent with the distance of 3.6 kpc determined by Lockman (1979) and the spectrophotometric distance of 3.96 kpc determined by Moisés et al. (2011). It is the latter of these distances we have allocated to all of the sources associated with this complex.

G332.783+0.792
G333.0058+00.7707 is positionally associated with the Hii region G332.783+0.792 observed by Caswell & Haynes (1987) who placed this source at the near distance. The source velocity determined from CO observations is −48.3 km s −1 , which compares very well to the velocity of the H 2 CO absorption feature at −48.4 km s −1 and the RRL velocity of −52 km s −1 reported by Caswell & Haynes (1987). It is likely that G333.0058+00.7707 is physically associated with this Hii region and we have therefore adopted the near distance allocated by Caswell & Haynes (1987) for this source.

G345.555−0.042 Complex
G345.5285−00.0508 and G345.5472−00.0801 are located in the G345.555−0.042 GMC complex. The Hii region associated with this complex was observed by Caswell & Haynes (1987) and found to have a RRL velocity of −6 km s −1 . The highest velocity H 2 CO Figure 6. Plot of the velocity differences of the nineteen Hii regions for which both high and low resolution data is available; the high and low resolution data is shown in red and blue respectively, with matching sources being connected by a straight line. component was measured at −15 km s −1 , which led them to place this source at the far distance. We also adopt this kinematic distance for this complex.

Comparison of high and low resolution data
High-and low-resolution data are available for seventeen sources and it is therefore possible to compare the results obtained from different angular resolution data for consistency. In Fig. 6 we present a plot showing the velocity differences obtained for the overlapping high-and low-resolution samples (coloured red and blue respectively); the high-and low-resolution data for each source are linked by a solid line. The source and tangent velocities are independent of the resolution of the Hi data for any given source and so the x-axis position for each source is unchanged. The choice of angular resolution only affects the measured velocity of the absorption feature.
In Table 4 we provide a summary of the kinematic distance solutions derived from the high and low resolution data sets as well as the source and tangent velocities, and the velocity offset between the two measurements of the absorption features. Comparing the results for the high and low resolution data reveals them to be in reasonable agreement with a velocity difference between the absorption features measured from the high and low resolution data (|∆v A |) less than 10 km s −1 in 11 cases (∼60 per cent). Looking at the kinematic distance solution derived from the different resolution data sets we find agreement in 11 of the 17 sources in common.
We identify the six sources where the distance allocation differs by appending a † to the MSX name in Table 4. For four of these we are only able to resolve the distance ambiguity using one of the available data sets. This leaves only two sources (i.e., G326.7249+00.6159 and G345.4881+00.3148) where the differences in the velocity of the absorption features seen in the spectra have resulted in incorrect distances being assigned. In Fig. 7 we present the high and low resolution Hi spectra for these two sources. For both sources the structure of the absorption features seen in the high-resolution data are broadly repeated in the lower resolution SGPS spectra, however, the lower-resolution spectra also show a number of additional absorption dips lying between the source velocity and the tangent velocity. The higher signal-to-noise ratio of the ATCA data and the fact that it is relatively unaffected by contamination from diffuse continuum emission make the neardistance solution for these two sources very reliable. We therefore conclude that the additional absorption features seen in the SGPS spectrum are not associated with either source. The cause of these additional absorption features seen in the SGPS data is unclear but it is possibly they are the result of fluctuations in the background and/or noise.
We notice that, for five of the six sources where the distance allocation determined from the high-and low-resolution data, the lower-resolution data have resulted in absorption features being detected significantly closer to the the tangent velocity than found for the high-resolution spectra. We would therefore conclude that these anomalous absorption features associated with the SGPS data are quite common and as a consequence the distance allocations made using these data are less reliable than found using higher-resolution data. It is hard to estimate the impact this uncertainty may have on the overall reliability due to the small sample of sources for which we have both high-and lower-resolution data available. However, this could explain the ∼20 per cent disagreement often found from similar comparisons reported in the literature (e.g., Green et al. 2011, Anderson & Bania 2009).

Comparison with previous studies
Resolving distance ambiguities is crucial for many aspects of Galactic astronomy but particularly for understanding large-scale structure of the Milky Way. As a consequence solving these ambiguities has become an intense area of research in recent years which has resulted in a number of publications. To check the reliability of Figure 7. Hi spectra taken towards the two source where distance determined from the high and low spatial resolution data disagree. In the top and bottom panels we present the ATCA and SGPS spectra, respectively. The source velocity (v s ), the velocity of the tangent point (v t ) and the position of the first absorption minimum (v a ) are shown by the red, blue and green vertical lines, respectively. The grey vertical band covers the velocity region 10 km s −1 either side of the source velocity and is provided to give an indication of the uncertainty associated with it due to streaming motions. The dotted horizontal and solid yellow lines shows the 4σ r.m.s receiver noise level determined from absorption free parts of the spectra and the Hi emission fluctuations, respectively. our distance assignments we have compared our results with those previously reported in the literature.
Excluding a single source placed at the tangent point we find 51 of our sample have distances previously reported in the literature (see last column in Table 3 for references). Of these we find agreement between the distances derived in this paper and those given in the literature in 41 cases, which corresponds to ∼80 per cent of the sample. However, there are a significant number of cases where our distance allocations disagree with those in the literature; in Table 5 we present a summary of these sources along with the distance determined in this paper and the distance previously determined in the literature.
We find that distances of 7 of the 10 sources presented in Table 5 have been determined using the SGPS data. Moreover, in all of these cases we find that the SGPS data suggests a far distance allocation therefore the anomalous absorption features discussed in the previous subsection could be a large contributing factor. We share these sources with three other studies; three with a study based on Hi self-absorption using methanol masers to trace the velocity of the star formation regions (Green & McClure-Griffiths 2011), six sources with a radio recombination line (RRL) emission survey of southern Hii regions (Caswell & Haynes 1987), and one source (G339.5836−00.1265) which is included in both of these and Haynes et al. (1979). Green & McClure-Griffiths (2011) has used the SGPS continuum subtracted data to look for Hi self-absorption at a similar velocity to the methanol maser velocity to resolve the distance ambiguity to a large sample of sources. Of the four sources we share with Green & McClure-Griffiths (2011) three have been observed at high resolution (∼10 ′′ ) with the ATCA and we therefore consider the distances allocated using this data more reliable. Indeed Green & McClure-Griffiths (2011) place a lower confidence for all of the sources that are shared between the two surveys. The fourth source (G339.5836−00.1265) we share with the sample of Green & McClure-Griffiths (2011) (G339.582−0.127) has also been observed by Caswell & Haynes (1987) and at higher resolution by Haynes et al. (1979) (G339.578−0.124). The velocity of the peak methanol maser, CO emission and RRL are −30.4, −34.1 and −30 km s −1 , respectively, and thus are all likely to be associated with the same region. Both Caswell & Haynes (1987) and Haynes et al. (1979) place this source at the far distance, which agrees with our evaluation, however, Green et al. places it at the near distance. Given the data available we consider the far distance to be more likely.
In total we share 21 sources in common with Caswell & Haynes (1987) and disagree with their distance allocation in six cases (∼28 per cent). The main criterion used by Caswell & Haynes (1987) to determine if a particular source was located at the near distance was by association with an optical counterpart. This was based on the fact that it is not generally possible to detect the optical counterparts for sources more distant than ∼6 kpc. However, Caswell & Haynes (1987) note that this may sometimes be wrong if there is a chance alignment of a nearby optical nebula with a more distant Hii region.
This proportion of disagreement with Caswell & Haynes (1987) is similar to that reported by Green & McClure-Griffiths (2011) and Anderson & Bania (2009). The agreement between this work and previous studies is extremely good and we believe that the limits are a fair representation of the inherent uncertainly associated with the method we have used to resolve distance ambiguities.

GALACTIC STRUCTURE
We have been able to assign a distance to 102 of the 105 Hii regions in our sample, with 39 (33 with high confidence) sources being placed at the near distance and 60 (49 with high confidence) being placed at the far distance. Three Hii regions were located at the distance of the tangent point and we were unable to resolve the distance ambiguity for four sources.
In this section we will use the distance and luminosity results to investigate the spatial distribution of this sample of Hii regions with respect to large-scale structure features of the Milky Way. Optical observations of spiral galaxies reveal an intimate relationship between spiral arms and the galactic population of young massive stars and their associated Hii regions. Regions of massive star formation are almost exclusively found to be associated with the spiral arms (Kennicutt 2005) where molecular clouds are thought to form at the leading edges of spiral arms from gas compressed through spiral density waves (Roberts 1969). The Galactic distribution of massive young stars could, therefore, be an important probe of Galactic structure.
In a separate paper we have estimated the bolometric fluxes of a large number of young massive stars identified by the RMS survey. This has been done by fitting stellar models to each source's spectral energy distribution using infrared to millimetre flux measurements (see Mottram et al. 2010Mottram et al. , 2011b for details). Combining these bolometric flux values with the distances determined in the previous section allows us to estimate the bolometric luminosity of each Hii region. The calculated bolometric luminosities can be found in the Col. 13 of Table 3.
In an effort to examine the distribution of this sample of Hii regions with respect to the large-scale structure of the Milky Way, we plot their projected positions in Fig. 8 over an image of the Galaxy. The size of the symbols is proportional to each source's bolometric luminosity and, for Hii regions that are associated with a complex with a known distance, the complex distance has been adopted. The background image used in this figure has been produced by Robert Hurt of the Spitzer Science Center in consultation with Robert Benjamin (University of Wisconsin-Whitewater) and attempts to synthesise all that has been learnt about Galactic structure over the past fifty years including: a 3.1-3.5 kpc Galactic Bar at an angle of 20 • with respect to the Galactic Centre-sun axis (Binney et al. 1991;Blitz & Spergel 1991;Dwek et al. 1995), a second non-axisymmetric structure referred to as the "Long Bar"  with a Galactic radius of 4.4 ± 0.5 kpc at an angle of 44 • ±10 • (Benjamin et al. 2005), the Near and Far 3kpc arms, and the four principle arms: Norma, Sagittarius, Perseus and Scutum-Centaurus. The position of the arms is based on the Georgelin & Georgelin (1976) model which has been modified to incorporate Very Long Baseline Array maser parallax measurements (e.g., Xu et al. 2006) and refined directions for the spiral arm tangents from Dame, Hartmann & Thaddeus (2001). The Perseus and Scutum-Centaurus arms have been emphasised in this image to reflect the overdensities seen in the old stellar disk population towards their expected Galactic longitudes tangent positions (Benjamin 2008;Churchwell et al. 2009). The number of Hii regions with resolved distance ambiguities presented here is not sufficient to expect to see evidence of "well-defined" spiral structure without something to guide the eye. However, it is clear from a visual examination of Fig. 8 that the Hii regions are tightly correlated with the expected position of the spirals, with a large number of Hii region lying on or near an arm and the inter-arm regions much more sparsely populated.
In Fig. 9 we show the distribution of the southern sample of Hii regions as a function of Galactocentric radius. We have exclude the northern Hii regions as there are too few to draw any reliable conclusions and their distribution has already been discussed by Urquhart et al. (2011a). To avoid any Malmquist-type bias we only include Hii regions with bolometric luminosities above our completeness limit (∼10 4 L ⊙ ; Mottram et al. 2011b). The distribution of the southern sample of Hii regions shown in Fig. 9 reveals the presence of a strong peak at a Galactocentric radius between approximately 5.5-6 kpc. A significant contribution to this peak in source counts is provided by a cluster of luminous Hii regions that are positionally coincident with the southern end of the Galactic Long Bar, which is located at a Galactic longitude of ∼340 • . A similar increase in the RMS source density is seen in the northern Galactic plane at a Galactocentric radius of ∼4 kpc, which is positionally coincident with the intersection of the Long Bar and the Scutum-Centaurus arm (see Urquhart et al. 2011a for details). There is also some evidence of a second peak in the radial distribution between 7-7.5 kpc, which is roughly coincident with the Galactocentric radius of the Scutum-Centaurus arm, however, a larger sample will be required before we can determine whether this peak is significant.
The overall structure of the Galactocentric distribution found for the northern and southern Galactic plane is markedly different Figure 8. Galactic distribution of the RMS selected sample of UC Hii regions located within the solar circle presented in this paper. The distribution of Hii regions is superimposed over a sketch of how the Galaxy is thought to appear if viewed face-on from the north Galactic pole with Galactic centre at (0,0) kpc and the Sun at (0,8.5) kpc; the positions of the Galactic centre and Sun are indicated by the small circle. This image has been produced by Robert Hurt of the Spitzer Science Center in consultation with Robert Benjamin and attempts to synthesise many of the key elements of Galactic structure using the best data currently available (see text for more details). The positions of the Hii regions are shown as red-in-black circles the sizes of these circles give an indication of their respective luminosities. In the upper right corner we give the luminosities for a sample of zero age main sequence stars. The Roman numerals in the corners refer to the Galactic quadrants and the two thick white lines originating from the location of the Sun enclose the region of the Galactic Plane excluded from the RMS survey (350 • < l < 10 • ). The dot-dashed circles represent the locus of tangent points and the Solar Circle. from each other (cf. Fig. 10 of Urquhart et al. 2011a). Our analysis of the Galactocentric distribution of the RMS sample of Hii regions and MYSOs located in the northern Galactic plane identified three strong peaks at approximately 4, 6 and 8 kpc; these peaks were shown to be coincident with the intersection of the Long Bar and the Scutum-Centaurus arm, and Galactocentric radii of the Sagit-tarius and Perseus arms, respectively. However, the detection of a single strong peak in the Galactocentric distribution of the southern Galactic plane would suggest that the overall structure is different. The distribution with Galactocentric radius is only dependent on the Galactic rotation curve and not on the solution of near-far ambi- Figure 10. Luminosity distribution as a function of heliocentric distance. The dark line and light grey shaded region indicates the limiting sensitivity of the MSX 21 µm band and its associated uncertainty. The sensitivity has been estimated by first calculating the flux in the MSX 21 µm (band E) using F E = 4.041 × 10 −14 S 21 Wm 2 (Cohen, Hammersley & Egan 2000), where S 21 is the MSX 21 µm detection limit (∼2.7 Jy). This value is then multiplied by a factor of 24, calculated from the ratio of bolometric fluxes, determined from SED fits, to the MSX band E fluxes (Mottram et al. 2011b). The horizontal dotted line indicates the completeness limit of the RMS survey which corresponds to luminosity of a B0 zero age main sequence star. guity, and therefore, the differences in Galactocentric radii of peaks seen in the northern and southern Galactic planes are significant.
In Fig. 10 we present a plot showing the distribution of source luminosities as a function of heliocentric distance along with the MSX 21 µm limiting sensitivity. The number of sources located at the near and far distances is roughly equal, however, this is a result of the completeness limit since the sensitivity of the 21 µm MSX band used for our initial selection (∼2.7 Jy) has resulted in the detection of many more nearby lower-luminosity Hii regions that fall below the detection threshold at larger distances. The nominal MSX 21 µm sensitivity corresponds to a detection limit of ∼10 4.4 L ⊙ at 15 kpc (Mottram et al. 2011a). Using this as an estimate of the completeness limit we find the ratio of far to near sources is ∼2.3, which is similar to the proportion previously reported (e.g., Kolpak et al. 2003;Pandian, Momjian & Goldsmith 2008;Anderson & Bania 2009).

SUMMARY
High-resolution (∼10 ′′ ) radio continuum observations were made towards 85 Hii regions identified by the Red MSX Source (RMS) survey in an effort to resolve kinematic distance ambiguities associated with objects located within the Solar circle. We found the continuum emission was strong enough towards 53 of these Hii regions to allow Hi absorption to be sufficiently detected, and thus, for a distance ambiguity to be resolved. We complement these targeted high-resolution data with 21 cm spectral line data from the Southern and VLA Galactic plane surveys (SGPS and VGPS re-spectively) and identified a further 69 Hii regions with sufficiently strong radio continuum to allow the distance ambiguities to be resolved. In total these two data sets provide continuum information for 105 Hii regions, with both high and low-resolution data available for 17 sources.
By measuring the velocity of the Hi absorption and source velocity with respect to the velocity of the tangent point we have been able to resolve the distance ambiguities for 94 Hii regions and with the aid of additional information drawn from the literature we have assigned distances to a further eight sources. In total we present distances for 102 Hii regions placing with 39, 60 and 3 sources at the near, far and tangent distances, respectively. Comparing the distances determined for the 17 sources common to both the high and low-resolution data sets we find agreement in only ∼65 per cent of cases. This suggests that distances assigned by applying this absorption method to low-resolution data are far less reliable than those assigned using high-resolution data. We also find good agreement with the distances we have determined with those of previous studies reported in the literature.
We investigate the Galactic distribution of this sample of Hii regions with respect to the large-scale structural features of the Milky Way. Although the sample statistics are too small to expect the Hii regions to clearly trace spiral-arm structures, we do find the vast majority to be coincident with the expected positions of the far-3 kpc, Norma and Scutum-Centaurus spiral arms, with the inter-arm regions largely devoid of any Hii regions. The Galactocentric distribution of southern Hii regions reveals a single strong peak at approximately 6 kpc, and is therefore very different to the distribution seen for the RMS northern sample of Hii regions and MYSOs (Urquhart et al. 2011a).
In this paper we derive distances and luminosities to a sample of ∼102 Hii regions identified from our programme of follow-up observations designed to examine the global characteristics of this galaxy-wide sample of massive young stars.