All,
I know (and still don't understand why) ESRI removed the GPS Averaging functionality from ArcGIS Mobile 10.1.1. They have left the GPSAveragingTool in though they have deprecated it.
I have decided to use it regardless and am having some difficulty in getting it set up.
If I set the Quality filter from either the MobileApplication or manually when I go to create the tool ArcGIS Mobile crashes. The code is below and error message is below that.
GpsQualityFilter gpsQ = new GpsQualityFilter();
gpsQ = MobileApplication.Current.Project.CurrentGpsQualityFilter;
//gpsQ.FixStatus = GpsFixStatus.DGpsFix;
//gpsQ.MaximumPdop = 6;
//MobileApplication.Current.Project.CurrentGpsAveragingSettings.MinimumPositions = 5;
MessageBox.Show("7");
m_gpsAveragingTool = new GpsAveragingTool(gpsQ, gps, m_Feature.Geometry, MobileApplication.Current.Project.SpatialReference);
// m_gpsAveragingTool = new GpsAveragingTool(MobileApplication.Current.Project.CurrentGpsQualityFilter, gps, m_Feature.Geometry, MobileApplication.Current.Project.SpatialReference);
MessageBox.Show("8");
Esri® ArcGIS for Windows Mobile 10.1.5001.3320
Tuesday, June 18, 2013 1:55:29 PM
-----
Message:
NullReferenceException
Stack Trace:
at ESRI.ArcGIS.Mobile.Gps.GpsConstructionTool.DoesFixTypeMeetFilter()
at ESRI.ArcGIS.Mobile.Gps.GpsConstructionTool.CheckQuality()
at ESRI.ArcGIS.Mobile.Gps.GpsConstructionTool..ctor(GpsQualityFilter gpsQualityFilter, GpsConnection gpsConnection)
at ESRI.ArcGIS.Mobile.Gps.GpsAveragingTool..ctor(GpsQualityFilter gpsQualityFilter, GpsConnection gpsConnection, Geometry geometry, SpatialReference spatialReference)
at EGD_Editing.EGD_EditingClass.EditAttributes()
at EGD_Editing.EGD_EditingClass.m_ftp_FeatureTypeActivated(Object sender, FeatureTypeActivatedArgs e)
at ESRI.ArcGIS.Mobile.Client.Pages.FeatureTypePage.RaiseFeatureTypeActivated(FeatureTypeActivatedArgs e)
at ESRI.ArcGIS.Mobile.Client.Pages.FeatureTypePage.ListViewItemActivated(Object sender, EventArgs e)
at ESRI.ArcGIS.Mobile.Client.Controls.ExtendedTreeView.RaiseItemActivated(EventArgs e)
at ESRI.ArcGIS.Mobile.Client.Controls.ExtendedTreeView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows.Forms.Application.Run(Form fm)
at ESRI.ArcGIS.Mobile.Client.MobileApplication.Main(String[] args)
at ESRI.ArcGIS.Mobile.Client.Program.Main(String[] args)
-----
Any help would be greatly appreciated
Thanks