nohal / dashboardsk_pi

SignalK based dashboard plugin for OpenCPN
GNU General Public License v3.0
3 stars 3 forks source link

Implement support for complex values #28

Closed nohal closed 1 year ago

nohal commented 1 year ago

Implement support for object values, for example from the bellow example we want to be able to take .count from the value as a numerical data source

{
    "updates":
    [
        {
            "source":
            {
                "sentence": "GSV",
                "talker": "GP",
                "type": "NMEA0183",
                "label": "blueconv"
            },
            "timestamp": "2022-12-03T12:05:00.177Z",
            "values":
            [
                {
                    "path": "navigation.gnss.satellitesInView",
                    "value":
                    {
                        "count": 11,
                        "satellites":
                        [
                            {
                                "id": 13,
                                "elevation": 1.2042771841510596,
                                "azimuth": 4.764748859032452,
                                "SNR": 40
                            },
                            {
                                "id": 30,
                                "elevation": 1.047197551435704,
                                "azimuth": 1.4660765720099855,
                                "SNR": 41
                            },
                            {
                                "id": 27,
                                "elevation": 0.1396263401914272,
                                "azimuth": 0.12217304766749879,
                                "SNR": 0
                            },
                            {
                                "id": 18,
                                "elevation": 0.2792526803828544,
                                "azimuth": 5.323254219798161,
                                "SNR": 36
                            },
                            {
                                "id": 7,
                                "elevation": 0.43633231309820997,
                                "azimuth": 1.274090354246773,
                                "SNR": 35
                            },
                            {
                                "id": 20,
                                "elevation": 0.31415926543071115,
                                "azimuth": 3.420845334689966,
                                "SNR": 36
                            },
                            {
                                "id": 8,
                                "elevation": 0.29670597290678274,
                                "azimuth": 0.6806784084332075,
                                "SNR": 32
                            },
                            {
                                "id": 14,
                                "elevation": 0.8726646261964199,
                                "azimuth": 2.3911010757781903,
                                "SNR": 39
                            },
                            {
                                "id": 23,
                                "elevation": 0.12217304766749879,
                                "azimuth": 5.759586532896371,
                                "SNR": 0
                            },
                            {
                                "id": 15,
                                "elevation": 0.6806784084332075,
                                "azimuth": 5.044001539415307,
                                "SNR": 39
                            },
                            {
                                "id": 5,
                                "elevation": 0.7679448710528495,
                                "azimuth": 3.9269908178838895,
                                "SNR": 39
                            }
                        ]
                    }
                }
            ],
            "$source": "blueconv.GP"
        }
    ],
    "context": "vessels.urn:mrn:imo:mmsi:265599691"
}