From f4c157dfd48ec788341ceae9f310495cdd6594de Mon Sep 17 00:00:00 2001 From: Andrew Larcombe Date: Tue, 23 Jan 2018 23:04:43 +0000 Subject: [PATCH] Another fix --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7fed16e3..49621d31 100644 --- a/main.go +++ b/main.go @@ -242,7 +242,7 @@ func process_basestation_message(message string) { if err != nil { logger.Log("msg", "Failed to get airport from airport code "+dest_airport_code) } else { - dest_lat_long := fmt.Sprintf("%.4f,%.4f", dest_airport.Lat, dest_airport.Lon) + dest_lat_long := fmt.Sprintf("%s,%s", dest_airport.Lat, dest_airport.Lon) _, err := db.Exec("insert into watft(destination_lat_long,destination_airport_name,callsign,altitude) values(?,?,?)", dest_lat_long, dest_airport.Name, flight_callsign, flight_alt) if err != nil { logger.Log("msg", string(flight_callsign)+" just flew overhead, but failed to write into db", "err", err)