You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<- I can decode this strings with online AIS decoder well, but when I put it in your library, it returns null.
using System;
using System.Windows.Forms;
using MissionPlanner;
using MissionPlanner.Utilities;
using System.Collections.Generic;
using System.Linq;
using MissionPlanner.Controls;
using AisParser;
using System.Text.RegularExpressions;
namespace AISParserSanityTestPlugins
{
public class AISParserSanityTestPlugins : MissionPlanner.Plugin.Plugin
{
AisParser.Parser parser;
public override string Name
{
get { return "AIS Parser Sanity Test Plugins"; }
}
public override string Version
{
get { return "0.30"; }
}
public override string Author
{
get { return "Open Source Community"; }
}
public override bool Init()
{
return true;
}
public override bool Loaded() //Loaded called after the plugin dll successfully loaded(different from loop())
{
parser = new AisParser.Parser();
loopratehz = 12.0f;
return true;
}
public override bool Loop()
{
string test_string = "!AIVDM,2,1,6,A,56T6Bb82;pL`A<t;N20Lht84j0qD8U8622222216:@@<55QW0=Rl`45Dp888,0*48";
try
{
var aisMessage = parser.Parse(test_string);
//Console.WriteLine("MMSI Number : " + aisMessage.Mmsi); //Error. Mmsi is null.
//Console.WriteLine("MMSI Number : " + aisMessage.mmsi); //Error. there is no member mmsi.
//Console.WriteLine("Ship Name : " + aisMessage.ShipName); //Error. no member. "ShipName" even though web AIS parser get ship name on this string.
//Console.WriteLine(aisMessage); //Print blank Texts.
//Console.WriteLine("ShipType : " + aisMessage.ShipType); //no member. "ShipType"
Console.WriteLine("Latitude : " + aisMessage.Latitude); //no member. "Latitude"
}
catch (Exception e)
{
Console.WriteLine("Error with this string : " + test_string);
Console.WriteLine("Error code : " + e);
Console.WriteLine("Stack Trace : " + e.StackTrace);
}
loopratehz = 20.0f;
return true;
}
public override bool Exit()
{
return true;
}
}
}
this code is mission planner plugin.
you can test this by install mission planner and put this *.cs file to plugins folder.
I can decode almost all message, but sometimes static and voyage related data? message doesn't read well.
The text was updated successfully, but these errors were encountered:
Although it may appear empty, the information is actually stored and utilized when the remaining part of the message is received. Therefore, there is no loss of data in this case, I guess
Hello.
"!AIVDM,2,1,6,A,56T6Bb82;pL
A<t;N20Lht84j0qD8U8622222216:@@<55QW0=Rl
45Dp888,0*48"<- I can decode this strings with online AIS decoder well, but when I put it in your library, it returns null.
this code is mission planner plugin.
you can test this by install mission planner and put this *.cs file to plugins folder.
I can decode almost all message, but sometimes static and voyage related data? message doesn't read well.
The text was updated successfully, but these errors were encountered: