Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Feb 2009
#21
For anyone that has not seen one.

http://www.digitalham.co.uk/equipmen...nalink_usb.php
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#22
So it behaves like a USB sound card to the computer.. I'm not certain about the state of USB sound drivers on the tablets, in particular the 770's default operating system is OS2006 which may be in a poorer state than the newer systems. If someone knows anything about the state of USB sound drivers on the tablets please step forward.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Posts: 14 | Thanked: 3 times | Joined on Aug 2007
#23
Originally Posted by st5150 View Post
Fanoush has posted the serial drivers you need. http://www.internettablettalk.com/fo...12&postcount=5 Just insmod them in and use gpspipe http://www.internettablettalk.com/fo...ad.php?t=20433
I forgot which chipset was more stable for me, I believe the non FTDI one was more stable.
Saw those a few times and never did find a driver for the serial adapter I picked up.

Just ordered a PL2303 based one so I hope to meet with more success once it arrives.

Still need to work on my QEMU scratchbox so I can try to pull down the MaemoMapper + APRS and compile.

The IMG I'm using doesn't come up to the GUI and I can't seem to make it boot into single-user-mode w/o password and haven't researched the root password for the commonly available VMWare images.. but I haven't tried too hard yet.
 
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#24
I know what you mean, I've been lagging for a year getting scratchbox up and running right.

On a different note, I checked the spec sheet for the FM transmitter that will be used on the next gen NIT. It doesn't go down low enough to support 6 meters. So much for dreams of 6 meter QRP NIT contacts.
 
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#25
Anyone know of a NIT GPS program that displays coordinates in Maidenhead grid square format? http://en.wikipedia.org/wiki/Maidenhead_Locator_System

I suppose I could write something quick and dirty using the code below, but I thought I'd ask fist.


Code:
#
# bearing and distance calculations together with
# locator convertions to lat/long and back
#
# some of this is nicked from 'Amateur Radio Software' by 
# John Morris GM4ANB and tranlated into perl from the original
# basic by me - I have factorised it where I can be bothered
#
# Copyright (c) 1998 - Dirk Koopman G1TLH
#
# $Id: DXBearing.pm,v 1.11 2006/03/26 18:36:01 minima Exp $
#

package DXBearing;

use DXUtil;
use POSIX qw(:math_h);

use strict;
use vars qw($pi);

$pi = 3.14159265358979;

use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision: 1.11 $ =~ /\d+\.\d+\.(\d+)\.(\d+)/  || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;

# convert a qra locator into lat/long in DEGREES
sub qratoll
{
	my $qra = uc shift;
	my ($p1, $p2, $p3, $p4, $p5, $p6) = unpack 'AAAAAA', $qra;
	($p1, $p2, $p3, $p4, $p5, $p6) = (ord($p1)-ord('A'), ord($p2)-ord('A'), ord($p3)-ord('0'), ord($p4)-ord('0'), ord($p5)-ord('A'), ord($p6)-ord('A') );
	
	my $long = ($p1*20) + ($p3*2) + (($p5+0.5)/12) - 180;
    my $lat = ($p2*10) + $p4 + (($p6+0.5)/24) - 90;
	return ($lat, $long);
}

# convert a lat, long in DEGREES to a qra locator 
sub lltoqra
{
	my $lat = shift;
	my $long = shift;

	my $v;
	my ($p1, $p2, $p3, $p4, $p5, $p6);
	
	$lat += 90;
	$long += 180;
	$v = int($long / 20); 
	$long -= ($v * 20);
	$p1 = chr(ord('A') + $v);
	$v = int($lat / 10);			   
	$lat -= ($v * 10);
	$p2 = chr(ord('A') + $v);
	$p3 = int($long/2);
	$p4 = int($lat);
	$long -= $p3*2;
	$lat -= $p4;
	$p3 = chr(ord('0')+$p3);
	$p4 = chr(ord('0')+$p4);
	$p5 = int((12 * $long) );
	$p6 = int((24 * $lat) );
	$p5 = chr(ord('A')+$p5);
	$p6 = chr(ord('A')+$p6);

	return "$p1$p2$p3$p4$p5$p6";
}

# radians to degrees
sub rd
{
	my $n = shift;
	return ($n / $pi) * 180;
}

# degrees to radians
sub dr 
{
	my $n = shift;
	return ($n / 180) * $pi;
}

# calc bearing and distance, with arguments in DEGREES
# home lat/long -> lat/long
# returns bearing (in DEGREES) & distance in KM
sub bdist
{
	my $hn = dr(shift);
	my $he = dr(shift);
	my $n = dr(shift);
	my $e = dr(shift);
	return (0, 0) if $hn == $n && $he == $e;
	my $co = cos($he-$e)*cos($hn)*cos($n)+sin($hn)*sin($n);
	my $ca = $co ? atan(abs(sqrt(1-$co*$co)/$co)) : $pi;
	$ca = $pi-$ca if $co < 0;
	my $dx = 6367*$ca;
	my $si = sin($e-$he)*cos($n)*cos($hn);
	$co = sin($n)-sin($hn)*cos($ca);
	my $az = $co ? atan(abs($si/$co)) : $pi;
	$az = $pi - $az if $co < 0;
	$az = -$az if $si < 0;
	$az = $az+2*$pi if $az < 0;
	return (rd($az), $dx);
}

# turn a lat long string into floating point lat and long
sub stoll
{
	my ($latd, $latm, $latl, $longd, $longm, $longl) = $_[0] =~ /(\d{1,2})\s+(\d{1,2})\s*([NnSs])\s+(1?\d{1,2})\s+(\d{1,2})\s*([EeWw])/;
	
	$longd += ($longm/60);
	$longd = 0-$longd if (uc $longl) eq 'W'; 
	$latd += ($latm/60);
	$latd = 0-$latd if (uc $latl) eq 'S';
	return ($latd, $longd);
}

# turn a lat and long into a string
sub lltos
{
	my ($lat, $long) = @_;
	my $slat = slat($lat);
	my $slong = slong($long);
	return "$slat $slong";
}
1;

Last edited by st5150; 2009-07-24 at 06:31.
 
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#26
Know your gridsquare at all times!

Launch gpsd by running your favorite map program or

/usr/libexec/navicore-gpsd-helper

Then run

python gpsdll2mh.py




Code:
#!/usr/bin/python

# gpsdll2mh.py
#
# G1OGY 20081102
#
# `gpsdll2mh.py` is a `gpsd' [http://gpsd.berlios.de] console-client which
# prints Maidenhead LOCATOR at user-determined, arbitary, even-number
# precision; (GPS precision max=52 - it gets quite silly long before that).
#
# PREREQUISITES: this program requires access to a running `gpsd' daemon 
# (with a GPS receiver attached and functional).
#
# `gpsdll2mh.py` is intended for 'Rover-style' operation ( WAB, WAS, perhaps)
# so that one's 'new' locator can be sent as soon as it becomes apparant.
# It will also assist in calculating a (static) locator to a greater
# precision for microwave dish aiming purposes.
#
# 
#
# Command line args are supported to select Locator precision (default=6);
# repeat frequency; server:port 
#
#
# Command line (console) usage:
#
#       python gpsdll2mh.py [[[precision] [repeat]] [server:port]]] <additive>
#
# like: python gpsdll2mh.py 10 30 (on a linux laptop running gpsd)
# or  : python gpsdll2mh.py 10 30 192.168.1.99:2947 (on a (Windows) laptop connecting
#						     to linux server on standard port)
# so:		10-char locator evey 30 seconds 
#
#
# Credits:
# The Lat/Long to Maidenhead part of this program is a rework of an original script by 
# Dan Jacobson -- http://jidanni.org/geo/maidenhead/ ; latterly updated by Rene Kanter.
#
## lonlat2maidenhead -- long/lat to Maidenhead grid calculator not limited to 6 characters
## Created On      : Sat Mar 15 03:54:08 2003
## rkanters 2004.2.20 version ll2mh
#
# Thank you, gentlemen.
#

#
# gpsdll2mh.py Program code
# -------------------------


