Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Octave decoder and decoding explanation #3

Merged
merged 5 commits into from Jun 16, 2016

Conversation

rmeister
Copy link
Collaborator

@rmeister rmeister commented Jun 8, 2016

Finally the decoder written in Octave works. I added a longer description about the demodulation and decoding process.

…nd decoder explanation; adds two recordings @1225 baud
@rmeister
Copy link
Collaborator Author

rmeister commented Jun 8, 2016

Also there's a synchronization error calculation in a Google sheet. I'm not sure what's the best way to include it. Any thoughts on this?

@jywarren
Copy link
Member

jywarren commented Jun 8, 2016

Hmm, is the synchronization error calculation based on empirically collected values, or where's it sourced from? You could include it as a JSON file, perhaps... but not sure!

Ready for merge?

@rmeister
Copy link
Collaborator Author

rmeister commented Jun 8, 2016

The calculation is completely based on the SoftModem implementation. So in the sheet the values in capitals are calculated in the same manner as in the code. Are the calculations visible when clicking on the individual cells? Don't know if you can see this, as I only allowed viewing the file and not modification.

I could make a markdown table out of the results, but then the formulas get lost 😖

Not yet ready, I'll add another image and move the images into a subfolder.

@jywarren
Copy link
Member

jywarren commented Jun 8, 2016

Ah, yes, the calcs are:

=ROUNDDOWN(B22;0)/(16000000/B8)

What's your intent with the spreadsheet, just as a utility for devs working
on the encoder/decoder? How is its use distinguished from the use of the
code version, if they're the same? Thanks, just trying to sync with what
you're thinking.

On Wed, Jun 8, 2016 at 4:37 PM, Richard Meister notifications@github.com
wrote:

The calculation is completely based on the SoftModem implementation. So in
the sheet the values in capitals are calculated in the same manner as in
the code. Are the calculations visible when clicking on the individual
cells? Don't know if you can see this, as I only allowed viewing the file
and not modification.

I could make a markdown table out of the results, but then the formulas
get lost 😖

Not yet ready, I'll add another image and move the images into a subfolder.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AABfJ9xmTZqDZkGVQPMNCG9baIc8k9wdks5qJyf3gaJpZM4IxNeq
.

@rmeister
Copy link
Collaborator Author

rmeister commented Jun 8, 2016

I started making this sheet because there were different offsets for different parameters. This made me curious, as there was no hint in the code. Just four sets of parameters to chose.
I wanted to show which parameter works best. I think this is important for everyone who wants to use SoftModem.

@rmeister
Copy link
Collaborator Author

rmeister commented Jun 8, 2016

Now ready 😄

@jywarren
Copy link
Member

jywarren commented Jun 8, 2016

Before merging this, I want to request that you add the images (at least) to an .npmignore file, so they don't have to be pulled in if this package is included via npm or browserify.

Also - perhaps soon, what do you think about some tests? Perhaps in Jasmine, or another test framework of your choice?

@rmeister
Copy link
Collaborator Author

rmeister commented Jun 8, 2016

Ah, that makes sense. Ignored the complete folder.

Yeah, I imagine a test that automatically reads a recorded signal and feeds the decoder. Does this match your conception of tests?
As I've never written tests in JavaScript before, I would rely on your judgment regarding the framework.

@jywarren
Copy link
Member

jywarren commented Jun 9, 2016

Are you familiar with unit vs. integration testing? My thought was that if
your code is well modularized, we can unit test each piece. For example, we
could feed an audio file through and see, for unit testing.

One issue is that we won't generate precisely the same audio when we
re-encode it. Then for integration testing, we'd test the whole library via
the constructor.

I use Jasmine in many other codebases, so you could look at, for example,
this folder: https://github.com/bevacqua/banksy/tree/master/spec/

it uses jasmine (see its package.json) and has some simple tests in it.
Want to give it a try?

On Wed, Jun 8, 2016 at 5:58 PM, Richard Meister notifications@github.com
wrote:

Ah, that makes sense.

Yeah, I imagine a test that automatically reads a recorded signal and
feeds the decoder. Does this match your conception of tests?
As I've never written tests in JavaScript before, I would rely on your
judgment regarding the framework.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AABfJ_M35cl9QcGaUlizSk-3taW2r7ckks5qJzsTgaJpZM4IxNeq
.

@rmeister
Copy link
Collaborator Author

rmeister commented Jun 9, 2016

Well I've heard these terms and also have written some unit tests before, but I would not say I'm an expert in testing. Though I'll try my best :)

Is this really a problem? If we encode some data and the decoder correctly detects it, why re-encode?

Thanks for sharing the example, I'll have a look at Jasmine.

@jywarren
Copy link
Member

jywarren commented Jun 9, 2016

No, not really a problem, just starting to think through how the tests are
written.

Cool!
On Jun 9, 2016 9:53 AM, "Richard Meister" notifications@github.com wrote:

Well I'v heard these terms and also have written some unit tests before,
but I would not say I'm an expert in testing. Though I'll try my best :)

Is this really a problem? If we encode some data and the decoder corectly
detects it, why re-encode?

Thanks for sharing the example, I'll have a look at Jasmine.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AABfJ5GUhdORVp1eL1vSLVYX6FPTAH1Uks5qKBrlgaJpZM4IxNeq
.

@rmeister
Copy link
Collaborator Author

Anything missing here?

@jywarren jywarren merged commit fcbedce into publiclab:master Jun 16, 2016
@jywarren
Copy link
Member

All good, thanks! Sorry, had forgotten to check again and actually merge.

@rmeister
Copy link
Collaborator Author

Perfect, Thanks :)

jywarren added a commit that referenced this pull request Jun 17, 2016
* Enhanced Octave decoder and decoding explanation (#3)

* decoder works in Octave (at least with 1225 baud); adds demodulator and decoder explanation; adds two recordings @1225 baud

* add one more explaining figure; moves figures to subdir

* minor change to one figure

* adds .npmignore to ignore matlab folder

* adds matlab folder to Bower ignores

* adds a working encoder, tested 'physically' with an Arduino' (#4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants