- Netduino Forums
- → Brandon G's Content
Brandon G's Content
There have been 92 items by Brandon G (Search limited from 08-June 23)
#8237 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 03:04 AM in Project Showcase
#8867 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 02 February 2011 - 05:55 AM in Project Showcase
#8364 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 25 January 2011 - 06:22 AM in Project Showcase
#8399 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 25 January 2011 - 03:57 PM in Project Showcase
#8581 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 27 January 2011 - 07:22 PM in Project Showcase
heres my ideas hardware wise, would like some opinions, you mentioned using a better BEC, so I have taken it off the list open for your suggestions, keeping in mind i am trying to be very modular is the reason for the component shield
Motor 6 $6.00 $36.00 http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=5354&aff=104834 ESC 6 $9.23 $55.38 http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=6458&Product_Name=Hobbyking_SS_Series_25-30A_ESC_%28card_programmable%29&aff=104834 Props 8 $4.00 $32.00 https://www.mikrocontroller.com/index.php?main_page=product_info&cPath=75&products_id=256&zenid=43fb24fa5fbee9bca99cea5ee6462e48 Battery 3 $19.00 $57.00 http://hobbycity.com/hobbyking/store/uh_viewItem.asp?idProduct=7634 Battery Charger 1 $25.00 $25.00 http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=2055 Frame 1 $90.00 $90.00 http://quadframe.com/html/quad002.html RC Transmitter 1 $60.00 $60.00 http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=8992 ITG3200/ADXL345 1 $65.00 $65.00 http://www.sparkfun.com/products/10321 Component Shield 1 $22.00 $22.00 http://www.robotshop.ca/ghi-component-shield-v2.html JST Sensor Cable 20 $1.76 $35.20 http://www.robotshop.ca/inex-jst3aa-sensor-cable.html
#7960 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:42 PM in Project Showcase
#8234 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 02:14 AM in Project Showcase
#7959 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:40 PM in Project Showcase
#9009 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 04 February 2011 - 08:52 PM in Project Showcase
#9547 Runtime Native Code Interop
Posted by Brandon G on 14 February 2011 - 09:04 PM in General Discussion
Thank you for this. I think this will help a great deal in the cases where near realtime is necessary. I know this requires alot of work to integrate and glad your team are doing it. I would really hope that the NETMF team will take you and GHI's lead as far as providing interops and push it into NETMF. I love managed code and will always write in it when i can, even when knowing i am sacrificing speed for elegance, but given my recent project DotCopter.NET there is no way it can all be done in managed. So in an appeal to the NETMF team, to avoid further fragmentation, they need to pull this into the framework for the cases where its a last resort.
Again, thank you for your efforts Chris.
Brandon
#10645 Quadcopter Early Flight
Posted by Brandon G on 07 March 2011 - 06:53 PM in Project Showcase
#8951 Anybody interested in a cheap IMU?
Posted by Brandon G on 03 February 2011 - 09:18 PM in General Discussion
#8955 Anybody interested in a cheap IMU?
Posted by Brandon G on 03 February 2011 - 10:48 PM in General Discussion
#8966 Anybody interested in a cheap IMU?
Posted by Brandon G on 04 February 2011 - 01:51 AM in General Discussion
#8924 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 03 February 2011 - 04:10 AM in General Discussion
#9468 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 14 February 2011 - 12:07 AM in General Discussion
#8783 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 01 February 2011 - 01:20 AM in General Discussion
#7630 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 14 January 2011 - 03:44 AM in General Discussion
#7616 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 13 January 2011 - 11:02 PM in General Discussion
#7610 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 13 January 2011 - 10:34 PM in General Discussion
#7655 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 14 January 2011 - 04:41 PM in General Discussion
#7609 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 13 January 2011 - 10:28 PM in General Discussion
#8860 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 02 February 2011 - 05:18 AM in General Discussion
EDIT: didnt like what i posted earlier, here`s a revamp
using Quad.Net.Commons.Serialization; namespace Quad.Net.Commons.Logging { public interface ILogger { void Flush(); void Write(ISerializable obj); } } using System.IO; using Quad.Net.Commons.Serialization; namespace Quad.Net.Commons.Logging { public class PersistenceWriter : ILogger { private readonly IBinaryFormatter _formatter; private readonly string _fileName; private readonly FileStream _fileStream; public PersistenceWriter(string fileName, IBinaryFormatter formatter) { _formatter = formatter; _fileName = fileName; _fileStream = new FileStream(_fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, 512); } public void Flush() { _fileStream.Flush(); } public void Write(ISerializable obj) { _formatter.Serialize(_fileStream, obj); } } } using System.IO; using Quad.Net.Commons.Serialization; namespace Quad.Net.Commons.Logging { public class PersistanceReader { private readonly IBinaryFormatter _binaryFormatter; public PersistanceReader(IBinaryFormatter binaryFormatter) { _binaryFormatter = binaryFormatter; } public ISerializable[] GetMessages(string readPath) { FileStream readFile = new FileStream(readPath, FileMode.Open, FileAccess.Read); return _binaryFormatter.Deserialize(readFile); } } } using System; using System.IO; namespace Quad.Net.Commons.Serialization { public interface IBinaryFormatter { void Serialize(Stream stream, Object graph);//not implemented ISerializable[] Deserialize(Stream stream); void Serialize(Stream stream, ISerializable graph);//optimistic } } namespace Quad.Net.Commons.Serialization { public interface ISerializable //: where T : new() in classic C# this is what i would do force a parameterless contructor, cant do thisin netmf { byte[] Serialize(); object Deserialize(byte[] buffer); } } using System; using System.Collections; using System.IO; namespace Quad.Net.Commons.Serialization { public class TelemetryFormatter:IBinaryFormatter { public void Serialize(Stream stream, object graph) { throw new NotImplementedException(); } public ISerializable[] Deserialize(Stream stream) { ISerializable[] items = new ISerializable[stream.Length/44]; int counter = 0; while (stream.Position < stream.Length) { byte[] buffer = new byte[44]; stream.Read(buffer, 0, 44); ISerializable item = (ISerializable) typeof(TelemetryData).GetConstructor(new Type[0]).Invoke(new object[0]); item.Deserialize(buffer); items[counter] = item; counter++; } return items; } public void Serialize(Stream stream, ISerializable graph) { byte[] buffer = graph.Serialize(); stream.Write(buffer, 0, buffer.Length); } } } using System; using Microsoft.SPOT.Hardware; using Quad.Net.Avionics; using Quad.Net.Commons.Serialization; using Quad.Net.Commons.Utilities; namespace Quad.Net.FlightController { public class TelemetryData : ISerializable { private readonly AircraftPrincipalAxes _gyroAxes; private readonly AircraftPrincipalAxes _radioAxes; private readonly AircraftPrincipalAxes _pidAxes; private long _currentTime; private readonly byte[] _buffer; public TelemetryData() { _gyroAxes= new AircraftPrincipalAxes(0,0,0); _radioAxes = new AircraftPrincipalAxes(0, 0, 0); _pidAxes = new AircraftPrincipalAxes(0, 0, 0); _currentTime = DateTime.Now.Ticks; _buffer = new byte[44]; } public void Update(AircraftPrincipalAxes gyroAxes, AircraftPrincipalAxes radioAxes, AircraftPrincipalAxes pidAxes, long currentTime) { _gyroAxes.Update(gyroAxes.Pitch,gyroAxes.Roll,gyroAxes.Yaw); _radioAxes.Update(radioAxes.Pitch, radioAxes.Roll, radioAxes.Yaw); _pidAxes.Update(pidAxes.Pitch, pidAxes.Roll, pidAxes.Yaw); } public byte[] Serialize() { Utility.InsertValueIntoArray(_buffer, 0, 4, (uint)(_currentTime >> 32)); Utility.InsertValueIntoArray(_buffer, 4, 4, (uint)_currentTime); Utility.InsertValueIntoArray(_buffer, 8, 4, (uint)_gyroAxes.Pitch); Utility.InsertValueIntoArray(_buffer, 12, 4, (uint)_gyroAxes.Roll); Utility.InsertValueIntoArray(_buffer, 16, 4, (uint)_gyroAxes.Yaw); Utility.InsertValueIntoArray(_buffer, 20, 4, (uint)_radioAxes.Pitch); Utility.InsertValueIntoArray(_buffer, 24, 4, (uint)_radioAxes.Roll); Utility.InsertValueIntoArray(_buffer, 28, 4, (uint)_radioAxes.Yaw); Utility.InsertValueIntoArray(_buffer, 32, 4, (uint)_pidAxes.Pitch); Utility.InsertValueIntoArray(_buffer, 36, 4, (uint)_pidAxes.Roll); Utility.InsertValueIntoArray(_buffer, 40, 4, (uint)_pidAxes.Yaw); return _buffer; } public object Deserialize(byte[] buffer) { _currentTime = BitConverter.ToLong(buffer, 0); _gyroAxes.Update( Utility.ExtractValueFromArray(buffer, 8, 4), Utility.ExtractValueFromArray(buffer, 12, 4), Utility.ExtractValueFromArray(buffer, 16, 4) ); _radioAxes.Update( Utility.ExtractValueFromArray(buffer, 20, 4), Utility.ExtractValueFromArray(buffer, 24, 4), Utility.ExtractValueFromArray(buffer, 28, 4) ); _pidAxes.Update( Utility.ExtractValueFromArray(buffer, 32, 4), Utility.ExtractValueFromArray(buffer, 36, 4), Utility.ExtractValueFromArray(buffer, 40, 4) ); return this; } public override string ToString() { //csv format return _currentTime + "," + _gyroAxes.Pitch + "," + _gyroAxes.Roll + "," + _gyroAxes.Yaw + "," + _radioAxes.Pitch + "," + _radioAxes.Roll + "," + _radioAxes.Yaw + "," + _pidAxes.Pitch + "," + _pidAxes.Roll + "," + _pidAxes.Yaw + ","; } } }
#8811 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 01 February 2011 - 04:34 PM in General Discussion
#8861 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 02 February 2011 - 05:20 AM in General Discussion
- Netduino Forums
- → Brandon G's Content
- Privacy Policy