Jump to content

Gil

Recommended Posts

On 15.4.2016 at 4:01 PM, Paco Gorina said:

The data you lost when stopping the 

Found. It reinited when the device connected. Changed to init data just when pushing button .

Works like charm now!

I included the "Single Runtime (km)", so the "stops" can be seen. In the end there where some bluetooth disconnections ( i was riding on another wheel while still logging mine) - was handled perfectly again from 9BMetrics.

Just Energy stopped after the second time i shut off the wheel?

Total.png

And as preview for the "App Store Users" (or is it already included in the latest app store version?) - the map view of the log. By now it works only, once the log is finished (one stopped logging). Imho it would be nice (if it's not to complicated) to also get the map view while logging - then there's no need to start a seperate map for orientation, etc... ;)

IMG_5983.PNG

And i broke @Blunzn's current usage record: My 9Bot used 48,13 Amps! I assume i was still standing/riding the wheel with this max current and then immedeatly stepped of...It was a last steep incline. 

It's hard to say if either the mainboard reduced the current (some sort of shut-off) or the current demand stopped, because i gave up going further... I assume the second possibility was what's happening - on earlier rides at some very steep inclines i was almost already standing still but managed to "push" the 9Bot further up the hill. Maybe this afternoon i can repeat this "pushing" ride (if it won't start to rain) and get some new highscore ;)

48.13 Amps.png

14 hours ago, Gil said:

Perhaps could we pin a post at the beginning of this thread with everything needed to use 9BMetrics ?

Short description + link to gnuplot 5.02 for windows + 9B V3.03.dem + link to user guide ?

Sounds like a nice idea! I realised, that 5.03 should be the newer Version (last release candidate) - have to update once...

14 hours ago, Gil said:

And I almost forgot link to Paco and Chriull's Paypal accounts ;-)

I don't have such a thing - and the one who makes the work here is Paco!

Link to comment
Share on other sites

  • Replies 220
  • Created
  • Last Reply

We really have an excellent app for Ninebot. I have used it a lot in many conditions to check whether I was demanding too much to my 9B1 or not (slopes up and down, accelerations, braking). Incredibly useful and reassuring. I am just wondering why so few GPS points are recorded. For example, this is the log

Parcours.png

but, when you try to exploit the associated gpx file, you see that the GPS sampling is very very low (just 40 points) :

Capture.JPG

I swear that I ride along streets and do not fly across blocks (perhaps will we have this with Ninebot Twelve) !

I am using a iPhone 6S. Not a problem of processor power...

Any idea ?

 

9B_20160417_153427.gpx

Link to comment
Share on other sites

The program reads as many points as iOS gives it. Only restriction is that points must be "good". What that means is that the localAccuracy as reported by iOS whoud be less than 20 m.

if loc.horizontalAccuracy <= 20.0{

Because data with worst accuracy are usually not usefull (errors, not getting a fix, etc...)

Also 9BMetrics discards points nearer than 5m. That is because usually GPS error is about that distance (sometimes in very good days and with clear skies you may get 3.) That means thay are not meaningful and only generate noise. Of course that point makes  9BMetrics "cut" corners.

I think in your gpx file the problem is mo points when you are riding over the buildings.

I have done two tracks so you may see some of the usual problems. They are done outside big buildings and a clear day but in different days. They should have good GPS signal.

First one is https://www.flickr.com/photos/56267272@N06/shares/xeza34 that gives a general view  and although they seem quite correct sometimes they wander outside the streets.

Here https://www.flickr.com/photos/56267272@N06/shares/0VY167 there is a detail with photo. Of course tracks wander 5 m more or less. The two should go the same side of the road.

In this one https://www.flickr.com/photos/56267272@N06/shares/0VY167 there are two turns in different directions around the tree in the middle of the square. They are completely out of place and the 5m accuracy is important.

And all that was with very good GPS conditions.

Following one is a town track https://www.flickr.com/photos/56267272@N06/shares/6987x3 it is easy to see a place where it lost signal . 

Here https://www.flickr.com/photos/56267272@N06/shares/340814 the real track went through the streets but i has lost some points. ad here https://www.flickr.com/photos/56267272@N06/shares/bHb0co it cuts corners.

As the data is direct (no map filtering as in a car GPS) these types of errors are quite usual.

To get best results the phone should have a good sky view and sometimes fabrics interfere a lot.

To check it I will try to run the same with the iPhone and a Suunto watch and compare tracks. My experience is sometimes one is better, sometimes the other.

 

Link to comment
Share on other sites

9 hours ago, Chriull said:

...And i broke @Blunzn's current usage record: My 9Bot used 48,13 Amps! I assume i was still standing/riding the wheel with this max current and then immedeatly stepped of...It was a last steep incline. 

... Maybe this afternoon i can repeat this "pushing" ride (if it won't start to rain) and get some new highscore ;)...

Total.png

Did not really work out to get more the the 48 Amps. I managed only 42.16 - but this while normal driving ;) My Ninebot took this incline really nice - the "pushing" was just necessary the last time, because it was muddy ...

Link to comment
Share on other sites

1 hour ago, Paco Gorina said:

The program reads as many points as iOS gives it. Only restriction is that points must be "good". What that means is that the localAccuracy as reported by iOS whoud be less than 20 m.

if loc.horizontalAccuracy <= 20.0{

Because data with worst accuracy are usually not usefull (errors, not getting a fix, etc...)

Also 9BMetrics discards points nearer than 5m. That is because usually GPS error is about that distance (sometimes in very good days and with clear skies you may get 3.) That means thay are not meaningful and only generate noise. Of course that point makes  9BMetrics "cut" corners.

I think in your gpx file the problem is mo points when you are riding over the buildings.

I have done two tracks so you may see some of the usual problems. They are done outside big buildings and a clear day but in different days. They should have good GPS signal.

First one is https://www.flickr.com/photos/56267272@N06/shares/xeza34 that gives a general view  and although they seem quite correct sometimes they wander outside the streets.

Here https://www.flickr.com/photos/56267272@N06/shares/0VY167 there is a detail with photo. Of course tracks wander 5 m more or less. The two should go the same side of the road.

In this one https://www.flickr.com/photos/56267272@N06/shares/0VY167 there are two turns in different directions around the tree in the middle of the square. They are completely out of place and the 5m accuracy is important.

And all that was with very good GPS conditions.

Following one is a town track https://www.flickr.com/photos/56267272@N06/shares/6987x3 it is easy to see a place where it lost signal . 

Here https://www.flickr.com/photos/56267272@N06/shares/340814 the real track went through the streets but i has lost some points. ad here https://www.flickr.com/photos/56267272@N06/shares/bHb0co it cuts corners.

As the data is direct (no map filtering as in a car GPS) these types of errors are quite usual.

To get best results the phone should have a good sky view and sometimes fabrics interfere a lot.

To check it I will try to run the same with the iPhone and a Suunto watch and compare tracks. My experience is sometimes one is better, sometimes the other.

 

A bit of off-topic, but this just confirms my suspicions: that much error also means that GPS speed measuring is crap. Stick with bike computers ;)

Link to comment
Share on other sites

Speed from GPS has a lot of variation if computed from points but the chip gived directly a GPS value. You may access it from variable number 6 (in m/s * 1000, that is mm/s :) and check it with the one given by the wheel. 

 

I find the distances of GPS and the given by the wheel quite comparable.

Link to comment
Share on other sites

Thank you, @Paco Gorina, for these explanations on GPS. I understand well. I forgot that car GPS or Google Maps filter according to the map. No need to spend time on this issue. Your app is already great without this GPS stuff.

Link to comment
Share on other sites

An example of a 9BMetrics analysis. The way from the place where I park my car (public underground car park) to my home.

Capture.JPG

1 - Starting to ride in the underground car park

2 - Slowing down to cross a car bump

3 - Arriving at the door of the lift hall

4 - Pushing the 9B1 into the lift

5 - Climbing a few meters by lift

6 - Pushing the bot out of the car park

7 - Riding straight forward

8-9-10 - Slowing down to cross 3 car alleys

11 - Arriving at a cross road and getting off the 9B1

12 - Pushing the 9B1 across the crossroad (waiting before crossing the second street)

13 - getting on the 9B1 and accelerating then stopping after climbing a curb at low speed

Link to comment
Share on other sites

On 16.4.2016 at 7:37 PM, Gil said:

Perhaps could we pin a post at the beginning of this thread with everything needed to use 9BMetrics ?

Short description + link to gnuplot 5.02 for windows + 9B V3.03.dem + link to user guide ?

You have the first posting in this thread - so you should be able to edit it and summarize all the necessary information there.

I have some new points for 9b.dem:

- two new "variables" to make customizing easier: 

One can have the standard values for all data in the gnuplot script and just need to change a 1 and 0 to show it in the graph or not. Was a bit cumbersome to change to many values for different graphs...

Since scaling does not allways work perfectly i also included the possibility to set a fixed scale for each datafile

# df_scales[1,2]  ... 0 for standard 9b scales, every other value for fixed scaling by this value
# df_show[1,2]    ... 1 show this datafile in the plot, 0 ignore this datafile

- show_statistics switch:

If turned on the driven distance, time for this distance and the average speed (unfortionately including breaks...) is shown below the title. 

ToDo:

- Improve/repair scaling - sometimes it just doesn't work nicely.

- Write the scaling factors with "/" or "*" and an integer number, as the factor is always a multiple of 10 and max one time 2 and/or 5

- add a string array for datafile names and their units, so nicer labels can be shown and everyone can have their own native language. e.g. "Altitute (5m)", "Pitch (°/20)"

- enable cropping and fixed scales, or just min/max values for scaling/showing. Would be nice for e.g. Pitch to see +/15-20 degrees on the graph (normal driving and even the worst tilt-backs covered), unmounting/fallovers of the 9Bot are cropped - these spikes are seldom anyhow, but hide the details of the normal drive...

- add some more statistics/data like max current, speed, ride-mode, etc..

- add some more comments in the script, so also lateron some maintenance gets easier

- maybe enable different configurations which can be choosen by command line arguments, to choose between a couple of different datasets to be shown? No idea if this could make sense...

 

9b-V3.04.dem

Link to comment
Share on other sites

Just some things in development for next version :

- iCloud, no more need to export if you have a Mac and easy analysis in an iPad

- Maps,

- Small icons whith the map of the run in the library

- Better historic dashboard with some calculations about energy, batteries...

- Graphics with more than one variable : https://www.flickr.com/photos/56267272@N06/shares/b7wzdM

- Better integration with Pythonista : https://www.flickr.com/photos/56267272@N06/shares/kwu3DR

TYhinking about maps in realtime... Must think about battery use

Link to comment
Share on other sites

 

On 18.4.2016 at 9:33 PM, Gil said:

 

I have done a first attempt. Please have a look at it. I do not know how to pin the post at the top of the thread.

You can edit your post at the top of the thread as long as there is the edit button - don't know if there is any time limit for editing with this forum software. For now my first post here (from 13th of April) is still editable.

Or you just use your (the) first post as a kind of "list of contents", where you link to the newest/"hottest" post in this thread.

Pinning the whole thread on top of the Ninebot forum is something only the Administrators/Moderators can do, and as far as i have seen that till now this possibilitly is used very carefully and seldom. But if and when this thread is interesting and helpful (not only for us) it will stay on top and maybe get pinned sometime... ;)

However - i very nice introduction/overview/"executive summary" you created!

On 18.4.2016 at 9:33 PM, Gil said:

@Paco Gorina + @Chriull : please add or correct any element you feel necessary.

I wonder how we could have a link to the last version of @Chriull 's script in the first post, even if the script is changing.

You'd have to update the link to my post with the newest version everytime a new version comes out or attach the newest script everytime newly to this first post (and delete the old version)

On 18.4.2016 at 9:33 PM, Gil said:

================================================================

9BMetrics is an IOS application developped by @Paco Gorina for the Ninebot One. It polls the unicycle to gather technical data (speed, current, voltage, pitch, roll, temperature) at a very fast rate (30 times per second) and stores them in files that you can display graphically or send to your PC for further analysis. 9BMetrics user manual is available here.

You can visualise the data by using a software named Gnuplot which is available for Linux, OSx and Windows (here). You will also need a Gnuplot script, developed by @Chriull. You can download it here.

+ Phytonista (MathPlotLib) should be mentioned +linked here?

I must confess i did not look into this until now - but it seems as this will be the future for showing plots with 9BMetrics (as Paco drives forward the integration with 9BMetrics)

 

On 18.4.2016 at 9:33 PM, Gil said:

Under Windows, you have to change the PATH environment variable after having installed Gnuplot.

This is the kind of graphs you can get:

Capture.JPG

To get such a graph, you use 9BMetrics during your trip. At the end of the trip, you send the log file to your computer. Then you make this folder the default folder then you type a command like this one

gnuplot C:\[the path where you put Chriull's script]\9BV3.04.dem

I use a gnuplot.bat which just contains "Path to gnuplot"\gnuplot "Path to gnuplot script"\9b.dem and copy it to every data directory (unpacked content of 9BMetrics zip) and start it from there with the explorer. Then no PATH variable is needed and no CMD Window...

Also you can keep (multiple) different script version (plot configurations) for each dataset by making copies of the 9b.dem and gnuplot.bat with the right content...

On 18.4.2016 at 9:33 PM, Gil said:

You will the be able to check that your riding style or trip does not bring your 9B1 to its limits (esp. peak current) or you will be able to estimate the influence of tire air pressure, riding mode, feet position, etc. on the current drawn from the battery. For instance, on the example graph provided above, you can see that the current never gets over 9 amps, which is very safe.

... or you can check that your riding style is well at the limits (and/or a bit above) so you can be sure to get the max out of your wheel ;) - however one likes...

On 18.4.2016 at 9:33 PM, Gil said:

Of course, you can use 9BMetrics directly on your IOS device without using Gnuplot on a personal computer. You will have the same information but it is displayed on separate graphs.

============================================================

 

... and this as anounced by Paco with increasing comfort and possibilities from within 9BMetrics itself and/or in combination with Pythonista - so that's my comment with Phytonista seems to be the future!

13 hours ago, Paco Gorina said:

Just some things in development for next version :

- iCloud, no more need to export if you have a Mac and easy analysis in an iPad

- Maps,

- Small icons whith the map of the run in the library

- Better historic dashboard with some calculations about energy, batteries...

- Graphics with more than one variable : https://www.flickr.com/photos/56267272@N06/shares/b7wzdM

- Better integration with Pythonista : https://www.flickr.com/photos/56267272@N06/shares/kwu3DR

TYhinking about maps in realtime... Must think about battery use

Great - looking forward to all the improvements!

Maybe a short comment to realtime maps: The could be in "semi" realtime - just cover the actual track and position once the map is started. For an position update one would have to close and open it again - So no increased battery consumption and no unnecessary distraction for wheelers lookin at the map instead of the surrounding ;) Or just leave it in the decission of the user, if he wants to drain the battery or not...

