private DateTime ParseTimeOfFix(string[] HexCollection) { string Hexvalue = ""; int CounterDiff = StdDevIDLth - ClntDevIDLth; int StartCounter = 17 - (CounterDiff); int EndCounter = 20 - (CounterDiff); for (int counter = StartCounter; counter <= EndCounter; counter++) { Hexvalue = Hexvalue + HexCollection[counter]; } Int64 UnixDateTime = CommonOperation.HexaDecimalToDecimalConversion(Hexvalue); DateTime dt = ObjComnOp.UnixTimeStampToDateTime(UnixDateTime); return(dt); }
private double ParseHeadingDirection(string[] HexCollection) { string Hexvalue = ""; double Direction = 0; int CounterDiff = StdDevIDLth - ClntDevIDLth; int StartCounter = 37 - (CounterDiff); int EndCounter = 38 - (CounterDiff); for (int counter = StartCounter; counter <= EndCounter; counter++) { Hexvalue = Hexvalue + HexCollection[counter]; } Double HexTODeciVal = CommonOperation.HexaDecimalToDecimalConversion(Hexvalue); return(HexTODeciVal); }
private double ParseSpeed(string[] HexCollection) { string Hexvalue = ""; double Speed = 0; int CounterDiff = StdDevIDLth - ClntDevIDLth; int StartCounter = 33 - (CounterDiff); int EndCounter = 36 - (CounterDiff); for (int counter = StartCounter; counter <= EndCounter; counter++) { Hexvalue = Hexvalue + HexCollection[counter]; } Double HexTODeciVal = CommonOperation.HexaDecimalToDecimalConversion(Hexvalue); Speed = HexTODeciVal * 0.036; return(Speed); }
private double ParseAltitude(string[] HexCollection) { string Hexvalue = ""; double Altitude = 0; int CounterDiff = StdDevIDLth - ClntDevIDLth; int StartCounter = 29 - (CounterDiff); int EndCounter = 32 - (CounterDiff); for (int counter = StartCounter; counter <= EndCounter; counter++) { Hexvalue = Hexvalue + HexCollection[counter]; } Double HexTODeciVal = CommonOperation.HexaDecimalToDecimalConversion(Hexvalue); //Altitude Parsing not completed yet return(Altitude); }