Direction arrow seems incorrect

A friend and I got our radios and Android apps working for the first time yesterday. I was parked outside his house at the time. Hours later when I was home I saw the attached display on my radio. “2.3 km” (agrees with Google Earth), “Signal: 0%”, and “5 hours ago” all make sense. But the direction from my house to his is southwest, not southeast. Am I misunderstanding or is this a defect? I am using firmware 1.2.52 and Android app 1.2.50.

220205_MeshtasticDirectionArrow

There’s no hardware compass built into the device, so the compass on the display is based on the heading between two gps points and is most accurate while in motion.

1 Like

Thanks for the quick response. But I am saying the direction arrow relative to the “N” north indicator is incorrect (not anything to do with the orientation of the “circle and N” relative to the display). With the N indicator as shown, the arrow points southeast. My friend’s house is southwest from my house. All this depends only on our GPS coordinates, that seem correct due to the “2.3 km” being correct.

I’ve been using the exact same setup as you for about a week now and the arrow relative to the North indicator has never shown the correct direction except for perhaps once by coincidence. Very frustrating as my hope was to use these for locating and reconnecting with family members in an emergency and possibly for finding my vehicle if stolen. I also notice that the GPS location does not update reliably and also often shows hundreds of meters apart despite the units being next to each other for hours. I at first suspected poorly matched GPS antennas causing the GPSs to struggle with updates as the GPS fix LEDs rarely flash, however I’ve gotten fixes in difficult locations (such as in the basement) so I can’t imagine it struggling continuously outside in the open as well. I think the randomness of the fix LED is a bug too as I get location updates and good satellites in use counts when it is not flashing. This is the same behavior across all of my nodes.

Oh…Also, the North position indicator does not seem to work either, which may be the root of the problem. Even when I am well in motion (for instance driving down the hi-way) it does not show proper direction. I presume it is supposed to work by putting the N toward the top of the display if I am traveling North and toward the bottom of the the display if I am traveling South etc.

I filed this in GitHub as a firmware issue.

1 Like

I just wanted to mention that the arrow does indicate the direction of the other nodes referred to my position, except that the North is exactly in the opposite direction compared to what’s on the screen. If you switch the N with S, than it actually seem to work fine (for me at least) :slight_smile:

Where are you on the globe?

I am in Alberta. I will do more experimenting to see if what Mihai is experiencing is happening in my case or if I can pick up on any other pattern.

Thanks for submitting this to Github Rick!

1 Like

I am in Spokane WA, USA near 47.636, -117.366 (decimal degrees).

Thanks. Just making sure we’re not seeing an issue with math involving the hemisphere.

I’m in Romania, so Northern Hemisphere… :slight_smile:

1 Like

Issue replication: Someone with 2 Meshtastic devices can use the python “meshtastic” program and a USB connection to the radios to set two known GPS locations and see how each radio displays the location of the other. I only have one Meshtastic radio. To try approximately my original test case (because I no longer have the exact data):

> meshtastic --setlat 47.636 --setlon -117.366
On the other radio:
> meshtastic --setlat 47.626 --setlon -117.392

The first GPS location is near my house. The second GPS location is near my friend’s house, about 2.3 km southwest of me. If this doesn’t show the problem we just need one test case that does show it, reported here with both sets of GPS coordinates and what firmware revision is being used.

1 Like

So I have a node that actually sees 5 different nodes within the city (using external antenna). The nodes are generally many kilometers apart.
What I did was starting up a sixth node and manually configured three different locations (coordinates), then looking at the arrow on the display in each case.
Conclusion is the following: The arrow indicates the direction for all the nodes, but the “N” (north) letter is exactly at the opposite side of the circle. If you replace it with “S” letter it would be perfect :slight_smile:
This was exactly my previous feeling so now it’s demonstrated :slight_smile:

1 Like

Thank you for your reply Mihai, but that would not explain the issue that started the conversation. The error there is about 90 degrees, not 180.

I think what we need is any test case that the firmware author can use to replicate the problem. Then a code change can be verified as fixing it. “Firmware 1.2.52, 47.636 -117.366, 47.626 -117.392” is such a test case, but I can’t be sure it will show the problem. I only have 1 radio and no longer have the exact GPS coordinates that led to the original problem.

The first reply from MC hamster is your answer.

Thanks garth, but what follows the first reply from MC hamster explains why it doesn’t seem to be the answer.

Today I asked for help from the author of Meshtastic firmware file /src/graphics/Screen.cpp. That file appears to be the code that draws the arrow. But I still think we need any test case that can be used to replicate the problem. I think “firmware 1.2.52, 47.636 -117.366, 47.626 -117.392” is such a test case, but I can’t be sure.

The picture on the table leads me to believe it was not in motion.

Motion is not necessary to tell the direction from one GPS location to another. For example in the test case I gave:
Latitude 47.626 (friend) is a little less than 47.636 (me) so is South.
Longitude -117.392 (friend) is a little less than -117.366 (me) so is West.
My friend is southwest of me. There is no need to be moving, and GPS receivers do not have to be moving to provide accurate latitude and longitude.

(Motion is necessary to get the “N” pointed in the up direction on the display, but that not the issue here. The issue is that the direction of the arrow relative to the “N” is incorrect.)

Code is pretty simple Meshtastic-device/Screen.cpp at 3f83acdbef7087c73fed0f03cc6fef5027a582a6 · meshtastic/Meshtastic-device · GitHub