PS.: I just changed to a KS16 and looking forward to unravel the KS Bluetooth protocol and adopt 9BMetrics to KSMetrics - i hope i can contact you inbetween with some questions, etc?

Link to comment
Share on other sites

9 hours ago, Chriull said:

 

You can edit your post at the top of the thread as long as there is the edit button - don't know if there is any time limit for editing with this forum software. For now my first post here (from 13th of April) is still editable.

I don't think there's any time limit, users can always edit their own posts (and moderators can edit any posts ;)).

 

9 hours ago, Chriull said:

Pinning the whole thread on top of the Ninebot forum is something only the Administrators/Moderators can do, and as far as i have seen that till now this possibilitly is used very carefully and seldom. But if and when this thread is interesting and helpful (not only for us) it will stay on top and maybe get pinned sometime... ;)

However - i very nice introduction/overview/"executive summary" you created!

We'll see. The trouble is if there are too many "good topics" to pin, then the first page of the sub-forum becomes cluttered with topics that always stay there... but I'd say this (or maybe a separate topic without all the dev-details?) would be a good candidate, if the first post is edited to give a run-through of the app and direct download link(s) / installation instructions.

9 hours ago, Chriull said:

You'd have to update the link to my post with the newest version everytime a new version comes out or attach the newest script everytime newly to this first post (and delete the old version)

