File tree Expand file tree Collapse file tree 4 files changed +161
-162
lines changed Expand file tree Collapse file tree 4 files changed +161
-162
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,9 @@ def retrieve_packets(
479
479
480
480
if database is not None :
481
481
for packets in new_packets .values ():
482
- database .send (packets )
482
+ database .send (
483
+ packet for packet in packets if packet .source != database .location
484
+ )
483
485
484
486
updated_callsigns = sorted (updated_callsigns )
485
487
for callsign in updated_callsigns :
@@ -494,7 +496,7 @@ def retrieve_packets(
494
496
f'{ coordinate :.3f} °' for coordinate in packet_track .coordinates [- 1 , :2 ]
495
497
)
496
498
logger .info (
497
- f'{ callsign :8 } - packet #{ len (packet_track ):<3} - ({ coordinate_string } , { packet_track .coordinates [- 1 , 2 ]:9.2f} m)'
499
+ f'{ callsign :9 } - packet #{ len (packet_track ):<3} - ({ coordinate_string } , { packet_track .coordinates [- 1 , 2 ]:9.2f} m)'
498
500
f'; packet time is { packet_time } ({ humanize .naturaltime (current_time - packet_time )} , { packet_track .intervals [- 1 ]:6.1f} s interval)'
499
501
f'; traveled { packet_track .overground_distances [- 1 ]:6.1f} m ({ packet_track .ground_speeds [- 1 ]:5.1f} m/s) over the ground'
500
502
f', and { packet_track .ascents [- 1 ]:6.1f} m ({ packet_track .ascent_rates [- 1 ]:5.1f} m/s) vertically, since the previous packet'
@@ -510,7 +512,7 @@ def retrieve_packets(
510
512
)
511
513
try :
512
514
message = (
513
- f'{ callsign :8 } - '
515
+ f'{ callsign :9 } - '
514
516
f'altitude: { packet_track .altitudes [- 1 ]:6.1f} m'
515
517
f'; avg. ascent rate: { numpy .mean (packet_track .ascent_rates [packet_track .ascent_rates > 0 ]):5.1f} m/s'
516
518
f'; avg. descent rate: { numpy .mean (packet_track .ascent_rates [packet_track .ascent_rates < 0 ]):5.1f} m/s'
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ def insert(self, packets: [APRSPacket]):
168
168
for packet in packets :
169
169
if packet .crs != self .crs :
170
170
packet .transform_to (self .crs )
171
- records = [self .__packet_record (packet ) for packet in packets ]
171
+ records = [self .__packet_record (packet ) for packet in packets if packet not in self ]
172
172
PostGresTable .insert (self , records )
173
173
174
174
def __contains__ (self , packet : LocationPacket ) -> bool :
You can’t perform that action at this time.
0 commit comments