sparkfun / SparkFun_RTK_Firmware

Centimeter precision GPS/GNSS using L1/L2 signals broadcast over Bluetooth SPP (using the ESP32) in an easy to use enclosure.
https://docs.sparkfun.com/SparkFun_RTK_Firmware/
Other
82 stars 47 forks source link

Debug Mode - Display GPS Location/Status #82

Closed LeeLeahy2 closed 2 years ago

LeeLeahy2 commented 2 years ago

Display GPS Location and Status via Serial

Please add an entry to the serial debug menu to display the GPS location and status

Use Case

nseidle commented 2 years ago

Hi LeeLeahy2 - Adding lat/long/stats to the debug menu is a fine idea, and I'll get it added. But I don't think it solves your issue. If you want GPS location via serial, you should really be monitoring the NMEA strings coming out of the u-blox connection. You can use u-center to configure the messages that are output over the u-blox USB connection. Avoid v2 of u-center for now as it doesn't yet support the ZED-F9P. u-center v1 is for windows, looks like it will work in Wine as well.

Please see formatting below of the lat/long/stats in the debug menu. It's wide, but workable. Let me know what you think and I'll get it into the next release candidate. image

LeeLeahy2 commented 2 years ago

Hi Nathan - I like the header to the debug menu with longitude and latitude. My original thought was to add an item to the debug menu, say #9, 'g' or 's'. The the menu item could display one or more lines duplicating what is available on the display:

nseidle commented 2 years ago

Resolution? e.g. 1.5 m

I think you mean horizontal positional accuracy. This is the number on the screen and is captured by 'Accuracy' above.

MAC address

It's easy enough and I don't mean to be rude, but why do you need this? For your reference, the last four digits of the Bluetooth MAC address are shown at the top of the main menu:

image

I get you want to remote access to the system status over serial. Rather than trying to parse each of these bits from various spots, why don't we elect a special character (~ for example) that once received, causes the system to output all its stats via comma delimited string. For example we could do:

$GNTXT,data/time,mac,lat,log,hpa,system state,batt level, ... *4B (CRC)

A very long sentence. It would be terminated with a CRC so yes, it's a NMEA sentence, but this would allow you to write a simple parser.

LeeLeahy2 commented 2 years ago

HI Nathan,

If in your example ~ would toggle the output on and off, that would be great. Let me confirm that this would be output via the Config ESP32 port.

I was originally thinking that this output would be a one shot, print it and done. However, your suggestion would allow the computer to parse and display this data on a regular basis and effectively duplicate the RTK Express display. That sounds great.

On Mon, Mar 14, 2022 at 12:02 PM Nathan Seidle @.***> wrote:

Resolution? e.g. 1.5 m

I think you mean horizontal positional accuracy. This is the number on the screen and is captured by 'Accuracy' above.

MAC address

It's easy enough and I don't mean to be rude, but why do you need this? For your reference, the last four digits of the Bluetooth MAC address are shown at the top of the main menu:

[image: image] https://user-images.githubusercontent.com/117102/158267047-2fa1f07d-e9c7-4bc4-816b-ee690445b89c.png

I get you want to remote access to the system status over serial. Rather than trying to parse each of these bits from various spots, why don't we elect a special character (~ for example) that once received, causes the system to output all its stats via comma delimited string. For example we could do:

$GNTXT,data/time,mac,lat,log,hpa,system state,batt level, ... *4B (CRC)

A very long sentence. It would be terminated with a CRC so yes, it's a NMEA sentence, but this would allow you to write a simple parser.

— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_RTK_Firmware/issues/82#issuecomment-1067345744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4TG3P7RB6DW55WZCORA7DU76ZQJANCNFSM5QWO3LNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

nseidle commented 2 years ago

This is coming along nicely. Is this output helpful?

01,01,05, are header bytes.

image

    char systemStatus[100];
    sprintf(systemStatus, "%02d%02d%02d.%02d,%02d%02d%02d,%0.3f,%d,%0.9f,%0.9f,%0.2f,%d,%d,%d",
            hour, minute, second, mseconds,
            day, month, year,
            f_accuracy, siv,
            d_lat, d_lon,
            f_msl,
            fixType, rtkSolution,
            battLevel
            );

Hello from a mile above sea level!

nseidle commented 2 years ago

This technically violates the maximum length of 82 characters for a NMEA sentence but since this isn't being recorded to a log file, we should be ok.

nseidle commented 2 years ago

The ~ command has been implemented in RCApr1 and beyond. Please give it a try and let me know if there is other information that should be contained in the message.

nseidle commented 2 years ago

Featured added and rolled into v1.11 release.

LeeLeahy2 commented 2 years ago

Hi Nathan,

This looks good. My only suggestion would be to display year, month and day before the hour minute... As a single value it is monotonically increasing until 2300.

Lee Leahy (808) 692-3394

On Wed, Mar 30, 2022 at 5:01 PM Nathan Seidle @.***> wrote:

This is coming along nicely. Is this output helpful?

01,01,05, are header bytes.

[image: image] https://user-images.githubusercontent.com/117102/160967454-53142651-7a52-44fe-8bab-51f391b0dcac.png

char systemStatus[100];
sprintf(systemStatus, "%02d%02d%02d.%02d,%02d%02d%02d,%0.3f,%d,%0.9f,%0.9f,%0.2f,%d,%d,%d",
        hour, minute, second, mseconds,
        day, month, year,
        f_accuracy, siv,
        d_lat, d_lon,
        f_msl,
        fixType, rtkSolution,
        battLevel
        );

Hello from a mile above sea level!

— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_RTK_Firmware/issues/82#issuecomment-1084021113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4TG3JWRLKVDRUVPFBGHHTVCUIOXANCNFSM5QWO3LNQ . You are receiving this because you authored the thread.Message ID: @.***>