Skip to content

[BUG] Valid coordinates at latitude 0 and/or longitude 0 are treated as missing in multiple places ( follow-up issue #729) #843

@on6zq

Description

@on6zq

Please refer to issue #729 (closed).

There are still several lines that use inappropriate syntax and do not behave as expected for latitude or longitude that are 0, including

/workspace/openhamclock/server/config.js, 106, if ((!stationLat || !stationLon) && locator) {
/workspace/openhamclock/server/config.js, 109, stationLat = stationLat || coords.latitude;
/workspace/openhamclock/server/config.js, 110, stationLon = stationLon || coords.longitude;
/workspace/openhamclock/server/config.js, 115, if (!stationLat && jsonConfig.location?.lat) stationLat = jsonConfig.location.lat;
/workspace/openhamclock/server/config.js, 116, if (!stationLon && jsonConfig.location?.lon) stationLon = jsonConfig.location.lon;
/workspace/openhamclock/server/config.js, 122, latitude: stationLat || 40.7128,
/workspace/openhamclock/server/config.js, 123, longitude: stationLon || -74.006,
/workspace/openhamclock/server/config.js, 137, dxLatitude: parseFloat(process.env.DX_LATITUDE) || jsonConfig.defaultDX?.lat || 51.5074,
/workspace/openhamclock/server/config.js, 138, dxLongitude: parseFloat(process.env.DX_LONGITUDE) || jsonConfig.defaultDX?.lon || -0.1278,

/workspace/openhamclock/src/plugins/layers/useLightning.js, 594, const stationLat = config.location?.lat || config.latitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 595, const stationLon = config.location?.lon || config.longitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 597, if (!stationLat || !stationLon || lightningData.length === 0) return;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 681, const stationLat = config.location?.lat || config.latitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 682, const stationLon = config.location?.lon || config.longitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 686, if (!stationLat || !stationLon) {
/workspace/openhamclock/src/plugins/layers/useLightning.js, 830, const stationLat = config.location?.lat || config.latitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 831, const stationLon = config.location?.lon || config.longitude;
/workspace/openhamclock/src/plugins/layers/useLightning.js, 833, if (!stationLat || !stationLon) return;

/workspace/openhamclock/src/utils/config.js, 110, lat: serverConfig.latitude || config.location.lat,
/workspace/openhamclock/src/utils/config.js, 111, lon: serverConfig.longitude || config.location.lon,
/workspace/openhamclock/src/utils/config.js, 114, lat: serverConfig.dxLatitude || config.defaultDX.lat,
/workspace/openhamclock/src/utils/config.js, 115, lon: serverConfig.dxLongitude || config.defaultDX.lon,


Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions