[Spice_discussion] Re: Spice and .NET (C#)

Jerry W. Manweiler Manweiler at ftecs.com
Tue Feb 24 13:32:17 PST 2009


For anyone interested

I've created a proof of concept working version of SPICE that has
managed C++ code wrappers for the SPICE functionality and can be
directly called from C#.

This code will be used in the RBSP mission for the RBSPICE Instrument
data processing segment of the Science Operations Center.

We are several years from needing implementation but I did the proof of
concept to verify that the capability can be developed and easily
utilized.

At this time, I have implemented wrappers for some of the time
conversion functions and for some of the simple ephemeris functionality.

I'm in the process as time allows to integrate the C# code into the
SPICE exception handling so that all SPICE exceptions can be directly
processed thru the C# code without low level queries into the SPICE
exception routines.

 

All of this development has been done under the Visual Studio 2008 IDE.

 

I'm happy to share what I've accomplished if anyone is interested.

 

Jerry

 

Jerry W. Manweiler, Ph.D. 
Managing Member 
Fundamental Technologies, LLC 
(785) 840-0800   FAX: (785) 840-0808 

Information contained in this email and any attachments are proprietary
and confidential to Fundamental Technologies, LLC. All rights reserved,
this document, attachments, or parts thereof may not be duplicated or
reproduced in any form without the written permission of Fundamental
Technologies, LLC  (c) 2007 - All Rights Reserved.

If you have received this email in error please inform the sender of the
email and delete the email immediately.
________________________________________________________________________
_______

 

From: spice_discussion-bounces at naif.jpl.nasa.gov
[mailto:spice_discussion-bounces at naif.jpl.nasa.gov] On Behalf Of
YAMAMOTO Yukio
Sent: Tuesday, February 24, 2009 2:36 PM
To: spice_discussion at naif.jpl.nasa.gov
Subject: [Spice_discussion] Re: Spice and .NET (C#)

 

Keith:

 

	I'm wondering if anyone has worked with the spice toolkit in
.NET with C#?

 

I've just tested and a sample code works fine.

DLL is required to access from C#.NET.

 

I did the following steps to make cspice.dll:

 

0. Download Visual C 32bit cspice.exe from NAIF Toolkit and extract it

1. Put attached files: 'cspice.def', 'mkcspice_dll.bat' into
(somewhere)\cspice\src\cspice

2. Make 'erf' and 'erfc' functions due to the lack of these functions in
VC++

# attached 'erf.c' works for 32 bit architecture (put it in the same
directory above)

3. Execute mkcspice_dll.bat

# cspice.dll can be found in (somewhere)\cspice\lib

 

Just in case, I'll show a sample code using cspice.dll.

ConsoleApplication1.exe, de421.bsp, and cspice.dll must be in the same
directory.

 

Regards,

Yukio

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20090224/b1cdf7d8/attachment-0001.html


More information about the Spice_discussion mailing list