Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ function adsb2dd(key, json) {
}

// skip if no change to lat/lon/alt
if (dict[key]['out'][hexCode]['lat'] === aircraft['lat'] &&
dict[key]['out'][hexCode]['lon'] === aircraft['lon'] &&
dict[key]['out'][hexCode]['alt'] === aircraft['alt_geom']) {
if (dict[key]['proc'][hexCode]['lat'] === aircraft['lat'] &&
dict[key]['proc'][hexCode]['lon'] === aircraft['lon'] &&
dict[key]['proc'][hexCode]['alt'] === aircraft['alt_geom']) {
continue;
}

dict[key]['out'][hexCode]['timestamp'] = json.now + aircraft.seen_pos;
dict[key]['out'][hexCode]['timestamp'] = json.now - aircraft.seen_pos;
dict[key]['out'][hexCode]['flight'] = (aircraft.flight);
dict[key]['proc'][hexCode]['lat'] = aircraft['lat'];
dict[key]['proc'][hexCode]['lon'] = aircraft['lon'];
Expand All @@ -173,7 +173,7 @@ function adsb2dd(key, json) {

// store bistatic delay/timestamps for Doppler
dict[key]['proc'][hexCode]['delays'].push(delay);
dict[key]['proc'][hexCode]['timestamps'].push(json.now + aircraft.seen_pos);
dict[key]['proc'][hexCode]['timestamps'].push(json.now - aircraft.seen_pos);

// bistatic Doppler (Hz)
if (dict[key]['proc'][hexCode]['delays'].length >= 2) {
Expand Down