# get modules
import re, sys, string
from time import sleep
from socket import *

# Set variables (defaults)
gpsdHost = 'localhost'
gpsdPort = 2947                         # gpsd default (IANA)
gpsdCall = ['p']                        # fixed gpsd command for 'position'

# print usage at default (no args) start ('cos of cheap way to do command-line args)
print '\n***********************************************************************'
print '\n',sys.argv[0],

# Ah! running with no args
if len(sys.argv)<2:
    print "Running : 6-char LOC, 5 sec rptr, `gpsd' is local, default port \n"
    print 'Usage:'
    print '      ',sys.argv[0],'[[[LOC Precision] [Repeat delay]] [Server:port]]]\n'
# Abort!
print '\nINFO :: ** Ctrl-C to stop **\n\n'

# Ah! Now have args to chobble...
# validate the input precision value: must have an even number
if len(sys.argv)>1:
    loclen=int(sys.argv[1])
    if loclen<2 or loclen%2!=0:
        sys.stderr.write('ERROR :: Locator precision requested must be an even number \n\n')
        sys.exit(87)
else:
    loclen=6                            # why report only Square? (won't often change unless you're in a 'plane!)
                                        # if only sqare is needed then '4' on cmd line
                                        
maxn=loclen/2                           # program constant

# grab or set repeat value
if len(sys.argv)>2:
    snooze=int(sys.argv[2])
else:
    snooze = 5                          # seconds


# gpsd network server
if len(sys.argv)>3:
     sp = sys.argv[3].split(":")
     gpsdHost=sp[0]
     gpsdPort=int(sp[1])
print 'INFO :: Connecting to :  ', gpsdHost,':',gpsdPort,'\n'

# Networking
# create local socket
gpsdSock = socket(AF_INET, SOCK_STREAM)

# connect to gpsd daemon
try:
    gpsdSock.connect((gpsdHost, gpsdPort))
except Exception, e:
    print " FATAL ERROR :: Cannot connect to `gpsd'!\n"
    print "Is `gpsd' running? Is your server:port address correct?\n"
    print "System message ::" , e ,'\n'
    

# send position query, receive response and calculate LOCATOR
# ~persevere~ if daemon is recalcitrant
try:
    while 1:
        for Query in gpsdCall:
            gpsdSock.send(Query)
            data = gpsdSock.recv(32)
            if len(data)<12:
                break
            latlong = data[7:]

            A=ord('A')                  # set a base value for the calcs.
            
# Following commented code originally allowed for manual entry of the lat/long values - 
# I'll revisit this sometime so that there's a stand-alone option.
# run the prog with a switch - it sits and waits for input: LAT.###### <space> LONG.###### [CR]
# JIC the OPS have only a handheld GPS or Sat-Nav system available.
##            
### while 1:
###    line=sys.stdin.re adline()
###    if not line: break
###    ll=re.findall(r'([-0-9.]+)\s+([-0-9.]+)',line)
##

            ll=re.findall(r'([-0-9.]+)\s+([-0-9.]+)',latlong)
            if ll:
                for x,y in ll:
                    lat=float(x)
                    lon=float(y)
            else:
                sys.stderr.write(sys.argv[0]+': ERROR :: Cannot determine LAT / LONG. Is ''`gpsd'' running?\n\n')
                sys.exit(44)
                if -180<=lon<180: pass
                else:
                    sys.stderr.write('ERROR :: longitude must be -180<=lon<180\n\n')
                    sys.exit(32)
                
            if -90<=lat<90: pass
            else:
                sys.stderr.write('ERROR :: latitude must be -90<=lat<90\n\n')
                sys.exit(33)                    # can't handle north pole, sorry, [A-R]
                
            lon=(lon+180.0)/20                  # scale down and set up for first digit
            lat=(lat+90.0)/10
            mhloc=""
            i=0
            while i<maxn:
                i+=1
                loni=int(lon)
                lati=int(lat)
                if i%2:
                    mhloc+=chr(A+loni)+chr(A+lati)
                    lon=(lon-loni)*10
                    lat=(lat-lati)*10
                else:
                    mhloc+=str(loni)+str(lati)
                    lon=(lon-loni)*24
                    lat=(lat-lati)*24
            
