Quantcast

Speed units (unicsv)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Speed units (unicsv)

Giorgio Moscardi
Hi there,

I'm a new gpsbabel user, and I find it is a very useful tool.

I have built my own GPS logger with the Arduino platform, which
produces unicsv files. I then process the created files to turn them
into GPX, which seems the format of choice for most sites accepting
GPS data. The process is working almost flawlessly but I have a small
problem with the speed field: which unit is it expected into? I
noticed that if I upload my CSV files straight to gpsvisualizer.com
(for instance), it expects km/h but then, if I convert the CSV to GPX
with gpsbabel, the speed is just taken as-is, while I seem to
understand that GPX uses m/s.

So I thought that maybe it would be possible to do something like with
altitudes, where adding "ft" states that it is expressed in feet and
gpsbabel can convert appropriately.

Thanks for your time,
G.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speed units (unicsv)

tsteven4-2
you can add any of the following strings to the values in the speed
column in your unicsv file to indicate the units.  without units it will
be assumed to be in meters per second.

so for the speed column use something like this

speed

1.0kph

2.0 km/h

3.0 kmh

>   if (case_ignore_strcmp(unit, "m/s") == 0) ;
>   else if (case_ignore_strcmp(unit, "mps") == 0) ;
>   else if (case_ignore_strcmp(unit, "kph") == 0) {
>     *val = KPH_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "km/h") == 0) {
>     *val = KPH_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "kmh") == 0) {
>     *val = KPH_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "kt") == 0) {
>     *val = KNOTS_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "knot") == 0) {
>     *val = KNOTS_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "mph") == 0) {
>     *val = MPH_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "mi/h") == 0) {
>     *val = MPH_TO_MPS(*val);
>   } else if (case_ignore_strcmp(unit, "mih") == 0) {
>     *val = MPH_TO_MPS(*val);
>   } else {
>     fatal("%s: Unsupported speed unit '%s' in item '%s'!\n", module,
> unit, str);
>   }


On 10/5/2016 1:06 PM, Giorgio Moscardi wrote:

> Hi there,
>
> I'm a new gpsbabel user, and I find it is a very useful tool.
>
> I have built my own GPS logger with the Arduino platform, which
> produces unicsv files. I then process the created files to turn them
> into GPX, which seems the format of choice for most sites accepting
> GPS data. The process is working almost flawlessly but I have a small
> problem with the speed field: which unit is it expected into? I
> noticed that if I upload my CSV files straight to gpsvisualizer.com
> (for instance), it expects km/h but then, if I convert the CSV to GPX
> with gpsbabel, the speed is just taken as-is, while I seem to
> understand that GPX uses m/s.
>
> So I thought that maybe it would be possible to do something like with
> altitudes, where adding "ft" states that it is expressed in feet and
> gpsbabel can convert appropriately.
>
> Thanks for your time,
> G.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gpsbabel-misc mailing list http://www.gpsbabel.org
> [hidden email]
> To unsubscribe, change list options, or see archives, visit:
> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speed units (unicsv)

Giorgio Moscardi
This works well, thanks a lot! It would probably be a good idea to
document this feature on the unicsv format page at
https://www.gpsbabel.org/htmldoc-development/fmt_unicsv.html.

Thanks again!
G.

2016-10-06 1:00 GMT+02:00 tsteven4 <[hidden email]>:

