News:


  • May 23, 2024, 01:01:25 PM

Login with username, password and session length

Author Topic: Stunt Calculator  (Read 1874 times)

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Stunt Calculator
« on: July 27, 2011, 09:55:57 AM »
This is something I've been cooking up, for calculating motor/battery combinations for planes -- or calculating planes from motor/battery combinations.

It's in a very raw state right now -- I just got it working under the hood on Monday, and got the rather ugly user interface that you see here done.  The idea of it is that you enter the numbers you know, and it either calculates the rest or tells you why it can't.  Right now it just tells you _that_ it can't, in an ugly, uninformative, and data-destroying way -- but hey, it's a newborn.

My hope is that this will be a tool both to answer the question "I've got a UglyThang 40, what motor/battery can I put in it" or "I've got an AXI 8943 motor, a Castle Phoenix 220 and a battery from a Prius -- what size plane can I fly?", with room for fiddling with cell counts, prop pitch, etc., in between.

Here's a screen shot.

AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Steve Helmick

  • AMA Member and supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 9950
Re: Stunt Calculator
« Reply #1 on: July 27, 2011, 11:18:54 AM »
Did your Prius battery come out of Howard's? Just thinkin' that's why he couldn't go to the contest this past weekend in Richmond, BC, 'cause he hasn't offered up a good excuse.  LL~ LL~ LL~ Steve
"The United States has become a place where professional athletes and entertainers are mistaken for people of importance." - Robert Heinlein

In 1944 18-20 year old's stormed beaches, and parachuted behind enemy lines to almost certain death.  In 2015 18-20 year old's need safe zones so people don't hurt their feelings.

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #2 on: July 27, 2011, 11:22:23 AM »
Perhaps he let retirement go to his head, and over-committed himself?  I've seen that happen to relatives -- "you need someone to do XYZ?  I'm retired!  I've got all the time in the world!"  Do that too many times, and you'll be busier than you were when you were working for pay.
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #3 on: July 31, 2011, 04:51:22 PM »
Ready for testing.  Part of the reason that I wrote this was because I wanted to make it workable for nontechnical people.  So if you're nontechnical but are feeling adventurous, and you absolutely positively won't get all freaked out if you don't understand what I'm trying to do, then take a look.  If you're technical, then take a look too.

All honest constructive criticism is welcome.  I'm going to concentrate on functionality before I address looks.

http://www.ccwebster.net/robintim/stunt_calc/

While it won't lead you by the nose through figuring out what motor to use (yet) it should give you a way to get all the necessary numbers.

Here's what I know I should add:

  • Battery cell counts that can be incremented, instead of allowing fractional numbers
  • Battery cell voltage that can be chosen from a drop-down (i.e., LiPo is 3.7, LiFePO4 is 3.2, NiMH is 1.2, etc.)
  • "Reasonable" ranges for things like percent of cell discharge (don't go over 100%!), cell voltage derating, etc[/i]
    • better instructions[/i]
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Douglas Ames

  • 2014 Supporters
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 1299
Re: Stunt Calculator
« Reply #4 on: August 01, 2011, 09:11:45 PM »
How do you make it work? There's no buttons that say "calculate", or is this just a screenshot for an example? Some of the inputs- I'm clueless.
AMA 656546

If you do a little bit every day it will get done, or you can do it tomorrow.

Offline John Cralley

  • Trade Count: (0)
  • Admiral
  • ******
  • Posts: 1235
Re: Stunt Calculator
« Reply #5 on: August 01, 2011, 09:36:49 PM »
Douglas,

You need to go to the link in Tim's last post. Then (correct me if I'm wrong Tim) "un-pin" the value that you wish to change. The you can change it (number of series cells for instance) and then "re-pin" it. Do this for each parameter you know or want (weight, flight time, series cells, KV of your motor etc.) and the calculations are automatic.

John
John Cralley
Scratch Built - Often Re-kitted!!!
AMA 52183
Central Illinois

Offline Douglas Ames

  • 2014 Supporters
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 1299
Re: Stunt Calculator
« Reply #6 on: August 01, 2011, 10:02:34 PM »
<snip from the link>
"If you want to do a calculation of this type, then enter in numbers in the checked boxes only, and see how things change. For instance, if you know that you have a plane that's going to build out to 50 ounces instead of 40, then enter that number in the "weight" box and see how the other numbers change."

I went to the link, nowhere does it say to uncheck the box to make it work. I don't work with spreadsheets, I work with my hands.
I fiddled with the boxes and got the inputs to change. What's that saying about the word "assume"?
AMA 656546

