[Xastir-dev] args to data_add()

Curt, WE7U archer at eskimo.com
Fri Apr 9 15:28:00 EDT 2004


On Fri, 9 Apr 2004, Wendell Turner wrote:

> What are the arguments to db.c:data_add() ?

I'd have to go into the code to see, just like you'll have to.

You can look for instances where data_add() gets called, and
back-track to the types of parameters from there.

Note that the lat/long values we use are in the Xastir coordinate
system, they're not what you're used to.  The transformations
between normal lat/long and our coordinates are very straightforward
though, and we have several examples of that in the code.


> If I want to place a (moving) target on the map, it looks like
> type should be some indicator that says data will contain either
> a gps sentence or some other lat/long/alt encoding.  Correct?

If you just want to throw an object onto the screen, there's an
easier way.  You can put a simulated APRS sentence right into our
decoding and then tell Xastir that there's something there.  It will
then go through the normal decoding routines and you won't have to
do anything special.

Look at the very end of interface.c:output_my_data().  You'll see
this line:

  decode_ax25_line( data_txt, DATA_VIA_LOCAL, port, 1);

That will throw a text line right into the decoding logic.  The APRS
specification is on www.tapr.org, which will help you to figure out
the correct sort of APRS string.

Depending on what accuracy you require, you might consider using
APRS Compressed position reports, which give you higher resolution
than normal DD MM.MM APRS posits, or perhaps use NMEA sentences with
DD MM.MMM or DD MM.MMMM posits.


> (Sorry, but I don't do radios, just aircraft.  However, now with
> the ability to use FAA sectionals, it should be easy to use
> xastir as a moving map display for the FlightGear
> (www.flightgear.org) simulator.  Would the xastir community be
> interested in those patches?)

If it would serve a purpose and wouldn't interfere with what we're
doing I don't see a big reason to reject it.  Some of the other
developers may have a different opinion on it though.  I guess we'll
see what other responses you get.

--
Curt, WE7U			    archer at eskimo dot com
Arlington, WA, USA		http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir-dev mailing list