public GPSCoordinate(enumLongitudeReference enumLongitudeDirection, int intLongitudeDegrees, double dblLongitudeMinutes, enumLatitudeReference enumLatitudeDirection, int intLatitudeDegrees, double dblLatitudeMinutes, Distance objAltitude, string strAltitudeReference) { _objAlt = objAltitude; _strAltRef = strAltitudeReference; Fill(enumLongitudeDirection, intLongitudeDegrees, dblLongitudeMinutes, enumLatitudeDirection, intLatitudeDegrees, dblLatitudeMinutes); }
public GPSCoordinate(enumLongitudeReference enumLongitudeDirection, int intLongitudeDegrees, double dblLongitudeMinutes, enumLatitudeReference enumLatitudeDirection, int intLatitudeDegrees, double dblLatitudeMinutes, Distance objAltitude, string strAltitudeReference) { _objAlt = objAltitude; _strAltRef = strAltitudeReference; Fill(enumLongitudeDirection, intLongitudeDegrees, dblLongitudeMinutes, enumLatitudeDirection, intLatitudeDegrees, dblLatitudeMinutes); }
public void Fill(int intLongitudeDegrees, double dblLongitudeMinutes, int intLatitudeDegrees, double dblLatitudeMinutes) { //First I need to figure out and store the direction (N,S,E,W) of the Longitude and Latitude enumLongitudeReference enumLonRef = GetLongitudeReference(intLongitudeDegrees); enumLatitudeReference enumLatRef = GetLatitudeReference(intLatitudeDegrees); //Now Fill Fill(enumLonRef, intLongitudeDegrees, dblLongitudeMinutes, enumLatRef, intLatitudeDegrees, dblLatitudeMinutes); }
private double SetDirectionSign(double dblCoord, enumLongitudeReference enumLonRef) { if (enumLonRef == enumLongitudeReference.West) { return(-(Math.Abs(dblCoord))); } else { return(Math.Abs(dblCoord)); } }
private void Fill(enumLongitudeReference enumLonRef, int intLongitudeDegrees, int intLongitudeMinutes, double dblLongitudeSeconds, enumLatitudeReference enumLatRef, int intLatitudeDegrees, int intLatitudeMinutes, double dblLatitudeSeconds) { //First I need to get the Absolute value before doing any math intLongitudeDegrees = Math.Abs(intLongitudeDegrees); intLatitudeDegrees = Math.Abs(intLatitudeDegrees); //Now I will build the numeric coordinate _dblLon = ((double)intLongitudeDegrees) + (((double)intLongitudeMinutes) / 60) + (dblLongitudeSeconds / 3600); _dblLat = ((double)intLatitudeDegrees) + (((double)intLatitudeMinutes) / 60) + (dblLatitudeSeconds / 3600); //Now I will restore the negative values where necessary _dblLon = SetDirectionSign(_dblLon, enumLonRef); _dblLat = SetDirectionSign(_dblLat, enumLatRef); }
public GPSCoordinate(enumLongitudeReference enumLongitudeDirection, int intLongitudeDegrees, double dblLongitudeMinutes, enumLatitudeReference enumLatitudeDirection, int intLatitudeDegrees, double dblLatitudeMinutes) { Fill(enumLongitudeDirection, intLongitudeDegrees, dblLongitudeMinutes, enumLatitudeDirection, intLatitudeDegrees, dblLatitudeMinutes); }
private double SetDirectionSign(double dblCoord, enumLongitudeReference enumLonRef) { if(enumLonRef == enumLongitudeReference.West) return -(Math.Abs(dblCoord)); else return Math.Abs(dblCoord); }
private void Fill(enumLongitudeReference enumLonRef, int intLongitudeDegrees, int intLongitudeMinutes, double dblLongitudeSeconds, enumLatitudeReference enumLatRef, int intLatitudeDegrees, int intLatitudeMinutes, double dblLatitudeSeconds) { //First I need to get the Absolute value before doing any math intLongitudeDegrees = Math.Abs(intLongitudeDegrees); intLatitudeDegrees = Math.Abs(intLatitudeDegrees); //Now I will build the numeric coordinate _dblLon = ((double) intLongitudeDegrees) + (((double) intLongitudeMinutes) / 60) + (dblLongitudeSeconds / 3600); _dblLat = ((double) intLatitudeDegrees) + (((double) intLatitudeMinutes) / 60) + (dblLatitudeSeconds / 3600); //Now I will restore the negative values where necessary _dblLon = SetDirectionSign(_dblLon,enumLonRef); _dblLat = SetDirectionSign(_dblLat,enumLatRef); }
public GPSCoordinate(enumLongitudeReference enumLongitudeDirection, int intLongitudeDegrees, double dblLongitudeMinutes, enumLatitudeReference enumLatitudeDirection, int intLatitudeDegrees, double dblLatitudeMinutes) { Fill(enumLongitudeDirection, intLongitudeDegrees, dblLongitudeMinutes, enumLatitudeDirection, intLatitudeDegrees, dblLatitudeMinutes); }