Jack Crossfire's blog View Details
Archive for November, 2013 - Page 2
Posted by Jack Crossfire | Nov 06, 2013 @ 05:20 PM | 7,030 Views

Finally got floating point to work on the stm32F4. The PX4 source code had the 1st compiler flags anyone revealed that worked & they found the only toolchain that worked. The key flags are

-O2 -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard

The -fno-builtin flag has to be omitted, since some floating point operations use builtin functions.

The next step is getting the right math & gcc libraries, since the floating point functions depend on those. The libraries are different for each set of compiler flags, so PX4 gets the compiler to print the right libraries by running the compiler with full optimization flags & 2 hidden compiler commands:


After that, the linking used the same flags as without floating point:

-ffreestanding -nostdlib -nostdinc

with the fixed paths to libm & libgcc gotten from the hidden compiler commands. The executable is double the size.

More key points: the math library from the compiler directory has to be included. The following nugget has to be run in the bootloader before the program that links the math library is run:

static inline uint32_t getcontrol(void)
  uint32_t control;
  __asm__ __volatile__
     "\tmrs  %0, control\n"
     : "=r" (control)
     : "memory");

  return control;

static inline void setcontrol(uint32_t control)
  __asm__ __
...Continue Reading
Posted by Jack Crossfire | Nov 05, 2013 @ 11:48 PM | 3,892 Views

Finally cracked open a gearbox toy from allelectronics.com. It seems to be an east european toy.

It has exactly 2 gear ratios supplied by 2 sets of gears. 1:288 & 1:60

...Continue Reading
Posted by Jack Crossfire | Nov 05, 2013 @ 03:02 AM | 3,710 Views
After a 6 year run, decided to let vicacopter.com expire. It'll be quickly taken by a squatter who will charge $80 million for it. Thus also ends any dealings with godaddy.com. That site was annoying & painful.

Domain names get expensive, over time. vicacopter.com added up to over $70 after 6 years. godaddy.com doubled the renewal price. Heroinewarrior.com has taken $156 over 13 years, but its price remaned constant. Unless you have a business, it's not worth it. The hobby domain names are now mostly owned by the generation which turned 20 when the internet just got started.

Posted by Jack Crossfire | Nov 03, 2013 @ 06:30 PM | 3,754 Views

It came across as a desperate bid to get money flowing into a business that was languishing in an era of no technology investment. Someone in a corner office finally said they needed money, so they staged a publicity campaign.

There's no logic to it. Airplanes don't need pilots anymore. There's no need for a plane to go fast without a pilot. It's a showpiece from an age when bragging rights mattered. Every spy plane development for the last 10 years has been smaller & slower. Insects are the future. Even then, all technology investment is in Asia.

They had some concept studies going on since 2006, but never received any funding for it. They had a time table that stretched to 2030 to finish it. They never said it could fly into space, though the media assumed it could. At mach 6, it could make a parabolic coast to the 120,000 ft range but it could never get to 328,000ft where space begins.

They brushed aside the problem of thrust. The turbine engine only goes up to mach 2.5. The scramjet only goes down to mach 4. They said it involved a black box that transforms from a turbojet to a ramjet to a scramjet. It would involve opening & closing various inlets & wank words.

Getting turbine engines to their current state took decades of trial & error. There is no algorithm to produce the optimum turbine engine. Someone thinks of a change to a compressor blade, simulates it, but the simulator can't dream up the change....Continue Reading
Posted by Jack Crossfire | Nov 02, 2013 @ 07:28 PM | 4,234 Views

After much tweeking, the XBee internet connection came in at around 32000 bits down & 6400 bits up. The upload packet rate maxed out at 44 Hz with the bandwidth weighted 5x towards downloading & 1x towards uploading. That was done by using 100 byte packets for downloading & 20 byte packets for uploading. Sending multiple download packets in between a slower rate of upload packets didn't work.

The browsing experience was pretty bad. Some pages with automatic refresh timers didn't load at all. It's interesting to compare how efficiently different pages load on a very slow radio. Facebook is very efficient. wunderground never loads.

The internet may seem extremely slow & bloated, but all that javascript & CSS modularization is probably more efficient than years ago. They're feeling pressure to optimize the page loading on phones.

Unfortunately, the XBee range was exactly the same as wifi. It would take either a repeater or a waveguide antenna. If the range was solved, the next step would be a system of ACKs that could handle dropped packets a lot more quickly than TCP.

The mane limitation with radios is they need a fast way to resend dropped packets. TCP is very slow to recover from dropped packets.
Posted by Jack Crossfire | Nov 01, 2013 @ 05:18 AM | 7,155 Views

Give a monkey a bag of cheap radio modules & he'll do anything to convert them into a long range internet connection. Wifi isn't really wireless because the range is useless. The phone company is worthless because no-one can afford $1000/year for bandwidth capped data.

Every man dreams of hooking up 4 cheap radio modules into a high speed, long range, full duplex radio suitable for IP. IP requires full duplex asynchronous communication. Hook up your PPP connection to a single XBee & it won't go anywhere.

The CC1101 was free & transmitted 10mW, much less than the XBee, but a lot more power than the MRF49XA, so whacking 4 on 2 serial ports to make a full duplex connection was expected to work. It wasn't so easy.

The frequencies of the 2 modules were too close together & their tuning filters weren't sharp enough. The transmitter overwhelmed the receiver. Since they have a common electrical connection through either the serial port, ground, or Vdd, they can never be spaced far enough apart.

1 module needed to do 433Mhz while another did 915Mhz to avoid interfering. The modules were wired only for 433Mhz, so you needed to rip out the balun parts & put in a 915Mhz loop antenna.

The CC1101 was an absolute buster to program. There are fragments of useful register sets on the goog. The only required register writes ended up being:

WRITE_REG CC1101_MDMCFG4, 0x8C ; filter bandwidth
...Continue Reading