> you can add any of the following strings to the values in the speed
> column in your unicsv file to indicate the units.  without units it will
> be assumed to be in meters per second.
>
> so for the speed column use something like this
>
> speed
>
> 1.0kph
>
> 2.0 km/h
>
> 3.0 kmh
>
>>   if (case_ignore_strcmp(unit, "m/s") == 0) ;
>>   else if (case_ignore_strcmp(unit, "mps") == 0) ;
>>   else if (case_ignore_strcmp(unit, "kph") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "km/h") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "kmh") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "kt") == 0) {
>>     *val = KNOTS_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "knot") == 0) {
>>     *val = KNOTS_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mph") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mi/h") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mih") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else {
>>     fatal("%s: Unsupported speed unit '%s' in item '%s'!\n", module,
>> unit, str);
>>   }
>
>
> On 10/5/2016 1:06 PM, Giorgio Moscardi wrote:
>> Hi there,
>>
>> I'm a new gpsbabel user, and I find it is a very useful tool.
>>
>> I have built my own GPS logger with the Arduino platform, which
>> produces unicsv files. I then process the created files to turn them
>> into GPX, which seems the format of choice for most sites accepting
>> GPS data. The process is working almost flawlessly but I have a small
>> problem with the speed field: which unit is it expected into? I
>> noticed that if I upload my CSV files straight to gpsvisualizer.com
>> (for instance), it expects km/h but then, if I convert the CSV to GPX
>> with gpsbabel, the speed is just taken as-is, while I seem to
>> understand that GPX uses m/s.
>>
>> So I thought that maybe it would be possible to do something like with
>> altitudes, where adding "ft" states that it is expressed in feet and
>> gpsbabel can convert appropriately.
>>
>> Thanks for your time,
>> G.
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gpsbabel-misc mailing list http://www.gpsbabel.org
>> [hidden email]
>> To unsubscribe, change list options, or see archives, visit:
>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gpsbabel-misc mailing list http://www.gpsbabel.org
> [hidden email]
> To unsubscribe, change list options, or see archives, visit:
> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speed units (unicsv)

Robert Lipe-4
(I was in a tent a couple of time zones away when this conversation went down, but I agree we could do better. Doc improved in    4532ceb..1df4775. Thanx for bringing it to our attention and particularly to Steven for bringing short-term relief to you.

On Sun, Oct 9, 2016 at 6:26 PM, Giorgio Moscardi <[hidden email]> wrote:
This works well, thanks a lot! It would probably be a good idea to
document this feature on the unicsv format page at
https://www.gpsbabel.org/htmldoc-development/fmt_unicsv.html.

Thanks again!
G.

2016-10-06 1:00 GMT+02:00 tsteven4 <[hidden email]>:
> you can add any of the following strings to the values in the speed
> column in your unicsv file to indicate the units.  without units it will
> be assumed to be in meters per second.
>
> so for the speed column use something like this
>
> speed
>
> 1.0kph
>
> 2.0 km/h
>
> 3.0 kmh
>
>>   if (case_ignore_strcmp(unit, "m/s") == 0) ;
>>   else if (case_ignore_strcmp(unit, "mps") == 0) ;
>>   else if (case_ignore_strcmp(unit, "kph") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "km/h") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "kmh") == 0) {
>>     *val = KPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "kt") == 0) {
>>     *val = KNOTS_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "knot") == 0) {
>>     *val = KNOTS_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mph") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mi/h") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else if (case_ignore_strcmp(unit, "mih") == 0) {
>>     *val = MPH_TO_MPS(*val);
>>   } else {
>>     fatal("%s: Unsupported speed unit '%s' in item '%s'!\n", module,
>> unit, str);
>>   }
>
>
> On 10/5/2016 1:06 PM, Giorgio Moscardi wrote:
>> Hi there,
>>
>> I'm a new gpsbabel user, and I find it is a very useful tool.
>>
>> I have built my own GPS logger with the Arduino platform, which
>> produces unicsv files. I then process the created files to turn them
>> into GPX, which seems the format of choice for most sites accepting
>> GPS data. The process is working almost flawlessly but I have a small
>> problem with the speed field: which unit is it expected into? I
>> noticed that if I upload my CSV files straight to gpsvisualizer.com
>> (for instance), it expects km/h but then, if I convert the CSV to GPX
>> with gpsbabel, the speed is just taken as-is, while I seem to
>> understand that GPX uses m/s.
>>
>> So I thought that maybe it would be possible to do something like with
>> altitudes, where adding "ft" states that it is expressed in feet and
>> gpsbabel can convert appropriately.
>>
>> Thanks for your time,
>> G.
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gpsbabel-misc mailing list http://www.gpsbabel.org
>> [hidden email]
>> To unsubscribe, change list options, or see archives, visit:
>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gpsbabel-misc mailing list http://www.gpsbabel.org
> [hidden email]
> To unsubscribe, change list options, or see archives, visit:
> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Loading...