If you do a little bit every day it will get done, or you can do it tomorrow.

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #7 on: August 01, 2011, 10:48:30 PM »
Douglas:

That's why I had warnings on it, and why I really appreciate the feedback!  The more confused people speak up about it, the better chance I'll have to make it actually work for people who aren't hopeless computer nerds like me.

Calculation automatically happens any time you change things (or it should!!).  So you should be able to go to any number and edit it, then hit the enter key.  As soon as you hit enter that box will automatically pin down with the number you supplied.

(I really really should make it work if you do that with the tab key, but I didn't want folks to be accidentally pinning down things they hadn't edited -- so that makes the response to tab more complicated).

(come to think of it, I should make it work with the 'undo' keys, too.  Ick.  Oh well, dog doo and undo -- they're just unpleasant things we have to deal with).

If you like a number that's not pinned down but you want to pin it down and change something else instead, just click on the 'pin' box, then unpin one of the boxes that lights up red.

If you don't understand what a number means -- leave it alone!  It's leaving its guts on the table for all to see; I should have some way of hiding the more advanced stuff until someone clicks a button or something.

If you get it working, and you feel that I need to reword the directions on that page, please post a note here and I'll try to get the page changed.

I'm ass-u-me-ing that folks will notice that there's directions after the calculator on that page, of course.

John:

Have you tried it?  It would be interesting for folks with planes that work fine to put their info in "backwards" (i.e., put in your battery pack, ending state of charge & flight time, or put in your number of cells and your motor or ESC's peak current capability) and see what airplane weight it recommends.
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Howard Rush

  • 22 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 7813
Re: Stunt Calculator
« Reply #8 on: August 02, 2011, 12:52:07 AM »
I can see it doing the electrical stuff, but there's not nearly enough information to calculate the airplane stuff.  I suggest entering measured quantities for an airplane and using the program to calculate what happens for line length change, air density change, or lap time change.  Even that requires separating power going to level-flight drag from power going to take the airplane uphill, and that could be befuddled by prop efficiency changes from one flight condition to another.  It's nontrivial.     
The Jive Combat Team
Making combat and stunt great again

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #9 on: August 02, 2011, 01:57:58 AM »
Howard:

I'm not sure how you're separating "airplane stuff" from "electrical stuff".

What I did was to go through all of the planes in the "List your Setup", and find the relationships that seemed to match.  So the method was pretty ad hoc, and leaves out a tremendous amount of detail.  But, when you get right down to it, CLPA planes are all pretty similar, so the method should work for 'typical' planes.

And, since you're an expert, you can dink with the constants.

I should put a disclaimer on the page that nothing that comes shrink-wrapped like that is going to do anything but give you a good starting point -- but a good starting point is better than being lost in a swamp.

If you really don't like it I'll send you the code and you can make it better  >:D.
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Howard Rush

  • 22 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 7813
Re: Stunt Calculator
« Reply #10 on: August 02, 2011, 12:23:16 PM »
What I did was to go through all of the planes in the "List your Setup", and find the relationships that seemed to match. 

Oh.  Kinda like the Finance guys do where I worked.  That is one approach.

The problem in which I'm currently interested is, given energy used by a 58.5 oz. Impact at 5,000 ft density altitude flying 5.5-second laps, how big a battery would I need for a heavier Impact flying 5.3 sec. laps at sea level standard day density.  One could find the relationships needed to figure this out either theoretically or by experiment, but the experiment would have to measure a bunch of parameters that most folks don't measure.  Prop efficiency alone can vary 30% or so.
The Jive Combat Team
Making combat and stunt great again

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Stunt Calculator
« Reply #11 on: August 02, 2011, 12:48:24 PM »
Some of the stuff Howard is talking about is in Line-III thanks to Pete Soule. The source is in Borland C++, not sure what you are working with but if you would like I'll send you the source for Line-III.

Also, if you use <Return> to trigger the calcs the user can edit at will till he hits the return key. Most RAD controls allow use of the normal edit keys without the programmer needing to do anything. The input fields in Line-III can be navigated using the tab key but it doesn't recalculate till the return key is pressed in any field. Not sure if real time is better or not but doing all that recalc everytime a number is changed will sure slow things down.

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #12 on: August 02, 2011, 12:49:57 PM »
Oh.  Kinda like the Finance guys do where I worked.  That is one approach.
Meanie
Quote
The problem in which I'm currently interested is, given energy used by a 58.5 oz. Impact at 5,000 ft density altitude flying 5.5-second laps, how big a battery would I need for a heavier Impact flying 5.3 sec. laps at sea level standard day density.  One could find the relationships needed to figure this out either theoretically or by experiment, but the experiment would have to measure a bunch of parameters that most folks don't measure.  Prop efficiency alone can vary 30% or so.
I think you are outside of my target audience.  This calculator is really intended for folks who don't have the first clue of how to go about picking a motor/battery/ICE combo, and need some starting numbers.

So my goal is to distill some rules of thumb into something that's easy to choke answers out of, so that people can at least get into the ballpark with their electric flight combinations.  You're talking about doing some pretty advanced aerodynamics calculations (and from insufficient data, too!), which is definitely out of the scope of this thing.

(although, having an altitude correction for the two weight-to-power numbers would be a good thing).
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Douglas Ames

  • 2014 Supporters
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 1299
Re: Stunt Calculator
« Reply #13 on: August 04, 2011, 09:22:49 PM »
Also, if you use <Return> to trigger the calcs the user can edit at will till he hits the return key. Most RAD controls allow use of the normal edit keys without the programmer needing to do anything. The input fields in Line-III can be navigated using the tab key but it doesn't recalculate till the return key is pressed in any field. Not sure if real time is better or not but doing all that recalc everytime a number is changed will sure slow things down.

??? No <return> key on my keyboard. What am I missing, Bob?

Is <Tab> and <Return> the same thing?

I was taught NOTHING about computers, learned everything by word of mouth and alot of frustration.
AMA 656546

If you do a little bit every day it will get done, or you can do it tomorrow.

Offline John Witt

  • Trade Count: (0)
  • Captain
  • *****
  • Posts: 508
Re: Stunt Calculator
« Reply #14 on: August 04, 2011, 10:44:10 PM »
<return> is called "Enter" on most keyboards these days.  <return> is short for a "carriage return" which is what you did with manual typewriters when you slapped that lever to make the paper carriage go back to the left margin.  I'm not sure where "Enter" came from, probably to "Enter" a data item into memory.

John
John Witt
AMA 19892
Edmonds, WA
"Houston, Tranquillity Base here. The Eagle has landed."

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #15 on: August 04, 2011, 11:31:34 PM »
??? No <return> key on my keyboard. What am I missing, Bob?

Is <Tab> and <Return> the same thing?

I was taught NOTHING about computers, learned everything by word of mouth and alot of frustration.
I hate it when I'm presented with a computer program that I can't make heads or tails of.

Douglas -- have I done this to you, or is it starting to make sense?
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Jim Howell

  • 2016 supporter
  • Trade Count: (0)
  • Commander
  • *
  • Posts: 159
Re: Stunt Calculator
« Reply #16 on: August 05, 2011, 05:54:26 AM »
Tim,

Is the link intended for Windoze & IE?  Embedded Java scripts?  I'm running Firefox on Linux and when I traverse the link, I get a page of text with no active link.

Thanks,
Jim Howell
Huntsville, AL
Jim Howell
Huntsville, AL  AMA 545805

Offline Douglas Ames

  • 2014 Supporters
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 1299
Re: Stunt Calculator
« Reply #17 on: August 05, 2011, 08:13:20 AM »
Yes, it makes sense, Thanks.
Just trying to get on the same page... I guess I'm from a different era. Last time I used a typewriter was in the `80's.
AMA 656546

If you do a little bit every day it will get done, or you can do it tomorrow.

Offline Tim Wescott

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 12822
Re: Stunt Calculator
« Reply #18 on: August 05, 2011, 09:29:02 AM »
Tim,

Is the link intended for Windoze & IE?  Embedded Java scripts?  I'm running Firefox on Linux and when I traverse the link, I get a page of text with no active link.
Jim, I should put that on the page.  You need a Java browser plugin.  Ubuntu Linux comes with Java so it can run OpenOffice (or LibreOffice, depending on what flavor of Ubuntu you have), but by default it does not include a browser plugin.  I'm using the Icedtea plugin, which works great.

(I should also make the jar file downloadable, and I should make it possible to save sessions, and there's 100 other things I should do -- but I want to make sure that it works for people first).
AMA 64232

The problem with electric is that once you get the smoke generator and sound system installed, the plane is too heavy.

Offline Bob Reeves

  • 2016 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 3415
    • Somethin'Xtra Inc.
Re: Stunt Calculator
« Reply #19 on: August 05, 2011, 10:02:40 AM »
??? No <return> key on my keyboard. What am I missing, Bob?

Is <Tab> and <Return> the same thing?

I was taught NOTHING about computers, learned everything by word of mouth and alot of frustration.


Naw, I was just being an idiot calling the Enter key Return.. They are the same thing and yes some old keyboards have a return key instead of an enter key.


Advertise Here
Tags:
 


Advertise Here