[00:00] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) joined #highaltitude.
[00:03] hallam (i=hallam@PIKA-ONE-TWENTY-ONE.MIT.EDU) joined #highaltitude.
[00:16] <fnoble> hi henry
[00:16] <fnoble> hows things?
[00:16] <Laurenceb> hi Henry
[00:35] Tigga (n=chatzill@pc-232-235-60.magd.cam.ac.uk) left irc: Read error: 110 (Connection timed out)
[00:44] <hallam> hey
[00:44] <hallam> alright thanks
[00:45] <hallam> this n-prize thing is annoying, it keeps bothering me when I should be doing homework
[00:45] <Laurenceb> lol, I was just discussing a balloon mounted light gas gun
[00:45] <Laurenceb> with some solid propellant on the projectile to circularize the orbit
[00:46] <natrium42> c'est impossible
[00:47] <Laurenceb> vrai
[00:49] <akawaka> yay!
[00:49] <akawaka> SD400 support in chdk
[00:51] <edmoore> it's *almost* impossible
[00:51] <natrium42> tu es mal a la tete
[00:51] <natrium42> :P
[01:04] <Laurenceb> http://www.youtube.com/watch?v=WoTRoRbQxVc
[01:08] <edmoore> I dismissed it as completely ridiculously impossible
[01:08] <edmoore> now I'd say only fairly impossible
[01:08] <natrium42> what made you change your mind?
[01:08] <edmoore> some sums
[01:09] <edmoore> that made it not too many orders of magnitude off being possible as i would have guessed
[01:10] <edmoore> but yes, it's still basically impossible
[01:10] <Laurenceb> you need a very comact way to accelerate projectiles up to 8Kms^-1
[01:10] <Laurenceb> which basically doesnt exist
[01:11] <Laurenceb> unless you go for a rocket
[01:11] <natrium42> it would be easier to launch it from the moon :S
[01:11] <akawaka> natch!
[01:15] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) left irc:
[02:03] <natrium42> akawaka, when's next launch? :)
[02:03] hmh33 (i=hallam@PIKA-ONE-TWENTY-ONE.MIT.EDU) joined #highaltitude.
[02:03] <akawaka> we just settled on the last weekend of may
[02:04] <natrium42> aah
[02:04] <natrium42> so the same as shuttle launch
[02:04] <natrium42> and phoenix landing
[02:04] <natrium42> :D
[02:04] hallam (i=hallam@PIKA-ONE-TWENTY-ONE.MIT.EDU) left irc: Read error: 104 (Connection reset by peer)
[02:09] fnoble (n=fnoble@fn217.quns.cam.ac.uk) left #highaltitude.
[02:09] Laurenceb (n=laurence@dhcp37-133.sthughs.ox.ac.uk) left irc: "Leaving"
[02:12] hmh33 (i=hallam@PIKA-ONE-TWENTY-ONE.MIT.EDU) left irc:
[02:16] Laurenceb (n=laurence@dhcp37-133.sthughs.ox.ac.uk) joined #highaltitude.
[02:16] <Laurenceb> natrium42: maybe you could advise me with this
[02:16] <Laurenceb> if I have an interrupt service routine, how do I "communicate" with it
[02:17] <Laurenceb> volatile global variables and flags?
[02:19] <Laurenceb> I need a way to read back data in main from an overflow interrupt... I can see flags solving this one
[02:20] <natrium42> yeah, i would use globals to do that
[02:21] <Laurenceb> but if I'm reading the globals from main, and there is an interrupt during the reading process
[02:22] <Laurenceb> the data could be messed up
[02:22] <Laurenceb> disable interrupts, copy global to a variable in main, reenable interrupts?
[02:24] <natrium42> yes, that's the easiest
[02:24] <Laurenceb> a bit ram hungery
[02:24] <Laurenceb> might not bother, as its only for printing the data to the radio link
[02:25] <Laurenceb> the interrupt driven gps code suffers a similar problem, but as the data is at 1Hz, it will probably be ok
[02:26] <natrium42> haha
[02:26] <natrium42> sounds dodgy :P
[02:26] <Laurenceb> hmm interrupts can cause problems
[02:26] <natrium42> you could use locks
[02:27] <Laurenceb> well the main code waits for packetflag
[02:27] <Laurenceb> which is set at the end of $GPRMC, so there are serval hundered milliseconds before a new packet comes through
[02:27] <Laurenceb> more than enough for the nav code to work
[02:29] <Laurenceb> but yes it is a bit dodgy, as the nav code has to print out data to the radio, so I'll change it
[02:32] <Laurenceb> so pseudo code is while(!Packetflag){;}cli();main_gps_struct=global_gps_struct;sei();Packetflag=FALSE;
[02:34] <Laurenceb> the cli an sei could be left out as theres not going to be any uart interrupts in the time that takes to run
[02:35] <Laurenceb> s/uart interrupts/nmea data (the control loop interrupt might fire off and cause a huge delay of 10ms or so)
[02:38] <Laurenceb> whats a lock?
[02:40] <natrium42> http://en.wikipedia.org/wiki/Lock_%28computer_science%29
[02:41] <natrium42> you should take a look at http://en.wikipedia.org/wiki/Mutual_exclusion
[02:42] <Laurenceb> hmm interesting
[02:43] <akawaka> or a small fifo
[02:43] <Laurenceb> the data transfer from main to timer1overflow is easily handled with flags
[02:44] <Laurenceb> but transfer back from interrupts to main is a bit tricky
[02:44] <natrium42> the problem is that you can't busy wait in an interrupt
[02:44] <Laurenceb> yes
[02:44] <akawaka> why is it tricky?
[02:44] <Laurenceb> main cant interrupt an interrupt
[02:45] <Laurenceb> but an interrupt can interrupt main
[02:45] <natrium42> so if main is using the resource and the interrupt occurs. the interrupt should set some kind of flag so that the action on that resource occurs after main releases the resource
[02:45] <Laurenceb> so say I printf a float in main, if halfway through the printfing, an interrupt chages the data, it will all be screwed up
[02:46] <akawaka> yeah, sounds like a fifo is what you want
[02:46] <Laurenceb> hmm, then the canges made by the interrupt have to be saved...
[02:46] <Laurenceb> yes
[02:46] <akawaka> if you don't want to disable interupts
[02:47] <akawaka> single writer and reader fifos are pretty simplistic and should be fine for what you want with no locking
[02:47] <Laurenceb> a fifo buffer of kalman filters will eat my ram
[02:47] <akawaka> how much data are you trying to pass back?
[02:48] <Laurenceb> a couple of floats
[02:48] <Laurenceb> actually I could set it up more nicely
[02:48] <akawaka> you really only need a double buffer
[02:48] <Laurenceb> so just the data thats needed is passed back
[02:48] <akawaka> is this a timer interupt?
[02:48] <Laurenceb> yes
[02:49] <akawaka> okay, why not just check if it is close to occuring before you read the data
[02:49] <akawaka> if it is then wait
[02:49] <Laurenceb> hmm good point
[02:52] <Laurenceb> double buffer=two copies of data?
[02:52] <Laurenceb> ie lenght 2 buffer
[02:54] <akawaka> yeah, but really i think the timer check is the best
[02:54] <akawaka> as long as you don't mind missing some data
[02:54] <Laurenceb> I'll take a look at it
[02:54] <Laurenceb> thanx for the ideas
[02:54] <akawaka> that'll be $30
[02:55] <Laurenceb> bed time
[02:55] <Laurenceb> lol
[02:55] <Laurenceb> cya
[02:55] Action: Laurenceb zzzz
[02:55] Laurenceb (n=laurence@dhcp37-133.sthughs.ox.ac.uk) left irc: "Leaving"
[03:05] <akawaka> natrium42: planning any launches?
[03:05] <natrium42> not near-term
[03:05] <natrium42> i will probably do a launch to test my sat phone
[03:12] <akawaka> my big fear is our first launch was just a fliuke and absolutely everything will go wrong
[03:12] <akawaka> we have commited to having the payload assembled a weekend before we launch though
[03:16] <akawaka> http://spritesmods.com/?art=ledfanclock
[03:16] <akawaka> hah
[03:16] <akawaka> awesome
[03:17] Adrian2187 (i=Zack@adsl-99-142-82-5.dsl.emhril.sbcglobal.net) joined #highaltitude.
[03:18] <Adrian2187> I'm in the early design phases and need to figure out a way to get telemetry back to the ground
[03:20] <akawaka> hey Adrian2187
[03:20] <akawaka> in the us?
[03:20] <Adrian2187> yes
[03:20] <Adrian2187> illinois to b exact
[03:21] <akawaka> well, you could get your amateur radio license
[03:21] <akawaka> that opens up a lot of possibilities
[03:21] <Adrian2187> i have been considering that
[03:21] <akawaka> its pretty simple, i got mine 2 months ago for the exact same reason
[03:21] <Adrian2187> i saw a design that used cellular phone
[03:22] <akawaka> then used this: http://byonics.com/microtrak/mt8000fa.php
[03:22] <Adrian2187> sent sms, but i don't think it will work at 12 km
[03:22] <akawaka> cellular is okay, but its not gonna work up at higher altitudes
[03:22] <natrium42> Adrian2187, cell phone is nice, but you won't have any signal above 1km or so
[03:22] <akawaka> natrium42: you used a 900mhz radio modem, right?
[03:23] <natrium42> yah, the maxstream Xtend one
[03:23] <akawaka> Adrian2187: the aprs has very good coverage in the states
[03:23] <Adrian2187> i know, family friend has a cessna my blackberry stopped at 1/2 mile
[03:23] <natrium42> akawaka, i still need to properly test it with a yagi though
[03:24] <natrium42> with high gain omni, range was not enough
[03:24] <Adrian2187> what did your entire project cost you guys? I want to blow my tax rebate on something fun
[03:24] <natrium42> mine was pretty overengineered so $$$
[03:25] <akawaka> mine was underengineered, but still cost $$$
[03:25] Action: natrium42 didn't try to go cheap
[03:25] <akawaka> the equipment we actually used on the day, lets see
[03:25] <natrium42> you can get by with $500
[03:25] <Adrian2187> that's not my plan to go cheap, i expect this to cost over a grand
[03:25] <natrium42> oh, then you're good
[03:26] <akawaka> Adrian2187: thats good
[03:26] <akawaka> i spent over a grand
[03:26] <Adrian2187> how high did you get yours?
[03:26] <akawaka> but what was used on the actual day was probably about $800
[03:26] <akawaka> 98kft
[03:26] <Adrian2187> wow!
[03:26] <akawaka> http://www.boredgamedeveloper.com/high_altitude/index.php/1_-_Pong
[03:27] <akawaka> camera failed though
[03:27] <akawaka> natrium42 has the best flight i've seen
[03:27] <Adrian2187> what caused it to do that?
[03:27] <akawaka> Adrian2187: batteries died we think
[03:27] <akawaka> maybe the cold
[03:27] <akawaka> natrium42: can you send us a photo of you so we can stick it on our dartboard? :)
[03:28] <natrium42> lol
[03:28] <Adrian2187> what type did you use, I was planning on using some lithium batteries
[03:29] <akawaka> its funny
[03:30] <akawaka> when we started thinking about doing a launch, we kind of laugh about how unprepared a lot of people online seemed to be and we were going to be different
[03:30] <akawaka> of course, we weren't
[03:30] <akawaka> the payload was put together at 2am the morning of the launch
[03:30] <natrium42> haha, same
[03:31] <akawaka> when we got to the launch site we realised we hadn't removed the lcd from the camera, so we removed it and when we did the flash started triggering everytime it took a picture
[03:31] <akawaka> and the fresh batteries we brought were in fact dead
[03:31] <akawaka> so we launched with the flash going off on every picture and half dead batteries in the camera
[03:32] <akawaka> so it took about 80 pictures on the ground while we setup and 40 in the air before it died
[03:33] Action: natrium42 used a single battery for all of the electronics and two 9V blocks for cutdown current
[03:33] <akawaka> we got the balloon back, and thats really the most important part
[03:34] <natrium42> yeah, i really lucked out with my first launch
[03:34] <Adrian2187> the electronics seem easy to peice together but programing the thing will be difficult, i barely remember anything
[03:34] <natrium42> it landed on a street in my home town (100 km away from launch point) and i got a call from a guy who saw it land
[03:35] <natrium42> since gps broke, it only reported the last working position in the air -- wouldn't have found it without help
[03:56] <rcaron> yeah, our first launch was a fluke. couldn't hear a damn thing on the gps. it had a audio beacon though, so three days later some guys calls us up after he chopped down a tree to make the beeping stop
[03:56] <rcaron> our second flight was much better
[04:53] akawaka (n=akawaka@external.treyarch.com) left irc: Read error: 110 (Connection timed out)
[05:29] akawaka (n=akawaka@cpe-76-173-152-142.socal.res.rr.com) joined #highaltitude.
[05:34] <Kornholijo> yo
[05:34] <Kornholijo> :)
[05:35] Action: Kornholijo gives cookies to natrium42 & akawaka
[05:35] <Kornholijo>
[05:40] <natrium42> hi
[05:51] Adrian2187 (i=Zack@adsl-99-142-82-5.dsl.emhril.sbcglobal.net) left irc: "Leaving"
[05:58] <akawaka> chdk is awesome
[06:44] akawaka (n=akawaka@cpe-76-173-152-142.socal.res.rr.com) left irc: Read error: 110 (Connection timed out)
[07:54] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) joined #highaltitude.
[08:15] Tigga (n=chatzill@pc-232-235-60.magd.cam.ac.uk) joined #highaltitude.
[10:34] flowolf (n=flowolf@unaffiliated/flowolf) joined #highaltitude.
[11:26] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) left irc:
[13:00] flowolf (n=flowolf@unaffiliated/flowolf) left irc: "Leaving"
[15:28] Simon-MPFH (n=simon@phantom.mpfh.co.uk) joined #highaltitude.
[16:16] MetaMorfoziS (n=avr@3e44bf13.adsl.enternet.hu) joined #highaltitude.
[16:20] borism (n=boris@195-50-206-248-dsl.krw.estpak.ee) left irc: Read error: 145 (Connection timed out)
[16:37] akawaka (n=akawaka@cpe-76-173-152-142.socal.res.rr.com) joined #highaltitude.
[16:59] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) joined #highaltitude.
[17:00] <edmoore> just went to lecture by Stallman
[17:04] <akawaka> always a treat
[17:05] <edmoore> hrmm... :)
[17:05] <edmoore> usual diatribe
[17:06] <akawaka> by "treat" i was refering to food debris in his beard
[17:06] <edmoore> :)
[17:10] <edmoore> I dunno. You could definitely tell his ideas about copywrite law (that involved seperating things into either 'functional' or 'art') are the product of a slightly autistic computer geek, rather than a philosopher
[17:12] <akawaka> i believe he is far too uncomprimising and plain wrong on a lot of things
[17:12] <edmoore> And that when he was challenged about this (in almost every question) he just got louder and more annoyed
[17:13] <akawaka> but i think he has done far too much to open up the software world to be ignored
[17:13] <edmoore> not many other peope would fill the lecture theatre I was in on a wet wednesday afternoon
[17:14] <edmoore> even if the guy infront of me was playing a command line based internet role-playing game
[17:14] <akawaka> open source i imagine:)
[17:14] <edmoore> it's wierd for me as an engineer to see these people, the geeky end of CompSci. I know they exist, but I rarely see them. I guess it takes a stallman lecture to bring them out
[17:15] <edmoore> They're all over the place at MIT, but I guess MIT doesn't have arts students pulling back on the tug-rope of student culture
[17:17] <edmoore> that sounded more pretencious than was intended ;)
[17:20] <akawaka> i think they are in all the science and engineering worlds
[17:20] <akawaka> but compsci certainly seems to attract the bulk of the uber geeks
[17:20] <edmoore> "debian/rules" was another t-shirt infront of me
[17:20] <akawaka> but it was a very starnge mix when i was in school in the late 90s
[17:21] <akawaka> lots of people in compsci that weren't geeks, just people thinking they wanted to do .com stuff
[17:21] <akawaka> i was probably one of the biggest geeks in the class and i didn't even have long hair!!!1
[17:22] <edmoore> long hair but with bald patch is the biggest compsci offender
[17:25] <edmoore> still, was cool to see stallman
[17:26] <edmoore> 'hello hackrrrrrs' in that familiar way of his
[17:26] <edmoore> to which 50% of the people seemed thrilled and the other 50% had a look on their faces which said 'excuse me, we drink tea and do serious computer science'
[17:28] <edmoore> I nearly asked 'vi or emacs' but realised that a) it wouldn't be funny and b) I'd probably be the 798th person to ask that not funny question to him
[17:29] borism (n=boris@195-50-206-248-dsl.krw.estpak.ee) joined #highaltitude.
[17:35] <akawaka> i think you made the right choice
[17:58] Hiena (n=Hiena@ joined #highaltitude.
[18:06] akawaka (n=akawaka@cpe-76-173-152-142.socal.res.rr.com) left irc: Read error: 110 (Connection timed out)
[18:19] <rcaron> heh, i've heard stallman talk twice
[18:19] <rcaron> that guy is crazy
[18:20] <rcaron> i mean, i'm glad he's around and he does what he does, but he's certainly a little eccentric
[18:22] <Tigga> there's nothing wrong with long hair...
[18:22] <Tigga> though once I start going bald, it's going
[18:22] akawaka (n=akawaka@external.treyarch.com) joined #highaltitude.
[18:42] <Hiena> Good evening!
[19:18] MetaMorfoziS (n=avr@3e44bf13.adsl.enternet.hu) left irc: Read error: 104 (Connection reset by peer)
[19:18] MetaMorfoziS (n=avr@3e44bf13.adsl.enternet.hu) joined #highaltitude.
[19:42] MeTa (n=avr@53d82989.adsl.enternet.hu) joined #highaltitude.
[19:43] MetaMorfoziS (n=avr@3e44bf13.adsl.enternet.hu) left irc: Nick collision from services.
[19:43] Nick change: MeTa -> MetaMorfoziS
[20:01] phatmonkey (n=ben@ joined #highaltitude.
[20:17] Hiena (n=Hiena@ left irc: "-=Alkoholmentes-sör és repülõgép-szimulátor, biztos út a guminõ felé=-"
[20:25] Laurenceb (n=Laurence@dhcp38-010.sthughs.ox.ac.uk) joined #highaltitude.
[20:25] <Laurenceb> hi all
[20:31] Laurence2 (n=Laurence@dhcp38-010.sthughs.ox.ac.uk) joined #highaltitude.
[20:34] <akawaka> hey laurence
[20:38] <Laurence2> hello
[20:38] <Laurence2> network keeps disconnecting :P
[20:40] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) left irc:
[20:45] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) joined #highaltitude.
[20:47] Laurenceb (n=Laurence@dhcp38-010.sthughs.ox.ac.uk) left irc: Read error: 110 (Connection timed out)
[20:53] <Laurence2> akawaka: I was thinking about that access problem
[20:54] <Laurence2> why not have a variable in main, a static variable in the interrupt, and a volatile global and flag
[20:54] <Laurence2> the flag just means = "new data in global"
[20:55] <Laurence2> so main looks at the flag and copies the data if its set, and the interrupt cant set the global from its static variable unless flag=0
[20:57] <Laurence2> bbl
[21:21] MetaMorfoziS (n=avr@53d82989.adsl.enternet.hu) left irc: Remote closed the connection
[21:31] Simon-MPFH (n=simon@phantom.mpfh.co.uk) left irc: "Leaving"
[21:32] RocketBoy (n=grunge@ joined #highaltitude.
[21:33] <Laurence2> hi RocketBoy
[21:41] <RocketBoy> hiya
[21:41] <RocketBoy> did u see my mails
[21:42] Action: Laurence2 checks
[21:42] <Laurence2> cool XD
[21:42] <Laurence2> thanks
[21:43] <RocketBoy> and I got your pcbs
[21:43] <Laurence2> brilliant
[21:44] <Laurence2> do you think you can solder on the AD7923 ok?
[21:45] <RocketBoy> no idea yet
[21:46] <Laurence2> I just used desolder wick
[21:49] <RocketBoy> I have never tried it that way - just a fine soldering iron and thin solder (plus a clamp to hold the cip and pcb in place)
[21:49] <RocketBoy> cip = chip
[21:51] <Laurence2> I used blue tack
[21:53] <RocketBoy> I made a clip up with a long reach arm - it can do PCBs upto about 4" square - just put the chip in place and lower the clip to clamp it
[21:54] <Laurence2> nice
[21:54] <Laurence2> blue tack seems to burn at high temperature
[21:55] <Laurence2> you need acetone to remove it
[21:55] <Laurence2> RocketBoy: can I ask you a c question?
[21:57] <Laurence2> I have an interrupt that changes some data, and want to look at it in the main code, obviously you can use volatile globals for the "transfer"
[21:57] <Laurence2> but you need to be sure the data that the code in main sees is valid, whats the best way?
[22:00] <RocketBoy> you need a "semaphore" - that is a flag set / read that is atomic (indivisable)
[22:01] <RocketBoy> normally this would be setting a flag byte
[22:01] <Laurence2> right
[22:01] <Laurence2> so my flag basically says "data in the global" ?
[22:01] <RocketBoy> the ISR does somthing (like fill in a structure) - then it sets the byte
[22:01] <Laurence2> so the main code copies the global if the flag is set
[22:02] <RocketBoy> the main code polls for the byte set
[22:02] <Laurence2> and the ISR cant reset the data unless the flag is clear?
[22:02] <RocketBoy> when it sees it then it reads the structure and re-sets the flag
[22:02] <Laurence2> yes, i get it
[22:02] <RocketBoy> the ISR must not write to the structure if the byte is set
[22:03] <Laurence2> sure
[22:03] <RocketBoy> its all standard software engineering stuff (semaphores)
[22:04] <Laurence2> http://pastebin.com/m6ea3cf <-- thats my header
[22:04] <RocketBoy> http://en.wikipedia.org/wiki/Semaphore_(programming)
[22:04] <Laurence2> http://pastebin.com/m6626f138 <- and the main code
[22:05] phatmonkey (n=ben@ left irc:
[22:05] <Laurence2> line 177 my ISR checks the flag to see if it has new data from the main code
[22:06] <Laurence2> line 472 the main code copies the data from the gps ISR
[22:09] <Laurence2> instead of using a semaphore to get data back from the timer1 ISR, 330 waits until there timer1 reaches a value where interrupts arent going to occure
[22:09] <Laurence2> *occur
[22:30] <Laurence2> bl
[22:33] <akawaka> the ISR could clear the flag too
[22:34] <akawaka> as long as you specify a certain time limit/cycle count for which the data is valid after the flag has been read
[23:07] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) left irc:
[23:11] <Laurence2> akawaka: sure, I'm actually using that technique
[23:12] <Laurence2> line 182
[23:13] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) joined #highaltitude.
[23:14] <Laurence2> maybe a digaram would help
[23:15] <Laurence2> so theres interrupts for RX and Compare1A, also for timer0 and pin change, but the last two use single byte variables
[23:16] <Laurence2> RX chnages a global volatile gps_type structure, and sets gps.flag when its finished
[23:17] <Laurence2> the main loop waits for the flag then copies the global gps_type into a local copy
[23:17] <Laurence2> during the time it takes to copy, the RX ISR could possible change the global, but the way the NMEA is timed thats not going to happen
[23:18] <Laurence2> i.e. its not a full impelmentation of a semaphore
[23:23] <Laurence2> neither is the data transfer to the Comapre 1A ISR : as it runs at 50Hz and the main loop at 1Hz, I can change a global variable from main and use a flag to tell the ISR its safe to copy to its local static variable
[23:25] edmoore (n=edmoore@pomegranate.chu.cam.ac.uk) left irc:
[23:31] <Laurence2> to copy data back from the Compare1A ISR (i.e. the kalman_state structure so it can be sent to the radio modem) the print routine just waits until we arent near to a Compare1A event
[23:31] <Laurence2> (sorry to hog the channel :P)
[23:44] <RocketBoy> night
[23:44] RocketBoy (n=grunge@ left irc: "Leaving"
[00:00] --- Thu May 1 2008