The study of planetary ionospheres dates back thousands of years, to humanity's first attempts to explain the polar aurora. Ionospheric physics is a study of one pathway for energy to enter a planetary atmosphere: transfer from sunlight and solar wind plasma to planetary plasma, and from the planetary plasma to the neutral atmosphere. In the modern era of ionospheric physics, electrostatic analyzers with attached time-of-flight velocity analyzers are excellent tools for the study of planetary ionospheres because they can measure mass-resolved 3-dimensional ion velocity distribution functions over a wide range of energies and fluxes, with large fields-of-view and moderate angular resolution. One example of an electrostatic analyzer with attached time-of-flight section is the SupraThermal And Thermal Ion Composition (STATIC) instrument onboard the Mars Atmosphere and Volatile EvolutioN (MAVEN) mission. MAVEN has been collecting data since 2014 with the goal of illuminating how Martian climate and habitability have been affected by the escape of the atmosphere to space. To that end, STATIC was designed to measure the main ionospheric and escaping species, operating from deep in the collisional atmosphere out to the tenuous exosphere and magnetotail. STATIC samples ion velocity distribution functions every 4 seconds across a field-of-view covering 2$\pi$ steradians for ions with energies between 0.1 eV and 30 keV and masses between 1 and 60 amu. This work will treat STATIC as a case study in order to examine some of the challenges associated with using electrostatic analyzers in space, including the effects of background counts, spacecraft potential, and supersonic spacecraft motion on the measurement and analysis of distribution functions. Before the discussion of those details, we first provide an introduction to the geometry of electrostatic analyzers and how the measured count rates are related to physical quantities. This work also describes the results of several investigations in which MAVEN-STATIC data were used to examine the beginnings of cold ion outflow at Mars. Models of the Martian ionosphere show that the vast majority of ions are created at altitudes near 120 km, the location of the main ionospheric peak. The peak is located deep in the collisional atmosphere, where collisions are theorized to keep the ions in thermal equilibrium with the cold neutral atmosphere. The vast majority of the ionospheric ions are therefore gravitationally bound to the planet. Most ions that have the potential to escape the planet's gravity are created near a boundary called the exobase, where the mean free path between collisions becomes equal to the scale height and the ions no longer thermalize with the neutrals. The exobase can be considered the top of the collisional atmosphere and varies between 140 and 210 km altitude dependent on local time and season. In the present epoch, 10-20\% of atmospheric loss is attributable to the loss of ions from hundreds or thousands of kilometers above the main peak and the exobase region. The mechanisms by which ions gain enough energy to escape the planet's gravity between the exobase and the altitudes where they escape are not yet understood, but we have used STATIC data to begin analysis of ion distribution functions in the vicinity of the exobase. The analysis of ion velocity distribution functions measured near the exobase is experimentally challenging because the spacecraft travels supersonically with respect to the cold ions, affecting observations of both the energy and angular distributions. The details of how the instrumentation affects measurements of the distribution function must be understood in detail in order to extract accurate plasma parameters. In this work, we describe many of the procedures used to extract accurate plasma parameters from STATIC data. We use these corrections to begin to bridge the gap between studies of ion outflow conducted high above the exobase and studies of the cold, thermal ionosphere near the main peak. Specifically, we report the first measurements of Martian ionospheric ion temperatures since the Viking landers in 1975 and 1976, including the results of both a case study and a statistical study of over 10,000 MAVEN orbits. Unexpectedly, ion temperatures are significantly elevated over neutral gas temperatures many scale heights below the exobase, and none of the obvious mechanisms for ion heating explained the observed temperature difference. This surprising result was noted both in the case study and the study using the majority of the STATIC dataset, suggesting that a fundamental piece of physics is missing from current models of the Martian ionosphere.Finally, we also report the results of a statistical study with the goal of determining where signatures of ion energization are observed in STATIC data. By fitting the measured distribution functions with drifting Maxwell-Boltzmann distributions, we identified distributions in which suprathermal ions produced a significant portion of the measured energy flux. Most distributions are well-described by the Maxwell-Boltzmann distribution below the exobase region---in other words, the neutral atmosphere dominates low-altitude ion dynamics. Suprathermal ions are observed just above the exobase at all solar zenith angles. A comparison of results inside and outside Mars' strong crustal magnetic field regions showed that more thermal plasma is observed inside crustal fields on the dayside, while more suprathermal plasma is observed inside crustal fields on the nightside. These results suggest that crustal fields shield dayside plasma from energization by the solar wind while enhancing energization and outflow on the nightside. The techniques developed in this work provide tools for continued investigation into the physics of initial ion acceleration at Mars using STATIC data, while the results reported here provide context for case studies in which the processes responsible for ion acceleration can be analyzed. The study of initial ion acceleration at Mars is just one context in which electrostatic analyzers in combination with time-of-flight analyzers provide insight into the physics that cannot be matched by any other instrument.