×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Precise data format help needed
Troy Hall
Yeni Üye
Posts: 5
8 yıl 6 ay önce #1325
Yazan: Troy Hall
Precise data format help needed, Troy Hall tarafından oluşturuldu
I have a pretty unique need in that the text that is entered MUST stay EXACTLY as entered.. no spaces can be move/lost/changed.
It's a fortran encoded 80char string and they use spaces for placeholders.
I tried using char(80) for the field type but it looked strange in the backend.. then I read that sql strips spaces on char() and to use varchar instead.. ok, so
i change it to varchar(80) and now it actually looks worse!
www.minorplanetcenter.net/iau/ECS/MPCUPDATE/this/CmtEls.txt will give you a idea of what I mean by the special and precise formatting.. notice the last 10 lines are different then the rest... those spaces in the preceding lines are CRITICAL, and will actually cause the entry to fail a validation check @ harvards space center if they are not in the right spot.
The image shows how it is looking in the admin.
In list view I need these spaces to show also.
It's a fortran encoded 80char string and they use spaces for placeholders.
I tried using char(80) for the field type but it looked strange in the backend.. then I read that sql strips spaces on char() and to use varchar instead.. ok, so
i change it to varchar(80) and now it actually looks worse!
www.minorplanetcenter.net/iau/ECS/MPCUPDATE/this/CmtEls.txt will give you a idea of what I mean by the special and precise formatting.. notice the last 10 lines are different then the rest... those spaces in the preceding lines are CRITICAL, and will actually cause the entry to fail a validation check @ harvards space center if they are not in the right spot.
The image shows how it is looking in the admin.
In list view I need these spaces to show also.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Walt Sorensen
Yeni Üye
Posts: 5
8 yıl 6 ay önce #1330
Yazan: Walt Sorensen
Walt Sorensen tarafından Precise data format help needed konusunda yanıtlandı
Hey Troy,
I'm wondering, do you really need to store the "entry" field in your database? Looking at it, it seems to be just a formated string of the other data in the record. If that is the case, you could just programmatically create that information when you need to display it or when you need to export to a csv, etc.
Even your year/month/day fields are technically unnecessary since those too can be parsed programmatically for display/export from your "humanDate" field
The field that I think you need to have the precision on is the designation since it can be given in a 7 or 12-character form with blanks (typically leading blanks). This might be a case where a custom field type is needed.
note: I don't know much about the data specifics for your astronomical observation records, I've just read a little while following the discussion on the Joomla forum.
what I've read...
www.minorplanetcenter.net/iau/info/OpticalObs.html
ftp://ssd.jpl.nasa.gov/pub/ssd/Horizons_doc.pdf
www.minorplanetcenter.net/iau/info/CometOrbitFormat.html
All the best,
~Walt
I'm wondering, do you really need to store the "entry" field in your database? Looking at it, it seems to be just a formated string of the other data in the record. If that is the case, you could just programmatically create that information when you need to display it or when you need to export to a csv, etc.
Even your year/month/day fields are technically unnecessary since those too can be parsed programmatically for display/export from your "humanDate" field
The field that I think you need to have the precision on is the designation since it can be given in a 7 or 12-character form with blanks (typically leading blanks). This might be a case where a custom field type is needed.
note: I don't know much about the data specifics for your astronomical observation records, I've just read a little while following the discussion on the Joomla forum.
what I've read...
www.minorplanetcenter.net/iau/info/OpticalObs.html
ftp://ssd.jpl.nasa.gov/pub/ssd/Horizons_doc.pdf
www.minorplanetcenter.net/iau/info/CometOrbitFormat.html
All the best,
~Walt
Şu kullanıcı(lar) Teşekkür etti: Andres Maeso
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Troy Hall
Yeni Üye
Posts: 5
8 yıl 6 ay önce #1335
Yazan: Troy Hall
Troy Hall tarafından Precise data format help needed konusunda yanıtlandı
I'll read more.. I totally agree with a bit of understanding it could probably be left out all together.. I've been trying to learn that document and tis fairly complex LOL
I'll be doing a LOT of curl testing before I would feel comfortable dumping the actual entry
I'll be doing a LOT of curl testing before I would feel comfortable dumping the actual entry
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.050 saniye