POLICE SCANNER SOUND

While you are war-driving (or whatever), wouldn't it be nice if you didn't have to look up a public safety frequency or police department frequency to punch into your police scanner. Well how about a SDR (software defined radio) plugged into your portable laptop or notepad's USB port? It could be tuned automatically to all local frequencies close to you based on a local database you downloaded from let's say Radio Reference's website.

You'll need to add GPS capability with an external USB GPS receiver (i.e. Delorme Earthmate LT-20 and Serial Emulator). It has software like maybe a JavaScript API to monitor that USB serial port for GPS data and feed it to your program. Every time it polls the GPS receiver, it scans the local databases GPS coordinates for exact hits. Failing that it looks at all GPS coordinates in the list and one by one computes the polar distance between it and your present coordinates (using trig function - rectangular to polar). The ones that are within only a few miles (or meters) - for which you preset - are the only frequencies scanned. This process is done at high computer speeds you'll never notice any long computational delays.

The scanning stops when it detects an Signal Level above squelch level. And it acts just like a standard police scanner. It also displays the name of the agency your monitoring at that present moment.

The PC display can be a great image of a radio monitoring console:

And lastly (if you use Google Chrome), how about allowing the feed run into your voice recognition program to display what is being said on the screen?

This is only in brainstorming phase right now. Any input from others is welcome...


TRIG FUNCTION TO FIND DISTANCE BETWEEN TWO COORDINATES

This uses the ‘haversine’ formula to calculate the great-circle distance between two points – that is, the shortest distance over the earth’s surface – giving an ‘as-the-crow-flies’ distance between the points (ignoring any hills they fly over, of course!).

Haversine
formula:

a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2)

c = 2 ⋅ atan2( √a, √(1−a) )

d = R ⋅ c

where

φ is latitude, λ is longitude, R is earth’s radius (mean radius = 6,371km);

note that angles need to be in radians to pass to trig functions!

JavaScript:

var R = 6371e3; // metres
var φ1 = lat1.toRadians();
var φ2 = lat2.toRadians();
var Δφ = (lat2-lat1).toRadians();
var Δλ = (lon2-lon1).toRadians();

var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) +
        Math.cos(φ1) * Math.cos(φ2) *
        Math.sin(Δλ/2) * Math.sin(Δλ/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));

var d = R * c;

_________________________________

Here is the FCC database link to download radio services with coordinates:

http://wireless2.fcc.gov/UlsApp/UlsSearch/searchAdvanced.jsp

__________________________________

Need to figure out how to do a SDR for GPS too. However, Delorme unit is kinda' sorta' a USB dongle of sorts.

__________________________________

It appears that my Delorme EarthMate LT-20 will not work on a 64-bit system per an old 2015 post from [Galane]. Also can't figure out how to get a text file log from it. So I'm going to go with another HaD's idea with having Internet access and using JavaScript Geolocation to get my present lat/lon. If you want to play with it go to TRYIT EDITOR v3.0 (http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation) and past in this javascript:

<code>
<!DOCTYPE html>
<html>
<body>
<p>Click the button to get your coordinates.</p>

<button onclick="getLocation()">Try It</button>


<p id="demo"></p>

<script>
var x = document.getElementById("demo");

function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}


function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +...

Read more »