Maybe using a version control like git(hub) would be good there, then the repository could just be linked to the post and there'd be no need to update the post when a new version is pushed.

 

Link to comment
Share on other sites

Pythonista is a Python environment for iOS (iPhone and iPad). Includes interpreter with numpy (floating point vector and array library used for scientific and technical calculus), matplotlib (graphic library a la MatLab) and many other and also iOS specific libraries for accessing the os and a very good editor.

It has some limitations due to the platform *anyway for plotting is fast, and Apple that limits its interaction with other applications.

Anyway there are means to do the things and share information.

It is very good for learning Python and is always with you :):):)

Link to comment
Share on other sites

OK. So, if I try to summarise :

Option 1 : you just display simple graphs on your Apple Device (iPhone or iPad)

Option 2 : you transfer the log files to a personal computer (Linux, Windows, osX) and use gnuplot to display multi-values graphs

Option 3 : you install Pythonista and use the 2 scripts provided above in order to have multi-values graphs on your iOS device

However, the next version of 9B Metrics will integrate a multi-value graph feature with no need for Pythonista or GNUPlot.

Is it correct ?

Link to comment
Share on other sites

Yes, but it will be somewhat  limited in the number of simultaneous variables and scales. If it is very flexible I turns very difficult to use. 

The idea is to have one fixed variable *as now and superimpose current, pitch and speed full scaled.

But if you just want a part of the track *let's say from second 172 to 180 then is better to export and manipulate in a full computer or with an external program.

The idea with Pythonista is to have a simple program that reads a recording directory and allows you to select variables to show and the from to times. Probably adding some time of filters .

For example, if we get pitch and remove the fast varying component we get just the tiltback one, etc...

But first I must convert the Python programs to numpy, not difficult but need time.

Link to comment
Share on other sites

On 19.4.2016 at 7:17 PM, Paco Gorina said:

Just some things in development for next version :

...

- Better historic dashboard with some calculations about energy, batteries...

...

Just a short thought about your energy calculation: "positive" Energy is used up 100%. "negative" Energy only regenerates the battery with low efficiency (?10-20%?). So maybe one should split the value in "used Energy" and "recovered Energy" (and the possibility to enter an efficiency factor and get a total?)?

Link to comment
Share on other sites

Energy is computed as I x V. If I is positive current is flowing from the battery to the motor, if it is negative it is flowing from the motor to the battery.

I don-t know where it is measured so recovered energy may go to heat somewhere etc.

Also energy we measure to the motor may be lost somewhere in the middle.

Another point is What measures V.

Anyway it is possible to separate positive and negative *in fact it is done to get ascent and descent, and present the two separated.

As I was studying how to present information better I did something similar but more simple with battery. Just look at minimum battery, initial and final and look about how much low the level went. In some sense measures the same. The idea for presenting it was as the one ion the image. Green line is start value, red line end value, green arc all values that battery has had and the number the total battery used. The green arc to the left of the red line is battery recovered *net.

image.jpeg

Link to comment
Share on other sites

  • 3 weeks later...

Hello, this is my proposal for a post that we could pin at the top of this thread. @esaj, could you do it if @Paco Gorina and @Chriull do agree ?

=================================================================

9BMetrics is an impressive IOS application developped by @Paco Gorina for the Ninebot One. It polls the unicycle to gather technical data (speed, current, voltage, pitch, roll, temperature) at a very fast rate (30 times per second) and stores them in files that you can display graphically on your IOS device or send to your PC for further analysis. 9BMetrics user manual is available here.

On a PC, you can visualise the data by using a software named Gnuplot which is available for Linux, OSx and Windows (here). You will also need a Gnuplot script, developed by @Chriull. You can download it here.

Under Windows, you have to change the PATH environment variable after having installed GNUplot unless you prefer to edit a .cmd command file that calls GNUplot with accurate path.

This is the kind of graphs you can get with the 9B Metrics app:

IMG_0975.PNG

IMG_0976.PNG

and the kind of graphs you can get with the gnuplot app:

Capture.JPG

To get such a graph, you use 9BMetrics during your trip. At the end of the trip, you send the log file (a set of files in a single zip file) to your computer and decompress it in one folder. Then you open a DOS command terminal, choose to this folder the default folder (cd [the path where you uncompressed the zip file]) and type a command like this one

gnuplot C:\[the path where you put Chriull's script]\9BV3.04.dem

Thanks to this terrific application, you will the be able to check that your riding style or trip does not bring your 9B1 to its limits (esp. peak current) or you will also be able to estimate the influence of tire air pressure, riding mode, feet position, inclination, etc. on the current drawn from the battery. For instance, on the example graph provided above, you can see that the current never gets over 9 amps, which is very safe. All these urban legends on tire pressure, weight and so on are about to be replaced by FACTS!

And... stuntmen will be able to get sure that they draw the maximum from their equipment !!!

Of course, you can use 9BMetrics directly on your IOS device without using Gnuplot on a personal computer. You will have the same information but it will be displayed on separate graphs. The next version of 9BMetrics will deal directly with multivariable graphs directly in the application. @Paco Gorina also proposes Pythonista (a Python programming language interpreter for IOS) scripts.

Link to comment
Share on other sites

I made some basic comparisons to assess the influence of pressure and riding mode on max current drawn from the battery. I ran along the same path with 6 combinations of pressure and riding mode (3.4 bar and 4.2 bar mixed with riding modes 3, 4 and 5).

3.4 bar - Riding mode 3:Senso_3_Pressure_4.2.png

4.2 bar - Riding mode 3:

Senso_3_Pressure_3.4.png

3.4 bar - riding mode 5:

Senso_5_Pressure_3.4.png

4.2 bar - riding mode 5:

Senso_5_Pressure_4.2.png

 

We see that the tire pressure has a slight influence on current peaks. The riding mode (between 3 and 5) does not change anything. Of course, it is very approximative but shows that differences are below the variations of experimental conditions (speed, etc.).

 

 

Senso_4_Pressure_3.4.png

Senso_4_Pressure_4.2.png

Link to comment
Share on other sites

May be the modes 3 and 5 are quite near to each other to show current differences. I wonder if modes 0 and 9 (or 0 and 7 in the case mode 9 is not very ridable) would show any differences. I bet yes.

Link to comment
Share on other sites

  • esaj pinned this topic
  • Chriull unpinned this topic

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...