BCR, a new format for gpsbabel

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

BCR, a new format for gpsbabel

Olaf Klein
Dear all,

here comes a new format for gpsbabel.

The master software "Motorrad Routenplaner" by Map&Guide i think is often used
in the german language area. Another gpsbabel format "TourExchangeFormat"
touches the same theme, but only the newest releases i've seen (2005/06) can
export to XML. It's possible there are a some (or all ???) more products from
M&G uses the same file format.

The file structure is like a windows ini-file and seems to be no problem. But
coordinates are stored in "Mercator" format, which has the radius of our big
blue ball in the formula to get our internal coordinates. This can produce
visible distances.

O.K.

P.S.
To Robert,

> _two_ formats that don't pass at the same time, but we've had such a
> burst of developer activity this week and if I don't parallelize them

sorry, here here is the next thread and don't know how to improve human
multiprocessing.



020-bcr.patch (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: BCR, a new format for gpsbabel

Robert Lipe
Olaf Klein wrote:

> here comes a new format for gpsbabel.

Thanx.

> coordinates are stored in "Mercator" format, which has the radius of our big
> blue ball in the formula to get our internal coordinates. This can produce

Wacky.

> > _two_ formats that don't pass at the same time, but we've had such a
> > burst of developer activity this week and if I don't parallelize them
>
> sorry, here here is the next thread and don't know how to improve human
> multiprocessing.

New formats or changes that are confined to one format aren't terribly
disruptive, so I can have a few of those in flight at the same time.
"Core" changes or more sweeping changes that may alter behaviour of a
lot of things (like your pending UTF work) require more thought.

+       wpt = waypt_new();
+       wpt->centiseconds = 0;
+       wpt->shortname = xstrdup(name);
+       wpt->altitude = unknown_alt;

Did the second and fourth lines of that shouldn't be necessary; that should
be done by the constructor.  Do you have evidence it isn't?

+char *
+bcr_iso8859_1_to_utf8(const char *s)

I'll sign off on "str_iso8859_1_to_utf8" in util.c and prototyped in
defs.h independently of the rest of the UTF work if that eliminates one
extra copy of this code.

+void
+bcr_wgs84_to_mercator(const double lat, const double lon, int *north, int *east
)

+void
+bcr_mercator_to_wgs84(const int north, const int east, double *lat, double *lon
)               /* OK */


Are these duplicates of GPS_Math_Mercator_EN_To_LatLon and friends down
in jeeps/gpsproj.c?   (If not, please just say "no" and don't try to explain
the math to me. :-)

I find the overload of centiseconds to be a little unnerving, but
allocating a pointer to hold a single char seems worse, so I'll just
let that go.

+                       if (strcasecmp(buff, "standort") == 0)
+                       else if (strcasecmp(buff, "Town") == 0)

This isn't available in C89.  Use case_ignore_strcmp()

+double distance_rad(double lat1, double lon1, double lat2, double lon2)
+double distance(double lat1, double lon1, double lat2, double lon2)


I think I'd rather move gc_distance() from positon.c to grtcirc.c and
make it public than duplicate it here.

+bcr_qsort_cb(const void *a, const void *b)
+{
+       const waypoint *wa = *(waypoint **)a;
+       const waypoint *wb = *(waypoint **)b;
+
+       if (wa->latitude > wb->latitude) return -1;
+       else if (wa->latitude < wb->latitude) return +1;
+       else return 0;
+}

In addition to that optimizing down to a subtraction, does that do
the desired thing across the hemisphere boundaries?

This looks like promising stuff.  

I'm leaving my desk for a bit, so if you can revise it with those review
notes before I'm back, I'll commit that version tonight.

Thanx,
RJL


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-code mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Reply | Threaded
Open this post in threaded view
|

Re: BCR, a new format for gpsbabel

Olaf Klein
In reply to this post by Olaf Klein
Hello Robert,

here comes a new version of bcr. I've added write functions and changed the
things we discussed above.

Currently i do not se any bcr code in the tree. So i send you the complete
patch.

O.K.


020a-bcr.patch (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: BCR, a new format for gpsbabel

Robert Lipe
Olaf Klein wrote:

> here comes a new version of bcr. I've added write functions and changed the

Lovely.  Applied without change.

Let's do remember to whack the multiple 8859->utf8 functions when we get
there.

> Currently i do not se any bcr code in the tree. So i send you the complete
> patch.

Yes, I did that so we didn't trample each other as readily since I knew
you were outrunning me these days. :-)

I think we have Vito and GDB approaching closure so we should be able to
start a stabilization round soon.

Thanx,
RJL


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-code mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Reply | Threaded
Open this post in threaded view
|

Re: bug report: google conversion

alan-7
Question:

Was this addressed in GPSBabel or is there a work around besides
cleaning up the
xml? I saw that Ron replied but the archives shows nothing was entered. I just
wanted to know before I hack up a cleanse routine to remove the x'B0's.

Thanks,

Alan


---------------------------------------------------------------------------
Travis wrote:

I notice that when one tries doing a conversion of directions using
google maps
to whatever output format that when you have a coordinate as a node instead of
an address the error "XML Reader:Parse error at 2: not well-formed (invalid
token)" occurs.  For example try using the following url
  http://maps.google.com/maps?q=39.82N,%20104.96W%20to%20AURORA,%20CO It will
display a map but if you use the same url with the &output=js parameter and
then save it to a file and then try using gpsbabel to decode the waypoints or
route the above formentioned error occurs.
Otherwise gpsbabel works great for address used in google.maps
Thank you

Travis






-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-code mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Reply | Threaded
Open this post in threaded view
|

Re: Re: bug report: google conversion

Ron Parker-2
At 02:13 PM 6/29/2005, [hidden email] wrote:
>Was this addressed in GPSBabel or is there a work around besides cleaning
>up the
>xml? I saw that Ron replied but the archives shows nothing was entered. I just
>wanted to know before I hack up a cleanse routine to remove the x'B0's.

There's a better approach that Robert and I discussed offline, but feel
free to hack up something to work for now.  I'll try to implement the
better version this week sometime.  I'd have done it already, but I had
some more pressing issues to deal with:

   http://www.livejournal.com/users/parkrrrr/1633.html

I also submitted feedback to Google on the matter, but I haven't gotten
anything but a form letter in response to that.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-code mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Reply | Threaded
Open this post in threaded view
|

Re: Re: bug report: google conversion

Ron Parker-2
In reply to this post by alan-7
[hidden email] wrote:

> Was this addressed in GPSBabel or is there a work around besides
> cleaning up the
> xml? I saw that Ron replied but the archives shows nothing was
> entered. I just
> wanted to know before I hack up a cleanse routine to remove the x'B0's.

Fixed & committed.  Should be on the public CVS before sane
norteamericanos are awake.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-code mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code