Error in longitude while submitting to SatNOGS DB

I am using the SiDS telemetry submitter in gr-satellites to submit to the SatNOGS DB some frames for VZLUSAT-1. The frames are submitted successfully, but my locator is shown incorrectly. The frames show as submitted by EA4GPZ-JN10uo, but my locator is IN80do. I have verified that gr-satellites is sending the correct latitude and longitude:

‘locator’: ‘longLat’, ‘longitude’: ‘3.708W’, latitude’: ‘40.6007N’

However, it seems that SatNOGS DB is misinterpreting the longitude as 3.708E.

So, I think this might be a bug introduced at some point and here is why: I can see both KB9JHU-NM36df (China) and KB9JHU-EM69uf (Indiana). The import code probably no longer interprets “W”, “E”, “N”, and “S” but expects negative numbers for West and South.

The SIDS spec uses “W”, “E”, “N”, and “S”.

Here is the code that accounts for W and S
https://gitlab.com/librespacefoundation/satnogs/satnogs-db/blob/dev/db/api/views.py#L50

That seems to be OK, but obviously the data pushed proves otherwise. @comzeradd any thoughts?

Aha, there is the error! Longitude is East/West and latitude is North/South :slight_smile:

So, now the puzzling question is why did it work for some frames…

Not very puzzling as in the conditions in the file it doesn’t define explicitly (E and W) or fail and (N and S) or fail but W or else suppose it is E and S or else suppose it is N.

So all longitudes E or W are not S (as stated in the code) so they keep always the positive value of longitude as they were E.
And all latitudes N or S are not W (as stated in the code) so they keep always the positive value of latitude as they were N.

This means that if the frame came with E for longitude and N for latitude then it was interpreted correctly. In all other cases it wasn’t.

Indeed, so how can it be that KB9JHU-EM69uf coordinates were interpreted correctly to have Western longitude? Perhaps he sent data using minus instead of W.

hm… Maybe these are from the imported data and not the data sent directly to db.satnogs.org. :slight_smile:

I do… I still have W at the end but I had to - it as well.

I’m surprised we didn’t catch that earlier :confused:

The code checks are correct but for the wrong thing. We check for W or E on latitude, and S or N on longitude, while these should be the other way around.

After not submitted data for a couple of months, downloaded the most recent Online Telemetry Forwarder, and resumed uploading data. When i checked my stats, I see two callsigns. The original submissions are tagged with a grid code somewhere in China. The most recent uploads are correct with grid CN75xa.

So… can the old data associated with W7KKE-PN25aa be merged with correct call & grid, W7KKE-CN75xa?

Tnx,
Ken, W7KKE

Thanks for reporting that. This is now fixed. It may take a couple of hours to show up in the statistics page.