tsc_StationCalcHelmertResection

This class provides free station (resection) calculations for use with the station setup class.  The resection calculation performed is the Helmert resection method.

Once the 2D position has been resolved with the Helmert method, the standard SurveyCore resection method will be invoked to solve the station elevation - if this fails (perhaps due to a lack of vertical data) then the X_ComputeStationElevation error code is returned, this error code does not indicate that the 2D solution is faulty and can be viewed as a partial success.

For more information about Survey Core stations, see How Stations Work.

Constructor

tsc_StationCalcHelmertResection (class tsc_StationSetup& station);

Constructs an instance for use with the given station setup.  The station must be "in progress" - it must have been started but not ended or aborted.

Public methods

virtual tsc_StationResults  CalculateStationWithFreeScale();

Computes a resection for all backsight observations in the given station, and returns the results.  The results are not stored anywhere but in the tsc_StationResults instance.  Depending on the current state of the station setup in the database, some (or all) values may have null values.  Scale Factor is calculated.

The returned tsc_StationResults will contain a list of all backsights that were found in the station, each with a reference to the observation, the calculated residuals, and a UseDimensions field which may be used to control further calculations (see the CalculateStation overloads below).

The results may be used to update the station by calling the UpdateStation() method on tsc_StationSetup, and the residuals may be written to the database by using the WriteResiduals() method also in tsc_StationSetup.  It is normal to only write the residuals once, at the end of the station setup.

virtual tsc_StationResults CalculateStationWithFreeScale (const class tsc_BacksightList& useBacksights);

This overload computes a resection using the supplied list of backsights.  This list would typically be obtained from a previous call to CalculateStation(), or from a call to BacksightDetails().

The resection's use of observations is controlled by setting the value of the UseDimensions field of the items in the backsight list.  Setting UseDimensions to zero will prevent the observation from being used, setting it to 1 uses only the observation's elevation, 2 uses the north and east coordinates, and 3 uses all three coordinate values.  If a required coordinate value is not present, the observation will not be used.  The UseDimensions field is initialised to the highest value possible for the observation.

virtual tsc_StationResults CalculateStationWithFixedScale (double fixedScaleFactor);

This overload allows the scale factor to be fixed at the supplied value.  If the given value is double_Null, the scale factor will be calculated.

virtual tsc_StationResults CalculateStationWithFixedScale (const class tsc_BacksightList& useBacksights, double fixedScaleFactor);

This overload allows the scale factor to be fixed at the supplied value.  If the given value is double_Null, the scale factor will be calculated.

virtual void UpdateStation (const tsc_StationResults& results);

From the results of the resection, updates the station record, the backbearing record, and the grid coordinates of the station.