bradsease / astra-viso Goto Github PK
View Code? Open in Web Editor NEWA star camera model implemented in python.
License: MIT License
A star camera model implemented in python.
License: MIT License
position_utils should contain all necessary functions for position modeling.
Starcam should include a user-defined variable that defines the required step size (in pixels) of image-level integration. starcam.integ
should enforce this step size on stars and worldobjects.
Add variables to worldobject
to facilitate angular rate and attitude storage and propagation.
Add starmap property to starcam to manage an internal star catalog.
.integ
should call position function at intervals over exposure time and project corresponding points.
Create worldobject
class to contain position, attitude, and other physical data.
Settings file should allow any property to be set. The import option should verify the settings are valid.
Encapsulate plane to body inverse projection in StarCam.plane2body()
method.
Benchmark testing scripts for various segments of the code will help identify areas for optimization.
set_pointing_fcn should accept a function that accepts an initial state and returns an explicit function of time.
pointing_utils should contain all necessary functions for attitude modeling.
As a user, I would like to retrieve attitude at specific times and over time spans from a worldobject. The output format should be a DCM.
worldobject.getpointing(self, t)
This code should integrate an ODE function defined in
worldobject.pointingode
.set_pointing_preset()
should assign built-in preset dynamic functions to worldobject.pointing_fcn
For now, this method should just allow choice of the kinematic preset.
.integ
should pull the attitude at intervals along exposure time and project star catalog at each point.
Encapsulate body to plane projection code in StarCam.body2plane()
method.
.set_position_preset()
should set worldobject.position_fcn according to the built-in preset options by name. For now, the only preset available may be position_preset_kinematic()
.
.set_pointing_fcn()
should accept a function pointer and a string describing the type of function input. Options should be "ode" for a differential equation, "explicit" for an explicit function of time, and "sampled" for a sampled input vector.
.get_pointing
should allow input of a single time or vector of times and return a list of DCMs. Method should integrate worldobject.pointing_fcn
if worldobject.pointing_mode
is "ode".
Requires #16
As a user, I would like the camera object to automatically calculate inverse polynomial parameters for me if necessary. The code should be able to check if the existing forward and inverse parameters are consistent and update if necessary.
starcam.checkpolys()
starcam.updatepolys()
worldobject.pointing_ode
should point to a function describing the evolution of the attitude. Set default as basic kinematic angular rate / quaternion model.
.addworldobject(object)
should allow the user to add worldobjects to an array of embedded objects. Each worldobject may be set up beforehand. If not set up before, .addworldobject()
should create a new empty object.
Should take in quaternion with the scalar as the fourth component.
worldobject.quat2dcm(self, q)
Allow a worldobject's position state to be set in ECEF to enable Earth-fixed observers. Define a motion model function like
worldobject.ECEF_position(self, t)
worldobject.ECEF_pointing(self,t)
As a user, I would like to input polynomial camera parameters in the form of two vectors (u,v) describing an arbitrary-order forward polynomial projection.
starcam.setpoly(self, u, v)
See:
Shupe, David L., et al. "The SIP convention for representing distortion in FITS image headers." Astronomical Data Analysis Software and Systems XIV. Vol. 347. 2005.
Move catalogs into astraviso folder and ensure the starmap module can access them.
Future optimization code in the starmap object will require a method to derive equally-spaced vectors covering the celestial sphere. The spacing should be given as a user input.
starmap.segmentsphere(self, angle)
Possible format:
# method(input1, input2, ..., inputN)
# Short description...
#
method(input1, input2, ..., inputN)
Longer description should be reserved for wiki documentation.
Add method to set initial angular rate and attitude in worldobject:
worldobject.setpointing(t, w, q)
.set_position_fcn
should accept a function and an optional string to set the position function and mode. Modes should include "ode" for differential equation inputs, "explicit" for explicit functions of time, and "sampled" for a sampled input vector.
The starcam object should have an option to simulate light travel time from a non-star object to the first order.
starcam.compute_light_time(object)
pointing_preset_kinematic()
should set worldobject.pointing_fcn
to implement this MATLAB code snippet:
M = [ 0 w(3) -w(2) w(1);
-w(3) 0 w(1) w(2);
w(2) -w(1) 0 w(3);
-w(1) -w(2) -w(3) 0 ];
qdot = 0.5*M*q;
As a user, I would like to input polynomial camera parameters in the form of two vectors (u,v) describing an arbitrary-order forward polynomial projection. I would also like to be able to input the inverse projection parameters.
starcam.setpoly(self, u, v)
starcam.setinvpoly(self, u, v)
See:
Shupe, David L., et al. "The SIP convention for representing distortion in FITS image headers." Astronomical Data Analysis Software and Systems XIV. Vol. 347. 2005.
position_preset_kinematic()
should implement basic kinematic equations of motion with no acceleration. Output should be an implicit function of time.
Warning says
UserWarning: dopri5: step size becomes too small
self.messages.get(idid, 'Unexpected idid=%s' % idid))
.get_position()
should accept a single time or vector of times and return a list of position vectors. Method should integrate worldobject.position_fcn
if worldobject.position_mode
is "ode".
As a user, I would like to be able to import STK ephemerides to more easily model space objects.
starcam.loadephem
The ephemeris must list time in seconds from epoch and that epoch must match t = 0.
The starcam object requires an instance of worldobject to describe its attitude and position.
starcam.state
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.