mirror of
https://github.com/netbymatt/nexrad-level-2-data.git
synced 2026-11-28 18:58:05 -08:00
Remove duplication of records
This commit is contained in:
1 parent
06b766abc1
commit
2a697e0361
1 file changed
+9
-9
@@ -117,12 +117,12 @@ class Level2Radar {
|
||||
if(r.message_type != 1 && r.message_type != 31) continue
|
||||
|
||||
// If data is found, push the record to the data array
|
||||
if(r.record.reflect) data.push(r)
|
||||
if(r.record.velocity) data.push(r)
|
||||
if(r.record.spectrum) data.push(r)
|
||||
if(r.record.zdr) data.push(r)
|
||||
if(r.record.phi) data.push(r)
|
||||
if(r.record.rho) data.push(r)
|
||||
if( r.record.reflect ||
|
||||
r.record.velocity ||
|
||||
r.record.spectrum ||
|
||||
r.record.zdr ||
|
||||
r.record.phi ||
|
||||
r.record.rho) data.push(r)
|
||||
|
||||
}
|
||||
|
||||
@@ -154,10 +154,10 @@ class Level2Radar {
|
||||
* string so that javascript doesn't freak out
|
||||
* look into fixing !!
|
||||
*/
|
||||
if(groups[elevation_number + '']) {
|
||||
groups[elevation_number + ''].push(scan)
|
||||
if(groups[elevation_number]) {
|
||||
groups[elevation_number].push(scan)
|
||||
} else {
|
||||
groups[elevation_number + ''] = [scan]
|
||||
groups[elevation_number] = [scan]
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user