SHARE
TWEET

Untitled

a guest Oct 21st, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static async Task<(double latitude, double longitude)> GetPositionAsync()
  2. {
  3.     ReadOnlyMemory<byte> line = await GetLineAsync();
  4.     return ParseLine();
  5.  
  6.     (double latitude, double longitude) ParseLine()
  7.     {
  8.         var parser = new NmeaAisPositionReportClassAParser(line.Span, 0);
  9.         return (parser.Latitude10000thMins / 60000.0, parser.Longitude10000thMins / 60000.0);
  10.     }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top