' **********************************************************************
' * Script name:   Trip Odometer                                       *
' * Description:   the unit send the message every 100 meters with     *
' *                odometer as part of the message                     *
' * Responsible:   Ramiro Sanchez                                      *
' * Date:          03/15/2011                                          *
' **********************************************************************
' --------------------------------------------------------------------
' General configuration
' --------------------------------------------------------------------
'at&f
at+cgsn
at$pkg
at+cgmr
at+cgatt=0
at+cgdcont=1,"IP","internet3.voicestream.com"
at$UDpAPI=,1720
at$Friend=1,1,"209.42.60.137"

at$odometer=0

AT$EVDELR=8,99

AT$EVENT=11,1,16,100,100000
AT$EVENT=11,3,40,11,3674318
AT$EVENT=11,3,60,11,3674318

'AT$EVENT=12,1,91,500,100000
'AT$EVENT=12,3,40,12,3674318
'AT$EVENT=12,3,60,12,3674318

AT$EVENT=14,1,70,1000,100000
AT$EVENT=14,3,40,14,3674318
AT$EVENT=14,3,60,14,3674318

'Geofences with d=bounce

at$GFDBNC=0,0
' My home
at$geofnc=1,100, 25.7798386,-80.3291855
' SkyPatrol
at$geofnc=2,100, 25.8021574,-80.33229157
' Juan's home
at$geofnc=3,200, 25.8087,-80.186774


'Inside the geofense
at$event=40,0,21,1,1
at$event=40,3,40,40,3674318
at$event=40,3,60,40,3674318

at$event=41,0,22,1,1
at$event=41,3,40,41,3674318
at$event=41,3,60,41,3674318

at$event=42,0,23,1,1
at$event=42,3,40,42,3674318
at$event=42,3,60,42,3674318

'Outside the geofense
at$event=50,0,21,0,0
at$event=50,3,40,50,3674318
at$event=50,3,60,50,3674318

at$event=51,0,22,0,0
at$event=51,3,40,51,3674318
at$event=51,3,60,51,3674318

at$event=52,0,23,0,0
at$event=52,3,40,52,3674318
at$event=52,3,60,52,3674318

AT$EVENT=61,0,30,120,1000000
AT$EVENT=61,3,40,61,3674318
AT$EVENT=61,3,60,61,3674318

at+cgatt=1
at$areg=2
at&w

