Skip to content

DBK, DBS and DBT #85

Answered by dotMorten
Haavard94 asked this question in Q&A
Discussion options

You must be logged in to vote

See the section on adding custom messages:
https://dotmorten.github.io/NmeaParser/concepts/CustomMessages.html

It'll probably be something along the lines of:

public abstract class DepthBelowBaseMessage : NmeaMessage
{
    protected DepthBelowBaseMessage(string type, string[] parameters) : base(type, parameters)
    {
        WaterDepthFeet = parameters.Length > 0 ? ReadDouble(parameters[0]) : double.NaN;
        WaterDepthMeters= parameters.Length > 1 ? ReadDouble(parameters[1]) : double.NaN;
        WaterDepthFathoms = parameters.Length > 2 ? ReadDouble(parameters[2]) : double.NaN;
    }
    public double WaterDepthFeet { get; }
    public double WaterDepthMeters { get; }
    public double

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dotMorten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants