Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Simulation Tools → Thread

   

Bike Power to CSV

Rank

Total Posts: 4

Joined 2019-11-18

PM

I tried using the bpwr_DisplayCSV.py to record the power reading but the CSV file only has the titles and no data. The data in simulant+ is shown in CTF section and I guess the script is reading from the power only section. I want to know that if anyone knows what needs to be changed or has anyone got a solution to the same? I am also attaching the screenshot of simulant for anyone to see what type of data is it showing.      

Image Attachments

bike_power.jpg

Click thumbnail to see full-size image

RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

Instead of handling the power only page, you want to handle the CTF page. Modify the script to have a method CrankTorqueFrequencyPageReceived instead of StandardPowerOnlyPageReceived.

You can then parse the page structure properties to csv in a similar way using the documentation in "SimulANT+ Scripting Interface.chm" for the CrankTorqueFrequencyPage structure to determine the properties that are available.

You can also choose to write the display values from SimulANT+ to csv instead of raw page values. Use simulator.CadenceCtf, simulator.PowerCtf, etc (see Properties for BikePowerDisplay Class in chm file) instead of page.*. Note that these will be values from the prior page rather than the most recently received page.

Ian
     

Signature

Ian Haigh

Rank

Total Posts: 4

Joined 2019-11-18

PM

Hey haighi,

Thanks for the reply. I figured out the same thing and was able to record the data. Thanks for the help though.

I have one more question though. Do you know if there is a way to send every new data received to matlab or some other file type so that matlab can access all the new readings to control one of the motors in a bike that I am working on?

Thank you in advance.