# print lat/long 'cos a short (<12) locator won't update much 
# (unless you've got the hammer down)                 

            print 'Lat / Long: ', latlong, 'Locator:    ', mhloc, '\n'      # main output
            sleep(snooze)                                                   # repeat delay
# Close down            

except KeyboardInterrupt:                       # inhibits the traceback on exit
    gpsdSock.shutdown(1)
    gpsdSock.close()
            
# returns the grid square, to the precision given, that contains the given point.
#


# TO DO
# DONE! Trap no valid GPS Data - if GPS device is unplugged gpsd continues but provides `?'

# DONE! Trap no gpsd daemon - can't connect
# Esoteric...
    # keep count (and display on close) of all Fields [IO, JO, JN], Squares [JO01, IO91, JP63] 
    # and Sub-Squares [JO01BR, JO01HQ] traversed on the journey.
    # 3 counters inside. Storage??  mySQL-Lite??
    # print 'em ???
You can download the code above here http://www.g1ogy.com/projects/gps/gpsdll2mh.py or here http://www.g1ogy.com/projects/gps/gpsdll2mh.shtml

A simple script to run this would be

Code:
/usr/libexec/navicore-gpsd-helper&
sleep 15
python gpsdll2mh.py
Or if you want the extra bells such as the compass from GPSJinni

Code:
GPSJinni&
sleep 15
python gpsdll2mh.py

Last edited by st5150; 2010-05-21 at 18:42.
 
ki6amd's Avatar
Posts: 12 | Thanked: 2 times | Joined on Oct 2008 @ SLC, UT / Bakersfield, CA
#27
So there's no /dev/tty or /dev/rfcomm ? Hmm... I only had a test unit, but I thought there was. Anyone ever heard of bluetooth serial adapter? It's supported under almost every bluetooth stack as BTSPP. I'm fairly certain it will work with the N900, just as it does with the N810.


You can find MANY manufacturers of these here. Let me know if this helps... I've blogged about this at http://blog.ki6amd.com

Last edited by ki6amd; 2010-06-07 at 21:33. Reason: forgot a word or two
 
fnordianslip's Avatar
Posts: 670 | Thanked: 359 times | Joined on May 2007
#28
So USB host mode for the N900 is looking as if it will be useful imminently, and the new Kenwood D-72 HT is due in early December (I've just preordered one).

I've put a feature request in for the power-kernel to support AX.25 networking and KISS mode, and have just built such a variant of the power-kernel v45, which I may not actually test just yet until the dust settles a bit and some reported issues are better explained.

I hope to build the ax25 libs and utils packages over the next few weeks for maemo5. There's still the old stuff I built for N8x0 (Diablo) floating around here somewhere, too.

If anyone else is planning on getting a D72, it would be interesting to hear if you plan to use it with your maemo device.
__________________
Class .. : Lame hacker & beardy boffin
Humour . : [#######---] Alignment: Apathetic anarchist
Patience : [####------] Weapon(s): My cat, my code.
Agro ... : |#---------] Relic(s) : N900, MacBookPro, NSLU2, N800, SheevaPlug, Eee-901, Core2-Quad, PS3
"In theory, theory and practice are the same. In practice, they're not."
--
Beware of extras-devel.
 
Posts: 1,417 | Thanked: 2,619 times | Joined on Jan 2011 @ Touring
#29
AX 25 is great for APRS, if anyone is writing an app though it should have a console mode for accessing BBS's like on the international space station.
Here is a PSK-31 project that looks easy enough to run on a N900. http://www.qsl.net/n1vtn/phaseshift.html
I dont have a working scratchbox but Petittrack is on the same page and worked brilliantly on the Zaurus source there too. http://www.qsl.net/n1vtn/petittrack.html
My netbook / partition is too small to fit scratchbox so I can't compile these myself.
Any thoughts of trying a one off hack/wrapper of the Android Echolink app? http://www.echolink.org/faq_android.htm
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:51.